Conversation
kratos/solving_strategies/convergencecriterias/mixed_generic_criteria.h
Outdated
Show resolved
Hide resolved
kratos/solving_strategies/convergencecriterias/mixed_generic_criteria.h
Outdated
Show resolved
Hide resolved
…riteria.h Co-authored-by: Philipp Bucher <philipp.bucher@tum.de>
|
Hmm there are some tests failing in @KratosMultiphysics/geomechanics because in some cases they are only checking some variables (WATER_PRESSURE) even if they also have dofs for DISPLACEMENT. I think that is actually a fair use, so maybe instead of throwing an error we should just skip the dof if the variable was not added to |
|
Why is |
I agree that the function should be const. But I think its also a fair use that for example in the context of a CFD problem where you have VELOCITY and PRESSURE dofs, for whatever reason you only want to check VELOCITY (that'd throw an error with current implementation in this MR) |
|
I just pushed my suggestion @philbucher @KratosMultiphysics/implementation-committee @KratosMultiphysics/technical-committee |
perhaps there should be a setting to explicitly ignore these dofs? I feel like just neglecting them silently can cause problems too |
…//github.com/KratosMultiphysics/Kratos into core/mixed-generic-criteria-using-at-for-map
Hmm honestly I do not see it. What do you want to do with dofs that do not belong to any of the input variables? You do not even have a target error for those, relative and absolute errors are only defined for input vars... |
then you can/should ignore those. Only a suggestion, IMO one should be fully aware of what dofs are used in a simulation, and how the convergence is checked |
...TrilinosApplication/custom_strategies/convergencecriterias/trilinos_mixed_generic_criteria.h
Outdated
Show resolved
Hide resolved
|
It seems its passing now :) @philbucher |
kratos/solving_strategies/convergencecriterias/mixed_generic_criteria.h
Outdated
Show resolved
Hide resolved
kratos/solving_strategies/convergencecriterias/mixed_generic_criteria.h
Outdated
Show resolved
Hide resolved
kratos/solving_strategies/convergencecriterias/mixed_generic_criteria.h
Outdated
Show resolved
Hide resolved
rubenzorrilla
left a comment
There was a problem hiding this comment.
Makes perfect sense for me. It is customary to have more DOFs than the ones you might want to actually check (think for instance in any volume coupling problem). My suggestions are purely aesthetic and typos in documentation.
23b9c17
|
comments addressed @rubenzorrilla ;) |
| */ | ||
| bool FindVarLocalKey( | ||
| typename DofsArrayType::const_iterator iDof, | ||
| typename DofsArrayType::const_iterator itDof, |
There was a problem hiding this comment.
how about passing the variable? The dof is only used to access the variable
There was a problem hiding this comment.
well I used the dof to minimize the duplicated code in the trilinos side, what is the advantage on passing the variable instead?
There was a problem hiding this comment.
More of a philosophical question :)
I try to always pass the least amount of information possible
📝 Description
There was a bug in our code that took some time to debug. We were sending the wrong variables to the constructor, so as the dofset included different variables, new entries were being added to the mLocalKeyMap as it was using the brackets operator (added new entry if it does not exist). This caused me errors in omp as two threads might try to create this new entry at the same time. Im skipping now the dofs that do not match any of the input variables