13 #if !defined(KRATOS_FROM_JSON_CHECK_RESULT_PROCESS_H_INCLUDED )
14 #define KRATOS_FROM_JSON_CHECK_RESULT_PROCESS_H_INCLUDED
140 void ExecuteFinalize()
override;
145 int Check()
override;
153 return this->Is(CORRECT_RESULT);
162 return mErrorMessage;
170 std::string
Info()
const override
172 return "FromJSONCheckResultProcess";
178 rOStream <<
"FromJSONCheckResultProcess";
194 void InitializeDatabases();
201 void FillVariablesList(
202 const std::vector<std::string>& rNodalVariablesNames,
203 const std::vector<std::string>& rGPVariablesNames
211 template<
class TEntity>
213 const TEntity& rEntity,
217 if (pFlag !=
nullptr) {
218 if (rEntity.IsNot(*pFlag)) {
231 const double ValueEntity,
232 const double ValueJSON
247 const std::string& rEntityType,
248 const double ValueEntity,
249 const double ValueJSON,
250 const std::string& rVariableName,
251 const int ComponentIndex = -1,
252 const int GPIndex = -1
259 void CheckNodeValues(
IndexType& rCheckCounter);
265 void CheckNodeHistoricalValues(
IndexType& rCheckCounter);
271 void CheckGPValues(
IndexType& rCheckCounter);
297 std::string GetNodeIdentifier(
NodeType& rNode);
319 const Parameters GetDefaultParameters()
const override;
368 double mRelativeTolerance;
369 double mAbsoluteTolerance;
373 double mTimeCounter = 0.0;
380 std::vector<const Variable<double>*> mpNodalVariableDoubleList;
381 std::vector<const Variable<array_1d<double,3>>*> mpNodalVariableArrayList;
382 std::vector<const Variable<Vector>*> mpNodalVariableVectorList;
384 std::vector<const Variable<double>*> mpGPVariableDoubleList;
385 std::vector<const Variable<array_1d<double,3>>*> mpGPVariableArrayList;
386 std::vector<const Variable<Vector>*> mpGPVariableVectorList;
393 std::string mErrorMessage =
"";
428 rOStream << std::endl;
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
void ExecuteFinalizeSolutionStep() override
this function will be executed at every time step AFTER performing the solve phase
Definition: periodic_interface_process.hpp:55
void ExecuteInitialize() override
Definition: periodic_interface_process.hpp:37
This class is used in order to check results using a json file containing the solution a given model ...
Definition: from_json_check_result_process.h:57
KRATOS_DEFINE_LOCAL_FLAG(ELEMENTS_CONTAINER_INITIALIZED)
This flag is used in order to check that nodes container are initialized.
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: from_json_check_result_process.h:176
KRATOS_DEFINE_LOCAL_FLAG(NODES_CONTAINER_INITIALIZED)
This flag is used in order to check only local entities.
virtual ~FromJSONCheckResultProcess()
Destructor.
Definition: from_json_check_result_process.h:112
KRATOS_DEFINE_LOCAL_FLAG(CHECK_ONLY_LOCAL_ENTITIES)
This flag is used in order to check if the values are historical.
KRATOS_DEFINE_LOCAL_FLAG(ELEMENTS_DATABASE_INITIALIZED)
This flag is used in order to check that nodes database are initialized.
KRATOS_DEFINE_LOCAL_FLAG(NODES_DATABASE_INITIALIZED)
This flag is used in order to check that elements container are initialized.
KRATOS_DEFINE_LOCAL_FLAG(HISTORICAL_VALUE)
This flag is used in order to check that the result is correct.
bool CheckFlag(const TEntity &rEntity, const Flags *pFlag)
This method checks if a flag is active in a given entity.
Definition: from_json_check_result_process.h:212
KRATOS_CLASS_POINTER_DEFINITION(FromJSONCheckResultProcess)
Pointer definition of FromJSONCheckResultProcess.
std::size_t IndexType
The definition of the index type.
Definition: from_json_check_result_process.h:82
KRATOS_DEFINE_LOCAL_FLAG(CORRECT_RESULT)
Local Flags.
void operator()()
Definition: from_json_check_result_process.h:118
std::string Info() const override
Turn back information as a string.
Definition: from_json_check_result_process.h:170
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: from_json_check_result_process.h:182
FromJSONCheckResultProcess(ModelPart &rModelPart, Parameters Settings, Parameters DefaultSettings)
Protected constructor with modified default settings to be defined by derived class.
std::size_t SizeType
The definition of the sizetype.
Definition: from_json_check_result_process.h:85
Node NodeType
The node type definiton.
Definition: from_json_check_result_process.h:79
std::string GetErrorMessage()
This function returns the error message.
Definition: from_json_check_result_process.h:160
ModelPart::NodesContainerType NodesArrayType
This flag is used in order to check that elements database are initialized.
Definition: from_json_check_result_process.h:75
ModelPart::ElementsContainerType ElementsArrayType
Definition: from_json_check_result_process.h:76
bool IsCorrectResult()
This function returns if the result is correct.
Definition: from_json_check_result_process.h:151
This class aims to manage different model parts across multi-physics simulations.
Definition: model.h:60
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
This class defines the node.
Definition: node.h:65
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
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
The base class for all processes in Kratos.
Definition: process.h:49
This class stores the results of a simulation for a later comparison.
Definition: result_dabatase.h:403
std::size_t IndexType
The definition of the index type.
Definition: key_hash.h:35
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
std::size_t SizeType
The definition of the size type.
Definition: mortar_classes.h:43
ModelPart::NodesContainerType NodesArrayType
Definition: gid_gauss_point_container.h:42
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
def ComputeRelevantDigits(number)
Computes the relevant digits.
Definition: particle_from_json_check_result_process.py:308
def CheckValues(test_unit, value_a, value_b, tolerance)
Definition: test_utilities.py:46