38 template<
class TSparseSpace,
103 BaseType(NewRatioTolerance, AlwaysConvergedNorm)
134 typename BaseConvergenceCriteriaType::Pointer
Create(
Parameters ThisParameters)
const override
136 return Kratos::make_shared<ClassType>(ThisParameters);
157 const int rank = r_data_communicator.
Rank();
158 for (
auto& r_dof : rDofSet) {
159 if (r_dof.GetSolutionStepValue(PARTITION_INDEX) == rank) {
177 "name" : "trilinos_residual_criteria",
178 "residual_absolute_tolerance" : 1.0e-4,
179 "residual_relative_tolerance" : 1.0e-9
185 return default_parameters;
194 return "trilinos_residual_criteria";
210 std::string
Info()
const override
212 return "TrilionosResidualCriteria";
virtual const DataCommunicator & GetDataCommunicator() const
Definition: communicator.cpp:340
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
TSparseSpace::DataType TDataType
Data type definition.
Definition: convergence_criteria.h:70
TSparseSpace::VectorType TSystemVectorType
Vector type definition.
Definition: convergence_criteria.h:74
virtual int Rank() const
Get the parallel rank for this DataCommunicator.
Definition: data_communicator.h:587
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
Communicator & GetCommunicator()
Definition: model_part.h:1821
Dof< double > DofType
Dof type.
Definition: node.h:83
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
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
This is a convergence criteria that considers the residual as criteria.
Definition: residual_criteria.h:60
std::size_t IndexType
Definition of the IndexType.
Definition: residual_criteria.h:90
typename BaseType::TDataType TDataType
The data type.
Definition: residual_criteria.h:75
typename BaseType::TSystemVectorType TSystemVectorType
The dense vector type.
Definition: residual_criteria.h:87
IndexType mInitialDoFId
This vector contains the dofs that are active.
Definition: residual_criteria.h:355
void InitializeSolutionStep(ModelPart &rModelPart, DofsArrayType &rDofSet, const TSystemMatrixType &rA, const TSystemVectorType &rDx, const TSystemVectorType &rb) override
This function initializes the solution step.
Definition: residual_criteria.h:234
typename BaseType::TSystemMatrixType TSystemMatrixType
The sparse matrix type.
Definition: residual_criteria.h:84
std::vector< int > mActiveDofs
The norm at the beginning of the iterations.
Definition: residual_criteria.h:353
Parameters GetDefaultParameters() const override
This method provides the defaults parameters to avoid conflicts between the different constructors.
Definition: residual_criteria.h:276
typename Node::DofType DofType
The definition of the DoF data type.
Definition: residual_criteria.h:81
typename BaseType::DofsArrayType DofsArrayType
The dofs array type.
Definition: residual_criteria.h:78
MPI version of the ResidualCriteria.
Definition: trilinos_residual_criteria.h:43
TrilinosResidualCriteria(const TrilinosResidualCriteria &rOther)
Copy constructor.
Definition: trilinos_residual_criteria.h:111
KRATOS_CLASS_POINTER_DEFINITION(TrilinosResidualCriteria)
Pointer definition of TrilinosResidualCriteria.
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: trilinos_residual_criteria.h:216
void ComputeActiveDofs(ModelPart &rModelPart, const ModelPart::DofsArrayType &rDofSet) override
This method computes the active dofs.
Definition: trilinos_residual_criteria.h:241
Parameters GetDefaultParameters() const override
This method provides the defaults parameters to avoid conflicts between the different constructors.
Definition: trilinos_residual_criteria.h:173
TrilinosResidualCriteria()
Default constructor.
Definition: trilinos_residual_criteria.h:83
BaseConvergenceCriteriaType::Pointer Create(Parameters ThisParameters) const override
Create method.
Definition: trilinos_residual_criteria.h:134
void InitializeSolutionStep(ModelPart &rModelPart, DofsArrayType &rDofSet, const TSystemMatrixType &rA, const TSystemVectorType &rDx, const TSystemVectorType &rb) override
This function initializes the solution step.
Definition: trilinos_residual_criteria.h:147
std::string Info() const override
Turn back information as a string.
Definition: trilinos_residual_criteria.h:210
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: trilinos_residual_criteria.h:222
~TrilinosResidualCriteria() override
Destructor.
Definition: trilinos_residual_criteria.h:117
TrilinosResidualCriteria(Kratos::Parameters ThisParameters)
Default constructor. (with parameters)
Definition: trilinos_residual_criteria.h:92
static std::string Name()
Returns the name of the class as used in the settings (snake_case format)
Definition: trilinos_residual_criteria.h:192
TrilinosResidualCriteria(TDataType NewRatioTolerance, TDataType AlwaysConvergedNorm)
Constructor 2 arguments.
Definition: trilinos_residual_criteria.h:102
TrilinosResidualCriteria & operator=(TrilinosResidualCriteria const &rOther)=delete
Deleted assignment operator.
void DistributedComputeActiveDofs(ModelPart &rModelPart, std::vector< int > &rActiveDofs, const ModelPart::DofsArrayType &rDofSet, const std::size_t InitialDofId)
This method computes the active dofs.
Definition: constraint_utilities.cpp:70
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21