55 template<
class TSparseSpace,
class TDenseSpace>
100 const bool PrintingOutput =
false,
101 const bool ComputeDynamicFactor =
false,
102 const bool GiDIODebug =
false
103 ) :
BaseType(ComputeDynamicFactor, GiDIODebug)
143 typename ConvergenceCriteriaBaseType::Pointer
Create(
Parameters ThisParameters)
const override
145 return Kratos::make_shared<ClassType>(ThisParameters);
194 if (!r_process_info[ACTIVE_SET_COMPUTED]) {
198 r_process_info[ACTIVE_SET_CONVERGED] = is_converged == 0 ? true :
false;
199 r_process_info[ACTIVE_SET_COMPUTED] =
true;
203 const bool active_set_converged = r_process_info[ACTIVE_SET_CONVERGED];
206 if (r_process_info.
Has(TABLE_UTILITY)) {
208 auto& r_table = p_table->GetTable();
209 if (active_set_converged) {
210 if (
BaseType::mOptions.IsNot(ALMFrictionlessMortarConvergenceCriteria::PRINTING_OUTPUT))
213 r_table <<
"Achieved";
215 if (
BaseType::mOptions.IsNot(ALMFrictionlessMortarConvergenceCriteria::PRINTING_OUTPUT))
218 r_table <<
"Not achieved";
221 if (active_set_converged) {
222 if (
BaseType::mOptions.IsNot(ALMFrictionlessMortarConvergenceCriteria::PRINTING_OUTPUT))
225 if (
BaseType::mOptions.IsNot(ALMFrictionlessMortarConvergenceCriteria::PRINTING_OUTPUT))
226 KRATOS_INFO(
"ALMFrictionlessMortarConvergenceCriteria") <<
BOLDFONT(
"\tActive set") <<
" convergence is " <<
BOLDFONT(
FRED(
"not achieved")) << std::endl;
228 KRATOS_INFO(
"ALMFrictionlessMortarConvergenceCriteria") <<
"\tActive set convergence is not achieved" << std::endl;
233 return active_set_converged;
246 if (r_process_info.
Has(TABLE_UTILITY) &&
BaseType::mOptions.
IsNot(ALMFrictionlessMortarConvergenceCriteria::TABLE_IS_INITIALIZED)) {
248 auto& r_table = p_table->GetTable();
249 r_table.AddColumn(
"ACTIVE SET CONV", 15);
262 "name" : "alm_frictionless_mortar_criteria",
263 "print_convergence_criterion" : false
269 return default_parameters;
278 return "alm_frictionless_mortar_criteria";
294 std::string
Info()
const override
296 return "ALMFrictionlessMortarConvergenceCriteria";
337 BaseType::mOptions.
Set(ALMFrictionlessMortarConvergenceCriteria::PRINTING_OUTPUT, ThisParameters[
"print_convergence_criterion"].GetBool());
348 template<
class TSparseSpace,
class TDenseSpace>
350 template<
class TSparseSpace,
class TDenseSpace>
Custom convergence criteria for the mortar condition for frictionless case with components.
Definition: alm_frictionless_mortar_criteria.h:58
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
virtual Parameters ValidateAndAssignParameters(Parameters ThisParameters, const Parameters DefaultParameters) const
This method validate and assign default parameters.
Definition: convergence_criteria.h:466
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
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 ComputeALMFrictionlessActiveSet(ModelPart &rModelPart)
This function computes the active set for penalty frictionless cases.
Definition: active_set_utilities.cpp:175
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21