63 template<
class TSparseSpace,
class TDenseSpace>
117 ,mErrorTolerance(rOther.mErrorTolerance)
118 ,mConstantError(rOther.mConstantError)
139 return Kratos::make_shared<ClassType>(ThisParameters);
177 if (r_process_info[DOMAIN_SIZE] == 2) {
179 compute_error_process.Execute();
182 compute_error_process.Execute();
186 const double estimated_error = r_process_info[ERROR_RATIO];
189 const bool converged_error = (estimated_error > mErrorTolerance) ?
false :
true;
191 if (converged_error) {
192 KRATOS_INFO_IF(
"ContactErrorMeshCriteria", rModelPart.
GetCommunicator().
MyPID() == 0 && this->GetEchoLevel() > 0) <<
"NL ITERATION: " << r_process_info[NL_ITERATION_NUMBER] <<
"\tThe error due to the mesh size: " << estimated_error <<
" is under the tolerance prescribed: " << mErrorTolerance <<
". " <<
BOLDFONT(
FGRN(
"No remeshing required")) << std::endl;
195 <<
"NL ITERATION: " << r_process_info[NL_ITERATION_NUMBER] <<
"\tThe error due to the mesh size: " << estimated_error <<
" is bigger than the tolerance prescribed: " << mErrorTolerance <<
". "<<
BOLDFONT(
FRED(
"Remeshing required")) << std::endl;
198 return converged_error;
209 "name" : "contact_error_mesh_criteria",
210 "error_mesh_tolerance" : 5.0e-3,
211 "error_mesh_constant" : 5.0e-3,
212 "compute_error_extra_parameters":
214 "penalty_normal" : 1.0e4,
215 "penalty_tangential" : 1.0e4,
223 return default_parameters;
232 return "contact_error_mesh_criteria";
248 std::string
Info()
const override
250 return "ContactErrorMeshCriteria";
289 mThisParameters = ThisParameters;
290 mErrorTolerance = mThisParameters[
"error_mesh_tolerance"].
GetDouble();
291 mConstantError = mThisParameters[
"error_mesh_constant"].
GetDouble();
305 double mErrorTolerance;
306 double mConstantError;
virtual int MyPID() const
Definition: communicator.cpp:91
This is the base class to define the different convergence criterion considered.
Definition: convergence_criteria.h:58
virtual Parameters ValidateAndAssignParameters(Parameters ThisParameters, const Parameters DefaultParameters) const
This method validate and assign default parameters.
Definition: convergence_criteria.h:466
TSparseSpace::MatrixType TSystemMatrixType
Matrix type definition.
Definition: convergence_criteria.h:72
ModelPart::DofsArrayType DofsArrayType
DoF array type definition.
Definition: convergence_criteria.h:81
virtual Parameters GetDefaultParameters() const
This method provides the defaults parameters to avoid conflicts between the different constructors.
Definition: convergence_criteria.h:384
virtual void Initialize(ModelPart &rModelPart)
This function initialize the convergence criteria.
Definition: convergence_criteria.h:276
TSparseSpace::VectorType TSystemVectorType
Vector type definition.
Definition: convergence_criteria.h:74
virtual void AssignSettings(const Parameters ThisParameters)
This method assigns settings to member variables.
Definition: convergence_criteria.h:479
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
Communicator & GetCommunicator()
Definition: model_part.h:1821
ConditionsContainerType & Conditions(IndexType ThisIndex=0)
Definition: model_part.h:1381
ProcessInfo & GetProcessInfo()
Definition: model_part.h:1746
ModelPart & GetSubModelPart(std::string const &SubModelPartName)
Definition: model_part.cpp:2029
NodesContainerType & Nodes(IndexType ThisIndex=0)
Definition: model_part.h:507
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
double GetDouble() const
This method returns the double contained in the current Parameter.
Definition: kratos_parameters.cpp:657
void RecursivelyAddMissingParameters(const Parameters &rDefaultParameters)
This function is designed to verify that the parameters under testing contain at least all parameters...
Definition: kratos_parameters.cpp:1457
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
This class implements a set of auxiliar, already parallelized, methods to perform some common tasks r...
Definition: variable_utils.h:63
void SetFlag(const Flags &rFlag, const bool FlagValue, TContainerType &rContainer)
Sets a flag according to a given status over a given container.
Definition: variable_utils.h:900
#define FGRN(x)
Definition: color_utilities.h:27
#define FRED(x)
Definition: color_utilities.h:26
#define BOLDFONT(x)
Definition: color_utilities.h:34
#define KRATOS_INFO_IF(label, conditional)
Definition: logger.h:251
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21