81 std::string
const& operator()(
const ModelPart& rModelPart)
const
83 return rModelPart.
Name();
316 IndexType CreateTimeStep(
double NewTime);
320 void OverwriteSolutionStepData(
IndexType SourceSolutionStepIndex,
IndexType DestinationSourceSolutionStepIndex);
335 void ReduceTimeStep(
ModelPart& rModelPart,
double NewTime);
348 void AddNode(NodeType::Pointer pNewNode,
IndexType ThisIndex = 0);
352 void AddNodes(std::vector<IndexType>
const& NodeIds,
IndexType ThisIndex = 0);
356 template<
class TIteratorType >
362 ModelPart* root_model_part = &this->GetRootModelPart();
364 for(TIteratorType it = nodes_begin; it!=nodes_end; it++)
366 auto it_found = root_model_part->
Nodes().find(it->Id());
367 if(it_found == root_model_part->
NodesEnd())
369 aux_root.push_back( *(it.base()) );
370 aux.push_back( *(it.base()) );
374 if(&(*it_found) != &(*it))
375 KRATOS_ERROR <<
"attempting to add a new node with Id :" << it_found->Id() <<
", unfortunately a (different) node with the same Id already exists" << std::endl;
377 aux.push_back( *(it.base()) );
382 for(
auto it = aux_root.begin(); it!=aux_root.end(); it++)
383 root_model_part->
Nodes().push_back( *(it.base()) );
384 root_model_part->
Nodes().Unique();
391 for(
auto it = aux.begin(); it!=aux.end(); it++)
392 current_part->
Nodes().push_back( *(it.base()) );
394 current_part->
Nodes().Unique();
404 NodeType::Pointer CreateNewNode(
int Id,
double x,
double y,
double z, VariablesList::Pointer pNewVariablesList,
IndexType ThisIndex = 0);
406 NodeType::Pointer CreateNewNode(
IndexType Id,
double x,
double y,
double z,
IndexType ThisIndex = 0);
408 NodeType::Pointer CreateNewNode(
IndexType Id,
double x,
double y,
double z,
double* pThisData,
IndexType ThisIndex = 0);
412 void AssignNode(NodeType::Pointer pThisNode,
IndexType ThisIndex = 0);
472 void RemoveNodes(
Flags IdentifierFlag = TO_ERASE);
479 void RemoveNodesFromAllLevels(
Flags IdentifierFlag = TO_ERASE);
485 const ModelPart& GetRootModelPart()
const;
537 <<
"Attempting to add the variable \"" << ThisVariable.
Name()
538 <<
"\" to the model part with name \"" << this->Name() <<
"\" which is not empty" << std::endl;
540 mpVariablesList->Add(ThisVariable);
546 return mpVariablesList->Has(ThisVariable);
551 return *mpVariablesList;
556 return *mpVariablesList;
561 return mpVariablesList;
564 void SetNodalSolutionStepVariablesList();
568 mpVariablesList = pNewVariablesList;
573 return mpVariablesList->DataSize();
578 return mpVariablesList->DataSize() * mBufferSize;
587 return mTables.size();
592 void AddTable(
IndexType TableId, TableType::Pointer pNewTable);
597 return mTables(TableId);
603 return mTables[TableId];
612 void RemoveTableFromAllLevels(
IndexType TableId);
617 return mTables.begin();
622 return mTables.begin();
627 return mTables.end();
632 return mTables.end();
642 return mTables.GetContainer();
686 void AddMasterSlaveConstraint(MasterSlaveConstraintType::Pointer pNewMasterSlaveConstraint,
IndexType ThisIndex = 0);
690 void AddMasterSlaveConstraints(std::vector<IndexType>
const& MasterSlaveConstraintIds,
IndexType ThisIndex = 0);
694 template<
class TIteratorType >
700 ModelPart* root_model_part = &this->GetRootModelPart();
702 for(TIteratorType it = constraints_begin; it!=constraints_end; it++)
708 aux.push_back( *(it.base()) );
712 if(&(*it_found) != &(*it))
713 KRATOS_ERROR <<
"attempting to add a new master-slave constraint with Id :" << it_found->Id() <<
", unfortunately a (different) master-slave constraint with the same Id already exists" << std::endl;
715 aux.push_back( *(it.base()) );
719 for(
auto it = aux_root.
begin(); it!=aux_root.
end(); it++)
728 for(
auto it = aux.begin(); it!=aux.end(); it++)
743 MasterSlaveConstraint::Pointer CreateNewMasterSlaveConstraint(
const std::string& ConstraintName,
745 DofsVectorType& rMasterDofsVector,
746 DofsVectorType& rSlaveDofsVector,
751 MasterSlaveConstraint::Pointer CreateNewMasterSlaveConstraint(
const std::string& ConstraintName,
754 const DoubleVariableType& rMasterVariable,
756 const DoubleVariableType& rSlaveVariable,
758 const double Constant,
764 void RemoveMasterSlaveConstraint(
IndexType MasterSlaveConstraintId,
IndexType ThisIndex = 0);
769 void RemoveMasterSlaveConstraint(MasterSlaveConstraintType& ThisMasterSlaveConstraint,
IndexType ThisIndex = 0);
774 void RemoveMasterSlaveConstraintFromAllLevels(
IndexType MasterSlaveConstraintId,
IndexType ThisIndex = 0);
779 void RemoveMasterSlaveConstraintFromAllLevels(MasterSlaveConstraintType& ThisMasterSlaveConstraint,
IndexType ThisIndex = 0);
786 void RemoveMasterSlaveConstraints(
Flags IdentifierFlag = TO_ERASE);
793 void RemoveMasterSlaveConstraintsFromAllLevels(
Flags IdentifierFlag = TO_ERASE);
809 MasterSlaveConstraintType::Pointer pGetMasterSlaveConstraint(
IndexType ConstraintId,
IndexType ThisIndex = 0);
812 MasterSlaveConstraintType& GetMasterSlaveConstraint(
IndexType MasterSlaveConstraintId,
IndexType ThisIndex = 0);
814 const MasterSlaveConstraintType& GetMasterSlaveConstraint(
IndexType MasterSlaveConstraintId,
IndexType ThisIndex = 0)
const ;
832 void AddProperties(PropertiesType::Pointer pNewProperties,
IndexType ThisIndex = 0);
857 PropertiesType::Pointer CreateNewProperties(
IndexType PropertiesId,
IndexType MeshIndex = 0);
866 PropertiesType::Pointer pGetProperties(
IndexType PropertiesId,
IndexType MeshIndex = 0);
875 const PropertiesType::Pointer pGetProperties(
IndexType PropertiesId,
IndexType MeshIndex = 0)
const;
902 const std::string& rAddress,
913 PropertiesType::Pointer pGetProperties(
914 const std::string& rAddress,
925 const PropertiesType::Pointer pGetProperties(
926 const std::string& rAddress,
938 const std::string& rAddress,
950 const std::string& rAddress,
1034 void AddElement(ElementType::Pointer pNewElement,
IndexType ThisIndex = 0);
1038 void AddElements(std::vector<IndexType>
const& ElementIds,
IndexType ThisIndex = 0);
1042 template<
class TIteratorType >
1048 ModelPart* root_model_part = &this->GetRootModelPart();
1050 for(TIteratorType it = elements_begin; it!=elements_end; it++)
1052 auto it_found = root_model_part->
Elements().find(it->Id());
1055 aux_root.push_back( *(it.base()) );
1056 aux.push_back( *(it.base()) );
1060 if(&(*it_found) != &(*it))
1061 KRATOS_ERROR <<
"attempting to add a new element with Id :" << it_found->Id() <<
", unfortunately a (different) element with the same Id already exists" << std::endl;
1063 aux.push_back( *(it.base()) );
1067 for(
auto it = aux_root.begin(); it!=aux_root.end(); it++)
1068 root_model_part->
Elements().push_back( *(it.base()) );
1069 root_model_part->
Elements().Unique();
1076 for(
auto it = aux.begin(); it!=aux.end(); it++)
1077 current_part->
Elements().push_back( *(it.base()) );
1089 IndexType Id, std::vector<IndexType> ElementNodeIds,
1090 PropertiesType::Pointer pProperties,
IndexType ThisIndex = 0);
1095 PropertiesType::Pointer pProperties,
IndexType ThisIndex = 0);
1099 IndexType Id,
typename GeometryType::Pointer pGeometry,
1100 PropertiesType::Pointer pProperties,
IndexType ThisIndex = 0);
1160 void RemoveElements(
Flags IdentifierFlag = TO_ERASE);
1167 void RemoveElementsFromAllLevels(
Flags IdentifierFlag = TO_ERASE);
1225 void AddCondition(ConditionType::Pointer pNewCondition,
IndexType ThisIndex = 0);
1229 void AddConditions(std::vector<IndexType>
const& ConditionIds,
IndexType ThisIndex = 0);
1233 template<
class TIteratorType >
1239 ModelPart* root_model_part = &this->GetRootModelPart();
1241 for(TIteratorType it = conditions_begin; it!=conditions_end; it++)
1243 auto it_found = root_model_part->
Conditions().find(it->Id());
1246 aux.push_back( *(it.base()) );
1247 aux_root.push_back( *(it.base()) );
1251 if(&(*it_found) != &(*it))
1252 KRATOS_ERROR <<
"attempting to add a new Condition with Id :" << it_found->Id() <<
", unfortunately a (different) Condition with the same Id already exists" << std::endl;
1254 aux.push_back( *(it.base()) );
1259 for(
auto it = aux_root.begin(); it!=aux_root.end(); it++)
1260 root_model_part->
Conditions().push_back( *(it.base()) );
1268 for(
auto it = aux.begin(); it!=aux.end(); it++)
1269 current_part->
Conditions().push_back( *(it.base()) );
1281 IndexType Id, std::vector<IndexType> ConditionNodeIds,
1282 PropertiesType::Pointer pProperties,
IndexType ThisIndex = 0);
1287 PropertiesType::Pointer pProperties,
IndexType ThisIndex = 0);
1291 IndexType Id,
typename GeometryType::Pointer pGeometry,
1292 PropertiesType::Pointer pProperties,
IndexType ThisIndex = 0);
1352 void RemoveConditions(
Flags IdentifierFlag = TO_ERASE);
1359 void RemoveConditionsFromAllLevels(
Flags IdentifierFlag = TO_ERASE);
1412 return mGeometries.NumberOfGeometries();
1420 GeometryType::Pointer CreateNewGeometry(
1421 const std::string& rGeometryTypeName,
1422 const std::vector<IndexType>& rGeometryNodeIds
1430 GeometryType::Pointer CreateNewGeometry(
1431 const std::string& rGeometryTypeName,
1440 GeometryType::Pointer CreateNewGeometry(
1441 const std::string& rGeometryTypeName,
1442 GeometryType::Pointer pGeometry
1451 GeometryType::Pointer CreateNewGeometry(
1452 const std::string& rGeometryTypeName,
1454 const std::vector<IndexType>& rGeometryNodeIds
1463 GeometryType::Pointer CreateNewGeometry(
1464 const std::string& rGeometryTypeName,
1475 GeometryType::Pointer CreateNewGeometry(
1476 const std::string& rGeometryTypeName,
1478 GeometryType::Pointer pGeometry
1487 GeometryType::Pointer CreateNewGeometry(
1488 const std::string& rGeometryTypeName,
1489 const std::string& rGeometryIdentifierName,
1490 const std::vector<IndexType>& rGeometryNodeIds
1499 GeometryType::Pointer CreateNewGeometry(
1500 const std::string& rGeometryTypeName,
1501 const std::string& rGeometryIdentifierName,
1511 GeometryType::Pointer CreateNewGeometry(
1512 const std::string& rGeometryTypeName,
1513 const std::string& rGeometryIdentifierName,
1514 GeometryType::Pointer pGeometry
1518 void AddGeometry(
typename GeometryType::Pointer pNewGeometry);
1521 void AddGeometries(std::vector<IndexType>
const& GeometriesIds);
1524 template<
class TIteratorType >
1528 std::vector<GeometryType::Pointer> aux, aux_root;
1529 ModelPart* p_root_model_part = &this->GetRootModelPart();
1531 for(TIteratorType it = GeometryBegin; it!=GeometriesEnd; it++) {
1534 aux_root.push_back( it.operator->() );
1535 aux.push_back( it.operator->() );
1537 if(&(*it_found) != &(*it)) {
1538 KRATOS_ERROR <<
"Attempting to add a new geometry with Id :" << it_found->Id() <<
", unfortunately a (different) element with the same Id already exists" << std::endl;
1540 aux.push_back( it.operator->() );
1546 for(
auto& p_geom : aux_root) {
1553 for(
auto& p_geom : aux) {
1565 return mGeometries.pGetGeometry(GeometryId);
1570 return mGeometries.pGetGeometry(GeometryId);
1575 return mGeometries.pGetGeometry(GeometryName);
1579 const typename GeometryType::Pointer
pGetGeometry(std::string GeometryName)
const {
1580 return mGeometries.pGetGeometry(GeometryName);
1585 return mGeometries.GetGeometry(GeometryId);
1590 return mGeometries.GetGeometry(GeometryId);
1595 return mGeometries.GetGeometry(GeometryName);
1600 return mGeometries.GetGeometry(GeometryName);
1606 return mGeometries.HasGeometry(GeometryId);
1611 return mGeometries.HasGeometry(GeometryName);
1616 void RemoveGeometry(
IndexType GeometryId);
1619 void RemoveGeometry(std::string GeometryName);
1622 void RemoveGeometryFromAllLevels(
IndexType GeometryId);
1625 void RemoveGeometryFromAllLevels(std::string GeometryName);
1630 return mGeometries.GeometriesBegin();
1635 return mGeometries.GeometriesBegin();
1640 return mGeometries.GeometriesEnd();
1645 return mGeometries.GeometriesEnd();
1652 return mGeometries.Geometries();
1658 return mGeometries.Geometries();
1667 return mSubModelParts.size();
1673 ModelPart& CreateSubModelPart(std::string
const& NewSubModelPartName);
1678 ModelPart& GetSubModelPart(std::string
const& SubModelPartName);
1683 const ModelPart& GetSubModelPart(std::string
const& SubModelPartName)
const;
1688 ModelPart* pGetSubModelPart(std::string
const& SubModelPartName);
1692 void RemoveSubModelPart(std::string
const& ThisSubModelPartName);
1696 void RemoveSubModelPart(
ModelPart& ThisSubModelPart);
1700 return mSubModelParts.begin();
1705 return mSubModelParts.begin();
1710 return mSubModelParts.end();
1715 return mSubModelParts.end();
1720 return mSubModelParts;
1725 return mSubModelParts;
1736 const ModelPart& GetParentModelPart()
const;
1740 bool HasSubModelPart(std::string
const& ThisSubModelPartName)
const;
1748 return *mpProcessInfo;
1753 return *mpProcessInfo;
1758 return mpProcessInfo;
1763 return mpProcessInfo;
1768 mpProcessInfo = pNewProcessInfo;
1773 *mpProcessInfo = NewProcessInfo;
1778 return mMeshes.size();
1783 return mMeshes(ThisIndex);
1788 return mMeshes(ThisIndex);
1793 return mMeshes[ThisIndex];
1798 return mMeshes[ThisIndex];
1823 return *mpCommunicator;
1828 return *mpCommunicator;
1833 return mpCommunicator;
1838 mpCommunicator = pNewCommunicator;
1852 std::string full_name = this->Name();
1853 if (this->IsSubModelPart()) {
1854 full_name = this->GetParentModelPart().FullName() +
"." + full_name;
1863 std::vector<std::string> GetSubModelPartNames()
const;
1870 void SetBufferSize(
IndexType NewBufferSize);
1882 virtual int Check()
const;
1895 return (mpParentModelPart != NULL);
1900 return mpCommunicator->IsDistributed();
1908 std::string
Info()
const override;
1911 void PrintInfo(std::ostream& rOStream)
const override;
1914 void PrintData(std::ostream& rOStream)
const override;
1917 virtual void PrintInfo(std::ostream& rOStream, std::string
const& PrefixString)
const;
1920 virtual void PrintData(std::ostream& rOStream, std::string
const& PrefixString)
const;
1935 ModelPart(VariablesList::Pointer pVariableList,
Model& rOwnerModel);
1938 ModelPart(std::string
const& NewName,VariablesList::Pointer pVariableList,
Model& rOwnerModel);
1941 ModelPart(std::string
const& NewName,
IndexType NewBufferSize,VariablesList::Pointer pVariableList,
Model& rOwnerModel);
1959 ProcessInfo::Pointer mpProcessInfo;
1967 VariablesList::Pointer mpVariablesList;
1969 Communicator::Pointer mpCommunicator;
1991 std::vector<IndexType> TrimComponentName(
const std::string& rStringName)
const
1993 std::vector<IndexType> list_indexes;
1995 std::stringstream ss(rStringName);
1996 for (std::string index_string; std::getline(ss, index_string,
'.'); ) {
1997 list_indexes.push_back(std::stoi(index_string));
2000 KRATOS_ERROR_IF(list_indexes.size() == 0) <<
"Properties:: Empty list of indexes when reading suproperties" << std::endl;
2002 return list_indexes;
2009 void SetBufferSizeSubModelParts(
IndexType NewBufferSize);
2012 void SetParentModelPart(
ModelPart* pParentModelPart)
2014 mpParentModelPart = pParentModelPart;
2017 template <
typename TEntitiesContainerType>
2018 void AddEntities(TEntitiesContainerType
const& Source, TEntitiesContainerType& rDestination, Flags Options)
2030 [[ noreturn ]]
void ErrorNonExistingSubModelPart(
const std::string& rSubModelPartName)
const;
2038 void save(
Serializer& rSerializer)
const override;
2083 rOStream << std::endl;
std::string Info() const override
Turn back information as a string.
Definition: periodic_interface_process.hpp:93
The Commmunicator class manages communication for distributed ModelPart instances.
Definition: communicator.h:67
Base class for all Conditions.
Definition: condition.h:59
Container for storing data values associated with variables.
Definition: data_value_container.h:63
ContainerType::size_type SizeType
Type of the container used for variables.
Definition: data_value_container.h:87
Dof represents a degree of freedom (DoF).
Definition: dof.h:86
Base class for all Elements.
Definition: element.h:60
std::size_t IndexType
Definition: flags.h:74
GeometriesMapType::const_iterator GeometryConstantIterator
Const Geometry Iterator.
Definition: geometry_container.h:68
GeometriesMapType::iterator GeometryIterator
Geometry Iterator.
Definition: geometry_container.h:65
Geometry base class.
Definition: geometry.h:71
A class that implements the interface for different master-slave constraints to be applied on a syste...
Definition: master_slave_constraint.h:76
SizeType NumberOfNodes() const
Definition: mesh.h:259
SizeType NumberOfElements() const
Definition: mesh.h:481
PropertiesIterator PropertiesEnd()
Definition: mesh.h:436
SizeType NumberOfConditions() const
Definition: mesh.h:604
MasterSlaveConstraintIteratorType MasterSlaveConstraintsBegin()
Definition: mesh.h:782
void SetConditions(typename ConditionsContainerType::Pointer pOtherConditions)
Definition: mesh.h:706
ElementsContainerType::Pointer pElements()
Definition: mesh.h:578
ElementType::Pointer pGetElement(IndexType ElementId)
Definition: mesh.h:494
NodesContainerType::ContainerType & NodesArray()
Definition: mesh.h:366
ConditionsContainerType & Conditions()
Definition: mesh.h:691
ElementIterator ElementsEnd()
Definition: mesh.h:558
ElementIterator ElementsBegin()
Definition: mesh.h:548
PropertiesContainerType::Pointer pProperties()
Definition: mesh.h:456
bool HasCondition(IndexType ConditionId) const
Definition: mesh.h:716
NodesContainerType & Nodes()
Definition: mesh.h:346
typename NodesContainerType::const_iterator NodeConstantIterator
Const iterator for nodes in the container. Provides direct references to nodes.
Definition: mesh.h:117
SizeType NumberOfMasterSlaveConstraints() const
Definition: mesh.h:726
bool HasElement(IndexType ElementId) const
Definition: mesh.h:594
PropertiesIterator PropertiesBegin()
Definition: mesh.h:426
ConditionIterator ConditionsBegin()
Definition: mesh.h:671
void SetNodes(typename NodesContainerType::Pointer pOtherNodes)
Definition: mesh.h:361
MasterSlaveConstraintContainerType & MasterSlaveConstraints()
Definition: mesh.h:802
ConditionsContainerType::Pointer pConditions()
Definition: mesh.h:701
bool HasNode(IndexType NodeId) const
Definition: mesh.h:371
NodeIterator NodesEnd()
Definition: mesh.h:336
typename PropertiesContainerType::iterator PropertiesIterator
Iterator for properties in the container. Provides direct references to properties.
Definition: mesh.h:123
ConditionsContainerType::ContainerType & ConditionsArray()
Definition: mesh.h:711
typename ConditionsContainerType::iterator ConditionIterator
Iterator for conditions in the container. Provides direct references to conditions.
Definition: mesh.h:153
ElementsContainerType::ContainerType & ElementsArray()
Definition: mesh.h:588
ElementType & GetElement(IndexType ElementId)
Definition: mesh.h:511
ConditionType::Pointer pGetCondition(IndexType ConditionId)
Definition: mesh.h:617
void SetProperties(typename PropertiesContainerType::Pointer pOtherProperties)
Definition: mesh.h:461
MasterSlaveConstraintIteratorType MasterSlaveConstraintsEnd()
Definition: mesh.h:792
typename ConditionsContainerType::const_iterator ConditionConstantIterator
Const iterator for conditions in the container. Provides direct references to conditions.
Definition: mesh.h:156
typename ElementsContainerType::const_iterator ElementConstantIterator
Const iterator for elements in the container. Provides direct references to elements.
Definition: mesh.h:141
NodesContainerType::Pointer pNodes()
Definition: mesh.h:356
NodeIterator NodesBegin()
Definition: mesh.h:326
PropertiesContainerType & Properties()
Definition: mesh.h:446
typename PropertiesContainerType::const_iterator PropertiesConstantIterator
Const iterator for properties in the container. Provides direct references to properties.
Definition: mesh.h:126
NodeType::Pointer pGetNode(IndexType NodeId)
Definition: mesh.h:272
bool HasMasterSlaveConstraint(IndexType MasterSlaveConstraintId) const
Definition: mesh.h:822
void SetElements(typename ElementsContainerType::Pointer pOtherElements)
Definition: mesh.h:583
NodeType & GetNode(IndexType NodeId)
Definition: mesh.h:289
ElementsContainerType & Elements()
Definition: mesh.h:568
PropertiesContainerType::ContainerType & PropertiesArray()
Definition: mesh.h:466
ConditionType & GetCondition(IndexType ConditionId)
Definition: mesh.h:634
ConditionIterator ConditionsEnd()
Definition: mesh.h:681
typename MasterSlaveConstraintContainerType::const_iterator MasterSlaveConstraintConstantIteratorType
Const iterator for master-slave constraints in the container. Provides direct references to constrain...
Definition: mesh.h:165
typename MasterSlaveConstraintContainerType::iterator MasterSlaveConstraintIteratorType
Iterator for master-slave constraints in the container. Provides direct references to constraints.
Definition: mesh.h:162
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
Matrix MatrixType
Definition: model_part.h:112
ElementIterator ElementsBegin(IndexType ThisIndex=0)
Definition: model_part.h:1169
MasterSlaveConstraintContainerType & MasterSlaveConstraints(IndexType ThisIndex=0)
Definition: model_part.h:654
void SetCommunicator(Communicator::Pointer pNewCommunicator)
Definition: model_part.h:1836
ConditionConstantIterator ConditionsEnd(IndexType ThisIndex=0) const
Definition: model_part.h:1376
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: model_part.cpp:2239
void SetNodes(NodesContainerType::Pointer pOtherNodes, IndexType ThisIndex=0)
Definition: model_part.h:522
ConditionType & GetCondition(IndexType ConditionId, IndexType ThisIndex=0)
Definition: model_part.h:1313
VariablesList const & GetNodalSolutionStepVariablesList() const
Definition: model_part.h:554
KRATOS_DEFINE_LOCAL_FLAG(OVERWRITE_ENTITIES)
MeshType::ConditionsContainerType ConditionsContainerType
Condintions container. A vector set of Conditions with their Id's as key.
Definition: model_part.h:183
ElementType::Pointer CreateNewElement(std::string ElementName, IndexType Id, Geometry< Node >::PointsArrayType pElementNodes, PropertiesType::Pointer pProperties, IndexType ThisIndex=0)
Creates new element with a nodes list.
SubModelPartIterator SubModelPartsEnd()
Definition: model_part.h:1708
TableConstantIterator TablesBegin() const
Definition: model_part.h:620
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: model_part.cpp:2246
GeometryType::Pointer pGetGeometry(IndexType GeometryId)
Returns the Geometry::Pointer corresponding to the Id.
Definition: model_part.h:1564
bool HasMasterSlaveConstraint(const IndexType MasterSlaveConstraintId, IndexType ThisIndex=0) const
Returns if the MasterSlaveConstraint corresponding to it's identifier exists.
Definition: model_part.h:800
MasterSlaveConstraintIteratorType MasterSlaveConstraintsBegin(IndexType ThisIndex=0)
Definition: model_part.h:674
GeometryContainerType::GeometriesMapType GeometriesMapType
Geometry Hash Map Container. Stores with hash of Ids to corresponding geometries.
Definition: model_part.h:246
void SetProcessInfo(ProcessInfo::Pointer pNewProcessInfo)
Definition: model_part.h:1766
MeshType::PropertiesContainerType PropertiesContainerType
Properties container. Which is a vector set of Properties with their Id's as key.
Definition: model_part.h:148
void SetProperties(PropertiesContainerType::Pointer pOtherProperties, IndexType ThisIndex=0)
Definition: model_part.h:1013
void AddElements(TIteratorType elements_begin, TIteratorType elements_end, IndexType ThisIndex=0)
Definition: model_part.h:1043
ConditionIterator ConditionsBegin(IndexType ThisIndex=0)
Definition: model_part.h:1361
ConditionConstantIterator ConditionsBegin(IndexType ThisIndex=0) const
Definition: model_part.h:1366
SubModelPartIterator SubModelPartsBegin()
Definition: model_part.h:1698
GeometryType & GetGeometry(std::string GeometryName)
Returns a reference geometry corresponding to the name.
Definition: model_part.h:1594
ElementType::Pointer CreateNewElement(std::string ElementName, IndexType Id, std::vector< IndexType > ElementNodeIds, PropertiesType::Pointer pProperties, IndexType ThisIndex=0)
Creates new element with a node ids list.
GeometryConstantIterator GeometriesBegin() const
Begin geometry const iterator.
Definition: model_part.h:1634
ConditionsContainerType::ContainerType & ConditionsArray(IndexType ThisIndex=0)
Definition: model_part.h:1401
ConditionType::Pointer CreateNewCondition(std::string ConditionName, IndexType Id, Geometry< Node >::PointsArrayType pConditionNodes, PropertiesType::Pointer pProperties, IndexType ThisIndex=0)
Creates new condition with a nodes list.
SizeType GetNodalSolutionStepDataSize()
Definition: model_part.h:571
ProcessInfo::Pointer pGetProcessInfo()
Definition: model_part.h:1756
PointerVectorMap< SizeType, TableType > TablesContainerType
The container of the tables. A vector map of the tables.
Definition: model_part.h:201
void RemoveNode(NodeType::Pointer pThisNode, IndexType ThisIndex=0)
GeometryType::Pointer pGetGeometry(std::string GeometryName)
Returns the Geometry::Pointer corresponding to the name.
Definition: model_part.h:1574
const GeometryType & GetGeometry(std::string GeometryName) const
Returns a const reference geometry corresponding to the name.
Definition: model_part.h:1599
bool IsSubModelPart() const
Definition: model_part.h:1893
std::string FullName() const
This method returns the full name of the model part (including the parents model parts)
Definition: model_part.h:1850
GeometryIterator GeometriesBegin()
Begin geometry iterator.
Definition: model_part.h:1629
TablesContainerType::iterator TableIterator
Definition: model_part.h:207
PropertiesIterator PropertiesBegin(IndexType ThisIndex=0)
Definition: model_part.h:978
SizeType NumberOfGeometries() const
Definition: model_part.h:1410
bool HasGeometry(IndexType GeometryId) const
Checks if has geometry by id.
Definition: model_part.h:1605
const GeometryType & GetGeometry(IndexType GeometryId) const
Returns a const reference geometry corresponding to the id.
Definition: model_part.h:1589
TableConstantIterator TablesEnd() const
Definition: model_part.h:630
const ElementsContainerType & Elements(IndexType ThisIndex=0) const
Definition: model_part.h:1194
void RemoveElementFromAllLevels(ElementType::Pointer pThisElement, IndexType ThisIndex=0)
MeshType::ElementsContainerType ElementsContainerType
Element container. A vector set of Elements with their Id's as key.
Definition: model_part.h:168
const ConditionsContainerType & Conditions(IndexType ThisIndex=0) const
Definition: model_part.h:1386
Element ElementType
Definition: model_part.h:120
Communicator & GetCommunicator()
Definition: model_part.h:1821
void RemoveNodeFromAllLevels(NodeType::Pointer pThisNode, IndexType ThisIndex=0)
const NodeType::Pointer pGetNode(const IndexType NodeId, const IndexType ThisIndex=0) const
Definition: model_part.h:427
MeshType::PropertiesConstantIterator PropertiesConstantIterator
Definition: model_part.h:160
Communicator::Pointer pGetCommunicator()
Definition: model_part.h:1831
MeshType::MasterSlaveConstraintIteratorType MasterSlaveConstraintIteratorType
Definition: model_part.h:225
std::size_t IndexType
Pointer definition of ModelPart.
Definition: model_part.h:105
NodeConstantIterator NodesEnd(IndexType ThisIndex=0) const
Definition: model_part.h:502
MasterSlaveConstraintConstantIteratorType MasterSlaveConstraintsEnd(IndexType ThisIndex=0) const
Definition: model_part.h:669
PropertiesConstantIterator PropertiesEnd(IndexType ThisIndex=0) const
Definition: model_part.h:993
Dof< double > DofType
Definition: model_part.h:109
SubModelPartsContainerType::const_iterator SubModelPartConstantIterator
Constant iterator over the sub model parts of this model part.
Definition: model_part.h:265
SizeType NumberOfSubModelParts() const
Definition: model_part.h:1665
std::string & Name()
Definition: model_part.h:1811
const ElementType & GetElement(IndexType ElementId, IndexType ThisIndex=0) const
Definition: model_part.h:1126
NodesContainerType::Pointer pNodes(IndexType ThisIndex=0)
Definition: model_part.h:517
MeshType::ConditionConstantIterator ConditionConstantIterator
Definition: model_part.h:195
PointerVectorSet< DofType > DofsArrayType
Definition: model_part.h:115
ElementType & GetElement(IndexType ElementId, IndexType ThisIndex=0)
Definition: model_part.h:1121
NodeConstantIterator NodesBegin(IndexType ThisIndex=0) const
Definition: model_part.h:492
SizeType NumberOfMasterSlaveConstraints(IndexType ThisIndex=0) const
Definition: model_part.h:649
IndexType GetBufferSize() const
This method gets the suffer size of the model part database.
Definition: model_part.h:1876
PointerHashMapSet< ModelPart, std::hash< std::string >, GetModelPartName, Kratos::shared_ptr< ModelPart > > SubModelPartsContainerType
The container of the sub model parts. A hash table is used.
Definition: model_part.h:251
void AddGeometries(TIteratorType GeometryBegin, TIteratorType GeometriesEnd, IndexType ThisIndex=0)
Inserts a list of geometries to a submodelpart provided their iterators.
Definition: model_part.h:1525
NodeIterator NodesBegin(IndexType ThisIndex=0)
Definition: model_part.h:487
ElementConstantIterator ElementsEnd(IndexType ThisIndex=0) const
Definition: model_part.h:1184
void SetElements(ElementsContainerType::Pointer pOtherElements, IndexType ThisIndex=0)
Definition: model_part.h:1204
std::size_t SizeType
Definition: model_part.h:107
SubModelPartsContainerType::iterator SubModelPartIterator
Iterator over the sub model parts of this model part.
Definition: model_part.h:258
GeometryIterator GeometriesEnd()
End geometry iterator.
Definition: model_part.h:1639
PointerVector< MeshType > MeshesContainerType
Definition: model_part.h:125
GeometriesMapType & Geometries()
Get geometry map container.
Definition: model_part.h:1650
VariablesList::Pointer pGetNodalSolutionStepVariablesList() const
Definition: model_part.h:559
ConditionsContainerType & Conditions(IndexType ThisIndex=0)
Definition: model_part.h:1381
ElementType::Pointer pGetElement(IndexType ElementId, IndexType ThisIndex=0)
Definition: model_part.h:1109
TableIterator TablesBegin()
Definition: model_part.h:615
bool HasNodalSolutionStepVariable(VariableData const &ThisVariable) const
Definition: model_part.h:544
ConditionType::Pointer pGetCondition(IndexType ConditionId, IndexType ThisIndex=0)
Definition: model_part.h:1301
const ProcessInfo::Pointer pGetProcessInfo() const
Definition: model_part.h:1761
void AddNodalSolutionStepVariable(VariableData const &ThisVariable)
Definition: model_part.h:532
SizeType NumberOfElements(IndexType ThisIndex=0) const
Definition: model_part.h:1027
TablesContainerType::const_iterator TableConstantIterator
Definition: model_part.h:213
MeshType::MasterSlaveConstraintContainerType MasterSlaveConstraintContainerType
Definition: model_part.h:219
MeshesContainerType const & GetMeshes() const
Definition: model_part.h:1806
TableType & GetTable(IndexType TableId)
Definition: model_part.h:601
const ConditionType & GetCondition(IndexType ConditionId, IndexType ThisIndex=0) const
Definition: model_part.h:1318
ProcessInfo & GetProcessInfo()
Definition: model_part.h:1746
const GeometriesMapType & Geometries() const
Get geometry map container.
Definition: model_part.h:1656
Mesh< NodeType, PropertiesType, ElementType, ConditionType > MeshType
Definition: model_part.h:123
const ConditionType::Pointer pGetCondition(const IndexType ConditionId, const IndexType ThisIndex=0) const
Definition: model_part.h:1307
NodesContainerType::ContainerType & NodesArray(IndexType ThisIndex=0)
Definition: model_part.h:527
GeometryContainer< GeometryType > GeometryContainerType
The Geometry Container.
Definition: model_part.h:237
MeshType::MasterSlaveConstraintConstantIteratorType MasterSlaveConstraintConstantIteratorType
Definition: model_part.h:231
SubModelPartConstantIterator SubModelPartsEnd() const
Definition: model_part.h:1713
const MasterSlaveConstraintContainerType & MasterSlaveConstraints(IndexType ThisIndex=0) const
Definition: model_part.h:659
const MeshType::Pointer pGetMesh(IndexType ThisIndex=0) const
Definition: model_part.h:1786
MeshType const & GetMesh(IndexType ThisIndex=0) const
Definition: model_part.h:1796
Node NodeType
Definition: model_part.h:117
ElementType::Pointer CreateNewElement(std::string ElementName, IndexType Id, typename GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties, IndexType ThisIndex=0)
Creates new element with pointer to geometry.
GeometryType & GetGeometry(IndexType GeometryId)
Returns a reference geometry corresponding to the id.
Definition: model_part.h:1584
OwnershipType
Definition: model_part.h:91
@ Kratos_Local
Definition: model_part.h:93
@ Kratos_Ghost
Definition: model_part.h:94
@ Kratos_All
Definition: model_part.h:92
void RemoveConditionFromAllLevels(ConditionType::Pointer pThisCondition, IndexType ThisIndex=0)
const GeometryType::Pointer pGetGeometry(IndexType GeometryId) const
Returns the const Geometry::Pointer corresponding to the Id.
Definition: model_part.h:1569
MeshType::NodeIterator NodeIterator
Definition: model_part.h:134
void AddMasterSlaveConstraints(TIteratorType constraints_begin, TIteratorType constraints_end, IndexType ThisIndex=0)
Definition: model_part.h:695
Geometry< NodeType > GeometryType
Definition: model_part.h:118
PropertiesContainerType::ContainerType & PropertiesArray(IndexType ThisIndex=0)
Definition: model_part.h:1018
void SetProcessInfo(ProcessInfo &NewProcessInfo)
Definition: model_part.h:1771
SizeType NumberOfMeshes()
Definition: model_part.h:1776
ElementsContainerType & Elements(IndexType ThisIndex=0)
Definition: model_part.h:1189
void RemovePropertiesFromAllLevels(PropertiesType::Pointer pThisProperties, IndexType ThisIndex=0)
Variable< double > DoubleVariableType
Definition: model_part.h:111
PropertiesContainerType & rProperties(IndexType ThisIndex=0)
Definition: model_part.h:1003
const ElementType::Pointer pGetElement(const IndexType ElementId, const IndexType ThisIndex=0) const
Definition: model_part.h:1115
ConditionType::Pointer CreateNewCondition(std::string ConditionName, IndexType Id, std::vector< IndexType > ConditionNodeIds, PropertiesType::Pointer pProperties, IndexType ThisIndex=0)
Creates new condition with a node ids list.
MeshesContainerType & GetMeshes()
Definition: model_part.h:1801
PropertiesConstantIterator PropertiesBegin(IndexType ThisIndex=0) const
Definition: model_part.h:983
MasterSlaveConstraintConstantIteratorType MasterSlaveConstraintsBegin(IndexType ThisIndex=0) const
Definition: model_part.h:664
std::vector< DofType::Pointer > DofsVectorType
Definition: model_part.h:110
PropertiesContainerType::Pointer pProperties(IndexType ThisIndex=0)
Definition: model_part.h:1008
bool IsDistributed() const
Definition: model_part.h:1898
ElementsContainerType::Pointer pElements(IndexType ThisIndex=0)
Definition: model_part.h:1199
NodeType::Pointer pGetNode(IndexType NodeId, IndexType ThisIndex=0)
Definition: model_part.h:421
void AddConditions(TIteratorType conditions_begin, TIteratorType conditions_end, IndexType ThisIndex=0)
Definition: model_part.h:1234
void AddGeometry(typename GeometryType::Pointer pNewGeometry)
Adds a geometry to the geometry container.
Definition: model_part.cpp:1905
const GeometryType::Pointer pGetGeometry(std::string GeometryName) const
Returns the Geometry::Pointer corresponding to the name.
Definition: model_part.h:1579
Table< double, double > TableType
Defining a table with double argument and result type as table type.
Definition: model_part.h:198
MeshType::NodesContainerType NodesContainerType
Nodes container. Which is a vector set of nodes with their Id's as key.
Definition: model_part.h:128
const NodeType & GetNode(IndexType NodeId, IndexType ThisIndex=0) const
Definition: model_part.h:438
SubModelPartsContainerType & SubModelParts()
Definition: model_part.h:1718
MasterSlaveConstraintIteratorType MasterSlaveConstraintsEnd(IndexType ThisIndex=0)
Definition: model_part.h:679
void RemoveCondition(ConditionType::Pointer pThisCondition, IndexType ThisIndex=0)
SizeType NumberOfConditions(IndexType ThisIndex=0) const
Definition: model_part.h:1218
GeometryConstantIterator GeometriesEnd() const
End geometry const iterator.
Definition: model_part.h:1644
TablesContainerType::ContainerType & TablesArray()
Definition: model_part.h:640
ElementIterator ElementsEnd(IndexType ThisIndex=0)
Definition: model_part.h:1179
MeshType::ElementIterator ElementIterator
Definition: model_part.h:174
SizeType GetNodalSolutionStepTotalDataSize()
Definition: model_part.h:576
const SubModelPartsContainerType & SubModelParts() const
Definition: model_part.h:1723
NodeType & GetNode(IndexType NodeId, IndexType ThisIndex=0)
Definition: model_part.h:433
TablesContainerType & Tables()
Definition: model_part.h:635
MeshType::Pointer pGetMesh(IndexType ThisIndex=0)
Definition: model_part.h:1781
void AddNodes(TIteratorType nodes_begin, TIteratorType nodes_end, IndexType ThisIndex=0)
Definition: model_part.h:357
bool HasElement(IndexType ElementId, IndexType ThisIndex=0) const
Definition: model_part.h:1103
const Model & GetModel() const
Definition: model_part.h:328
SizeType NumberOfNodes(IndexType ThisIndex=0) const
Definition: model_part.h:341
TableIterator TablesEnd()
Definition: model_part.h:625
ElementConstantIterator ElementsBegin(IndexType ThisIndex=0) const
Definition: model_part.h:1174
bool HasCondition(IndexType ConditionId, IndexType ThisIndex=0) const
Definition: model_part.h:1295
MeshType::PropertiesIterator PropertiesIterator
Definition: model_part.h:154
void SetNodalSolutionStepVariablesList(VariablesList::Pointer pNewVariablesList)
Definition: model_part.h:566
Communicator const & GetCommunicator() const
Definition: model_part.h:1826
std::string const & Name() const
Definition: model_part.h:1816
SubModelPartConstantIterator SubModelPartsBegin() const
Definition: model_part.h:1703
void RemoveElement(ElementType::Pointer pThisElement, IndexType ThisIndex=0)
const NodesContainerType & Nodes(IndexType ThisIndex=0) const
Definition: model_part.h:512
ConditionsContainerType::Pointer pConditions(IndexType ThisIndex=0)
Definition: model_part.h:1391
Properties PropertiesType
Definition: model_part.h:119
void SetConditions(ConditionsContainerType::Pointer pOtherConditions, IndexType ThisIndex=0)
Definition: model_part.h:1396
SizeType NumberOfTables() const
Definition: model_part.h:585
ConditionType::Pointer CreateNewCondition(std::string ConditionName, IndexType Id, typename GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties, IndexType ThisIndex=0)
Creates new condition with pointer to geometry.
NodeIterator NodesEnd(IndexType ThisIndex=0)
Definition: model_part.h:497
GeometryContainerType::GeometryIterator GeometryIterator
Geometry Iterator.
Definition: model_part.h:240
ModelPart & GetParentModelPart()
Definition: model_part.cpp:2124
TableType::Pointer pGetTable(IndexType TableId)
Definition: model_part.h:595
GeometryContainerType::GeometryConstantIterator GeometryConstantIterator
Const Geometry Iterator.
Definition: model_part.h:243
MeshType::ConditionIterator ConditionIterator
Definition: model_part.h:189
MeshType & GetMesh(IndexType ThisIndex=0)
Definition: model_part.h:1791
MeshType::MasterSlaveConstraintType MasterSlaveConstraintType
The container of the constraints.
Definition: model_part.h:218
ProcessInfo const & GetProcessInfo() const
Definition: model_part.h:1751
PropertiesIterator PropertiesEnd(IndexType ThisIndex=0)
Definition: model_part.h:988
bool HasGeometry(std::string GeometryName) const
Checks if has geometry by name.
Definition: model_part.h:1610
ModelPart & operator=(ModelPart const &rOther)=delete
Assignment operator.
NodesContainerType & Nodes(IndexType ThisIndex=0)
Definition: model_part.h:507
Model & GetModel()
Definition: model_part.h:323
MeshType::ElementConstantIterator ElementConstantIterator
Definition: model_part.h:180
MeshType::NodeConstantIterator NodeConstantIterator
Definition: model_part.h:140
Vector VectorType
Definition: model_part.h:113
VariablesList & GetNodalSolutionStepVariablesList()
Definition: model_part.h:549
bool HasNode(IndexType NodeId, IndexType ThisIndex=0) const
Definition: model_part.h:415
Condition ConditionType
Definition: model_part.h:121
void RemoveProperties(PropertiesType::Pointer pThisProperties, IndexType ThisIndex=0)
ConditionIterator ConditionsEnd(IndexType ThisIndex=0)
Definition: model_part.h:1371
KRATOS_DEFINE_LOCAL_FLAG(ALL_ENTITIES)
ElementsContainerType::ContainerType & ElementsArray(IndexType ThisIndex=0)
Definition: model_part.h:1209
This class defines the node.
Definition: node.h:65
iterator_adaptor iterator
Definition: pointer_hash_map_set.h:153
iterator find(const key_type &Key)
Definition: pointer_hash_map_set.h:340
const_iterator_adaptor const_iterator
Definition: pointer_hash_map_set.h:154
std::vector< std::pair< SizeType, Kratos::shared_ptr< TableType > > > ContainerType
Definition: pointer_vector_map.h:89
Short class definition.
Definition: pointer_vector_map_iterator.h:63
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
void push_back(TPointerType x)
Adds a pointer to the end of the set.
Definition: pointer_vector_set.h:544
TContainerType ContainerType
Definition: pointer_vector_set.h:90
iterator begin()
Returns an iterator pointing to the beginning of the container.
Definition: pointer_vector_set.h:278
iterator end()
Returns an iterator pointing to the end of the container.
Definition: pointer_vector_set.h:314
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
Properties encapsulates data shared by different Elements or Conditions. It can store any type of dat...
Definition: properties.h:69
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
This class is the base of variables and variable's components which contains their common data.
Definition: variable_data.h:49
const std::string & Name() const
Definition: variable_data.h:201
Holds a list of variables and their position in VariablesListDataValueContainer.
Definition: variables_list.h:50
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
std::size_t IndexType
The definition of the index type.
Definition: key_hash.h:35
#define KRATOS_ERROR
Definition: exception.h:161
#define KRATOS_ERROR_IF(conditional)
Definition: exception.h:162
#define KRATOS_API(...)
Definition: kratos_export_api.h:40
Kratos::ModelPart ModelPart
Definition: kratos_wrapper.h:31
z
Definition: GenerateWind.py:163
ModelPart::MeshType & GetMesh(ModelPart &rModelPart)
const std::string GetModelPartName(ModelPart const &rModelPart)
Definition: add_model_part_to_python.cpp:49
bool HasNodalSolutionStepVariable(ModelPart &rModelPart, Variable< TDataType > const &rThisVariable)
Definition: add_model_part_to_python.cpp:39
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
MeshType::ElementIterator ElementIterator
Definition: regenerate_pfem_pressure_conditions_process.h:31
ModelPart::NodesContainerType NodesContainerType
Definition: find_conditions_neighbours_process.h:44
std::shared_ptr< T > shared_ptr
Definition: smart_pointers.h:27
ModelPart::ConditionsContainerType ConditionsContainerType
Definition: find_conditions_neighbours_process.h:45
std::size_t SizeType
The definition of the size type.
Definition: mortar_classes.h:43
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
ModelPart::ElementsContainerType ElementsContainerType
Definition: clear_contact_conditions_mesher_process.hpp:43
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
y
Other simbols definition.
Definition: generate_axisymmetric_navier_stokes_element.py:54
def load(f)
Definition: ode_solve.py:307
dictionary Model
TODO replace this "model" for real one once available in kratos core.
Definition: script.py:94
x
Definition: sensitivityMatrix.py:49
Configure::ContainerType ContainerType
Definition: transfer_utility.h:247