41 template<
class TEntity>
76 : mTypes(rOther.mTypes),
77 mIsInitialized(rOther.mIsInitialized)
90 mTypes = rOther.mTypes;
91 mIsInitialized = rOther.mIsInitialized;
104 bool IsInitialized()
const;
112 bool HasPrototypeEntity(
const GeometryType& rGeometry)
const;
119 const TEntity& GetPrototypeEntity(
typename GeometryType::Pointer pGeometry)
const;
126 const TEntity& GetPrototypeEntity(
const GeometryType& rGeometry)
const;
135 return "EntitityIdentifier";
141 rOStream <<
"EntitityIdentifier";
145 void PrintData(std::ostream& rOStream)
const;
152 std::array<const TEntity*, LengthArray> mTypes;
153 bool mIsInitialized =
false;
164 std::string GetEntityTypeName()
const;
171 void GenerateSingleType(
const std::string& rName);
178 void GenerateMultipleTypes(
const std::string& rName);
185 void GenerateTemplatedTypes(
const std::string& rName);
195 template<
class TEntity>
200 template<
class TEntity>
205 rOStream << std::endl;
246 template<
class TEntityType>
253 template<
class TEntityType>
259 auto& r_entities_array = GetEntities<TEntityType>(rModelPart);
267 [&r_current_process_info](TEntityType& rEntity) {
269 if (rEntity.IsActive()) {
270 rEntity.Initialize(r_current_process_info);
282 template<
class TEntityType>
292 GetEntities<TEntityType>(rModelPart),
293 [&r_current_process_info](TEntityType& rEntity){
294 rEntity.InitializeSolutionStep(r_current_process_info);
305 template<
class TEntityType>
315 GetEntities<TEntityType>(rModelPart),
316 [&r_current_process_info](TEntityType& rEntity){
317 rEntity.FinalizeSolutionStep(r_current_process_info);
328 template<
class TEntityType>
338 GetEntities<TEntityType>(rModelPart),
339 [&r_current_process_info](TEntityType& rEntity){
340 rEntity.InitializeNonLinearIteration(r_current_process_info);
351 template<
class TEntityType>
361 GetEntities<TEntityType>(rModelPart),
362 [&r_current_process_info](TEntityType& rEntity){
363 rEntity.FinalizeNonLinearIteration(r_current_process_info);
Template struct for entity identifier.
Definition: entities_utilities.h:43
KRATOS_CLASS_POINTER_DEFINITION(EntitityIdentifier)
Pointer definition of ReplaceElementsAndConditionsProcess.
EntitityIdentifier(const EntitityIdentifier &rOther)
Copy constructor.
Definition: entities_utilities.h:75
EntitityIdentifier()=default
Default constructor.
std::string Info() const
Turn back information as a string.
Definition: entities_utilities.h:133
typename TEntity::GeometryType GeometryType
Geometry type definition.
Definition: entities_utilities.h:49
void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: entities_utilities.cpp:95
EntitityIdentifier & operator=(const EntitityIdentifier &rOther)
Assignment operator.
Definition: entities_utilities.h:88
void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: entities_utilities.h:139
Geometry base class.
Definition: geometry.h:71
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
ProcessInfo & GetProcessInfo()
Definition: model_part.h:1746
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
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
#define KRATOS_API(...)
Definition: kratos_export_api.h:40
This namespace includes several utilities necessaries for the computation of entities functions in a ...
void InitializeSolutionStepEntities(ModelPart &rModelPart)
This method calls InitializeSolutionStep for all the entities.
Definition: entities_utilities.h:283
void InitializeAllEntities(ModelPart &rModelPart)
This method initializes all the active entities (conditions, elements, constraints)
Definition: entities_utilities.cpp:199
void InitializeEntities(ModelPart &rModelPart)
This method initializes all the active entities.
Definition: entities_utilities.h:254
void InitializeNonLinearIterationEntities(ModelPart &rModelPart)
This method calls InitializeNonLinearIteration for all the entities.
Definition: entities_utilities.h:329
void FinalizeNonLinearIterationAllEntities(ModelPart &rModelPart)
This method calls FinalizeNonLinearIteration for all the entities (conditions, elements,...
Definition: entities_utilities.cpp:243
void FinalizeNonLinearIterationEntities(ModelPart &rModelPart)
This method calls FinalizeNonLinearIteration for all the entities.
Definition: entities_utilities.h:352
void FinalizeSolutionStepEntities(ModelPart &rModelPart)
This method calls FinalizeSolutionStep for all the entities.
Definition: entities_utilities.h:306
std::ostream & operator<<(std::ostream &rOStream, const EntitityIdentifier< TEntity > &rThis)
output stream function
Definition: entities_utilities.h:201
void InitializeSolutionStepAllEntities(ModelPart &rModelPart)
This method calls InitializeSolution for all the entities (conditions, elements, constraints)
Definition: entities_utilities.cpp:210
void FinalizeSolutionStepAllEntities(ModelPart &rModelPart)
This method calls FinalizeSolutionStep for all the entities (conditions, elements,...
Definition: entities_utilities.cpp:221
std::istream & operator>>(std::istream &rIStream, EntitityIdentifier< TEntity > &rThis)
input stream function
void InitializeNonLinearIterationAllEntities(ModelPart &rModelPart)
This method calls InitializeNonLinearIteration for all the entities (conditions, elements,...
Definition: entities_utilities.cpp:232
PointerVectorSet< TEntityType, IndexedObject > & GetEntities(ModelPart &rModelPart)
This method returns the appropriate TEntitytype container (elements, conditions, and nodes) from mode...
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
void block_for_each(TIterator itBegin, TIterator itEnd, TFunction &&rFunction)
Execute a functor on all items of a range in parallel.
Definition: parallel_utilities.h:299
Geometry< Node > GeometryType
The definition of the geometry.
Definition: mortar_classes.h:37