61 template<
class TSparseSpace,
class TDenseSpace>
102 mThisParameters(ThisParameters)
113 "error_mesh_tolerance" : 5.0e-3,
114 "error_mesh_constant" : 5.0e-3,
115 "compute_error_extra_parameters":
123 mErrorTolerance = mThisParameters["error_mesh_tolerance"].
GetDouble();
124 mConstantError = mThisParameters[
"error_mesh_constant"].
GetDouble();
131 ,mErrorTolerance(rOther.mErrorTolerance)
132 ,mConstantError(rOther.mConstantError)
173 if (process_info[DOMAIN_SIZE] == 2) {
175 compute_error_process.
Execute();
178 compute_error_process.
Execute();
182 const double estimated_error = process_info[ERROR_RATIO];
185 const bool converged_error = (estimated_error > mErrorTolerance) ?
false :
true;
187 if (converged_error) {
188 KRATOS_INFO_IF(
"ErrorMeshCriteria", rModelPart.
GetCommunicator().
MyPID() == 0 && this->GetEchoLevel() > 0) <<
"NL ITERATION: " << 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;
191 <<
"NL ITERATION: " << 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;
194 return converged_error;
253 double mErrorTolerance;
254 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
TSparseSpace::MatrixType TSystemMatrixType
Matrix type definition.
Definition: convergence_criteria.h:72
virtual void Initialize(ModelPart &rModelPart)
This function initialize the convergence criteria.
Definition: convergence_criteria.h:276
TSparseSpace::DataType TDataType
Data type definition.
Definition: convergence_criteria.h:70
TSparseSpace::VectorType TSystemVectorType
Vector type definition.
Definition: convergence_criteria.h:74
Custom convergence for used to check the convergence in the mesh error.
Definition: error_mesh_criteria.h:64
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
MeshType::ConditionsContainerType ConditionsContainerType
Condintions container. A vector set of Conditions with their Id's as key.
Definition: model_part.h:183
Communicator & GetCommunicator()
Definition: model_part.h:1821
ProcessInfo & GetProcessInfo()
Definition: model_part.h:1746
MeshType::NodesContainerType NodesContainerType
Nodes container. Which is a vector set of nodes with their Id's as key.
Definition: model_part.h:128
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 ValidateAndAssignDefaults(const Parameters &rDefaultParameters)
This function is designed to verify that the parameters under testing match the form prescribed by th...
Definition: kratos_parameters.cpp:1306
A sorted associative container similar to an STL set, but uses a vector to store pointers to its data...
Definition: pointer_vector_set.h:72
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
This class is can be used to compute the metrics of the model part with a superconvergent patch recov...
Definition: spr_error_process.h:63
void Execute() override
We initialize the metrics of the MMG sol using the Hessian metric matrix approach.
Definition: spr_error_process.cpp:42
#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
ModelPart::ConditionsContainerType ConditionsArrayType
Definition: error_mesh_criteria.h:83
KRATOS_CLASS_POINTER_DEFINITION(ErrorMeshCriteria)
ErrorMeshCriteria(Parameters ThisParameters=Parameters(R"({})"))
Default constructors.
Definition: error_mesh_criteria.h:100
ModelPart::NodesContainerType NodesArrayType
Definition: error_mesh_criteria.h:85
TSparseSpace SparseSpaceType
Definition: error_mesh_criteria.h:73
BaseType::TSystemVectorType TSystemVectorType
Definition: error_mesh_criteria.h:81
ErrorMeshCriteria(ErrorMeshCriteria const &rOther)
Copy constructor.
Definition: error_mesh_criteria.h:129
BaseType::DofsArrayType DofsArrayType
Definition: error_mesh_criteria.h:77
ConvergenceCriteria< TSparseSpace, TDenseSpace > BaseType
Definition: error_mesh_criteria.h:71
~ErrorMeshCriteria() override=default
Destructor.
bool PostCriteria(ModelPart &rModelPart, DofsArrayType &rDofSet, const TSystemMatrixType &A, const TSystemVectorType &Dx, const TSystemVectorType &b) override
Compute relative and absolute error.
Definition: error_mesh_criteria.h:161
std::size_t SizeType
Definition: error_mesh_criteria.h:89
void Initialize(ModelPart &rModelPart) override
This function initialize the convergence criteria.
Definition: error_mesh_criteria.h:147
BaseType::TDataType TDataType
Definition: error_mesh_criteria.h:75
std::size_t KeyType
Definition: error_mesh_criteria.h:87
BaseType::TSystemMatrixType TSystemMatrixType
Definition: error_mesh_criteria.h:79
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
b
Definition: generate_total_lagrangian_mixed_volumetric_strain_element.py:31
A
Definition: sensitivityMatrix.py:70