Hello;
It seems that Solver % Matrix % ConstrainedDOF is never reinitailised to FALSE so that when a node get a Dirichlet condition, it will always apply a Dirichlet condition. This could be a problem when using a "Condition" for the dirichlet condition and when the condition change from TRUE to FALSE.
A fix for the default beahaviour is:
Line 4384 of DefUtils.F90 (in DefaultDirichletBCs):
A % ConstrainedDOF = .FALSE.
should come after the ENDIF so that it will be re-initialized at each call of DefaultDirichletBCs;
However this do not solve the issue for solvers that do not use the DefaultDirichletBCs routine.
best regards,
Fabien
Pb with conditional Dirichlet
-
- Site Admin
- Posts: 4836
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: Pb with conditional Dirichlet
Hi Fabien
Now the Dirichlet conditions are enforced at the end of DefaultDirichletBCs() so that has to be the last routine to call when setting Dirichlet conditions. However, I know that there are some codes which set Dirichlet BCs outside that routine. Hence putting the initilization of ConstrainedDOF in front of DefaultDirichletBCs() would make these codes of no effect.
For this reason the initialization of ConstrainDOFs and DValues is also done in DefaultInitialize() which should be called prior to every timestep. Hence my recommendation would be to put the DefaultInialize() before start of the assembly. Then the conditional conditions should also be correctly treated. Would this solve your problem at hand?
-Peter
Now the Dirichlet conditions are enforced at the end of DefaultDirichletBCs() so that has to be the last routine to call when setting Dirichlet conditions. However, I know that there are some codes which set Dirichlet BCs outside that routine. Hence putting the initilization of ConstrainedDOF in front of DefaultDirichletBCs() would make these codes of no effect.
For this reason the initialization of ConstrainDOFs and DValues is also done in DefaultInitialize() which should be called prior to every timestep. Hence my recommendation would be to put the DefaultInialize() before start of the assembly. Then the conditional conditions should also be correctly treated. Would this solve your problem at hand?
-Peter
Re: Pb with conditional Dirichlet
Hi Peter;
Yes a call to DefaultInitialize() will also solve our problem.
Currently we have this problem with the Navier-Stokes solver, I see that it is calling InitializeToZero().
Replacing the InitializeToZero() line by CALL DefaultInitialize() will sove our problem.
I see that there is few other solvers that have the CALL InitializeToZero instead of DefaultInitialize() ; especially for ParStokes I think that the lines:
CALL InitializeToZero( AMatrix, AMatrix % RHS )
CALL InitializeToZero( PMatrix, PMatrix % RHS )
can be changed respectively by:
CALL DefaultInitialize(USolver=VelocitySolver)
CALL DefaultInitialize(USolver=PressureSolver)
thanks
fabien
Yes a call to DefaultInitialize() will also solve our problem.
Currently we have this problem with the Navier-Stokes solver, I see that it is calling InitializeToZero().
Replacing the InitializeToZero() line by CALL DefaultInitialize() will sove our problem.
I see that there is few other solvers that have the CALL InitializeToZero instead of DefaultInitialize() ; especially for ParStokes I think that the lines:
CALL InitializeToZero( AMatrix, AMatrix % RHS )
CALL InitializeToZero( PMatrix, PMatrix % RHS )
can be changed respectively by:
CALL DefaultInitialize(USolver=VelocitySolver)
CALL DefaultInitialize(USolver=PressureSolver)
thanks
fabien
-
- Site Admin
- Posts: 4836
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: Pb with conditional Dirichlet
Hi Fabien
Thanx. I did exactly this for FlowSolve. Maybe you can test ParStokes that it is ok there too before committing. FlowSolve is more of a standard solver.
-Peter
Thanx. I did exactly this for FlowSolve. Maybe you can test ParStokes that it is ok there too before committing. FlowSolve is more of a standard solver.
-Peter
Re: Pb with conditional Dirichlet
ok.
Thanks!
Fabien
Thanks!
Fabien