55 template<
class TSparseSpace,
class TDenseSpace>
100 const bool PrintingOutput =
false,
101 const bool ComputeDynamicFactor =
true,
102 const bool GiDIODebug =
false
103 ) :
BaseType(ComputeDynamicFactor, GiDIODebug)
106 BaseType::mOptions.
Set(PenaltyFrictionlessMortarConvergenceCriteria::PRINTING_OUTPUT, PrintingOutput);
143 typename ConvergenceCriteriaBaseType::Pointer
Create(
Parameters ThisParameters)
const override
145 return Kratos::make_shared<ClassType>(ThisParameters);
194 const bool active_set_converged = (is_converged == 0 ? true :
false);
198 r_process_info[ACTIVE_SET_CONVERGED] = active_set_converged;
201 if (r_process_info.
Has(TABLE_UTILITY)) {
203 auto& r_table = p_table->GetTable();
204 if (active_set_converged) {
205 if (
BaseType::mOptions.IsNot(PenaltyFrictionlessMortarConvergenceCriteria::PRINTING_OUTPUT))
208 r_table <<
"Achieved";
210 if (
BaseType::mOptions.IsNot(PenaltyFrictionlessMortarConvergenceCriteria::PRINTING_OUTPUT))
213 r_table <<
"Not achieved";
216 if (active_set_converged) {
217 if (
BaseType::mOptions.IsNot(PenaltyFrictionlessMortarConvergenceCriteria::PRINTING_OUTPUT))
218 KRATOS_INFO(
"PenaltyFrictionlessMortarConvergenceCriteria") <<
BOLDFONT(
"\tActive set") <<
" convergence is " <<
BOLDFONT(
FGRN(
"achieved")) << std::endl;
220 if (
BaseType::mOptions.IsNot(PenaltyFrictionlessMortarConvergenceCriteria::PRINTING_OUTPUT))
221 KRATOS_INFO(
"PenaltyFrictionlessMortarConvergenceCriteria") <<
BOLDFONT(
"\tActive set") <<
" convergence is " <<
BOLDFONT(
FRED(
"not achieved")) << std::endl;
223 KRATOS_INFO(
"PenaltyFrictionlessMortarConvergenceCriteria") <<
"\tActive set convergence is not achieved" << std::endl;
228 return active_set_converged;
240 if (r_process_info.
Has(TABLE_UTILITY) &&
BaseType::mOptions.
IsNot(PenaltyFrictionlessMortarConvergenceCriteria::TABLE_IS_INITIALIZED)) {
242 auto& r_table = p_table->GetTable();
243 r_table.AddColumn(
"ACTIVE SET CONV", 15);
256 "name" : "penalty_frictionless_mortar_criteria",
257 "print_convergence_criterion" : false
263 return default_parameters;
272 return "penalty_frictionless_mortar_criteria";
288 std::string
Info()
const override
290 return "PenaltyFrictionlessMortarConvergenceCriteria";
331 BaseType::mOptions.
Set(PenaltyFrictionlessMortarConvergenceCriteria::PRINTING_OUTPUT, ThisParameters[
"print_convergence_criterion"].GetBool());
342 template<
class TSparseSpace,
class TDenseSpace>
344 template<
class TSparseSpace,
class TDenseSpace>
Custom convergence criteria for the mortar condition.
Definition: base_mortar_criteria.h:65
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
int GetEchoLevel()
This returns the level of echo for the solving strategy.
Definition: convergence_criteria.h:209
virtual Parameters ValidateAndAssignParameters(Parameters ThisParameters, const Parameters DefaultParameters) const
This method validate and assign default parameters.
Definition: convergence_criteria.h:466
bool mConvergenceCriteriaIsInitialized
This "flag" is set in order to know if it is necessary to actualize the RHS.
Definition: convergence_criteria.h:448
bool Has(const Variable< TDataType > &rThisVariable) const
Checks if the data container has a value associated with a given variable.
Definition: data_value_container.h:382
void Set(const Flags ThisFlag)
Definition: flags.cpp:33
static Flags Create(IndexType ThisPosition, bool Value=true)
Definition: flags.h:138
bool IsNot(Flags const &rOther) const
Definition: flags.h:291
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
Communicator & GetCommunicator()
Definition: model_part.h:1821
ProcessInfo & GetProcessInfo()
Definition: model_part.h:1746
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
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
Custom convergence criteria for the mortar condition for frictionless case with components.
Definition: penalty_frictionless_mortar_criteria.h:58
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
#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(label)
Definition: logger.h:250
std::size_t ComputePenaltyFrictionlessActiveSet(ModelPart &rModelPart)
This function computes the active set for penalty frictionless cases.
Definition: active_set_utilities.cpp:28
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21