KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
model_part.h
Go to the documentation of this file.
1 // | / |
2 // ' / __| _` | __| _ \ __|
3 // . \ | ( | | ( |\__ `
4 // _|\_\_| \__,_|\__|\___/ ____/
5 // Multi-Physics
6 //
7 // License: BSD License
8 // Kratos default license: kratos/license.txt
9 //
10 // Main authors: Pooyan Dadvand
11 //
12 //
13 
14 #pragma once
15 
16 // System includes
17 #include <string>
18 #include <iostream>
19 #include <sstream>
20 #include <cstddef>
21 
22 // External includes
23 
24 // Project includes
25 #include "includes/define.h"
26 #include "includes/serializer.h"
27 #include "includes/process_info.h"
29 #include "includes/mesh.h"
31 #include "includes/element.h"
32 #include "includes/condition.h"
33 #include "includes/communicator.h"
34 #include "includes/table.h"
37 #include "input_output/logger.h"
38 #include "includes/kratos_flags.h"
40 #include "containers/variable.h"
42 
43 namespace Kratos
44 {
45 
48 
52 
56 
60 
64 
65 //forward declaring Model to be avoid cross references
66 class Model;
67 
75 class KRATOS_API(KRATOS_CORE) ModelPart final
76  : public DataValueContainer, public Flags
77 {
78  class GetModelPartName
79  {
80  public:
81  std::string const& operator()(const ModelPart& rModelPart) const
82  {
83  return rModelPart.Name();
84  }
85  };
86 public:
89 
91  {
95  Kratos_Ownership_Size
96  };
97 
101 
103  //KRATOS_CLASS_POINTER_DEFINITION(ModelPart); //INTENTIONALLY REMOVING DEFINITION - DO NOT UNCOMMENT
104 
105  typedef std::size_t IndexType;
106 
107  typedef std::size_t SizeType;
108 
110  typedef std::vector< DofType::Pointer > DofsVectorType;
114 
116 
117  typedef Node NodeType;
122 
124 
126 
129 
134  typedef MeshType::NodeIterator NodeIterator;
135 
141 
149 
155 
161 
169 
175 
181 
184 
190 
196 
199 
202 
208 
220 
226 
232 
234 
238 
241 
244 
247 
249 
252 
254 
259 
261 
266 
270 
272  KRATOS_DEFINE_LOCAL_FLAG(OVERWRITE_ENTITIES);
273 
277 
278 
280  ~ModelPart() override;
281 
285 
287  ModelPart & operator=(ModelPart const& rOther) = delete;
288 
291  void Clear();
292 
295  void Reset();
296 
300 
301  IndexType CreateSolutionStep();
302 
303  IndexType CloneSolutionStep();
304 
305  // commented due to a bug, Pooyan.
306  // IndexType CreateTimeStep()
307  // {
308  // IndexType new_index = CreateSolutionStep();
309  // mProcessInfo.SetAsTimeStepInfo();
310 
311  // return new_index;
312  // }
313 
314  IndexType CloneTimeStep();
315 
316  IndexType CreateTimeStep(double NewTime);
317 
318  IndexType CloneTimeStep(double NewTime);
319 
320  void OverwriteSolutionStepData(IndexType SourceSolutionStepIndex, IndexType DestinationSourceSolutionStepIndex);
321 
322  //this function returns the "Owner" Model
324  {
325  return mrModel;
326  }
327 
328  const Model& GetModel() const
329  {
330  return mrModel;
331  }
332 
335  void ReduceTimeStep(ModelPart& rModelPart, double NewTime);
336 
340 
341  SizeType NumberOfNodes(IndexType ThisIndex = 0) const
342  {
343  return GetMesh(ThisIndex).NumberOfNodes();
344  }
345 
348  void AddNode(NodeType::Pointer pNewNode, IndexType ThisIndex = 0);
349 
352  void AddNodes(std::vector<IndexType> const& NodeIds, IndexType ThisIndex = 0);
353 
356  template<class TIteratorType >
357  void AddNodes(TIteratorType nodes_begin, TIteratorType nodes_end, IndexType ThisIndex = 0)
358  {
359  KRATOS_TRY
361  ModelPart::NodesContainerType aux_root; //they may not exist in the root
362  ModelPart* root_model_part = &this->GetRootModelPart();
363 
364  for(TIteratorType it = nodes_begin; it!=nodes_end; it++)
365  {
366  auto it_found = root_model_part->Nodes().find(it->Id());
367  if(it_found == root_model_part->NodesEnd()) //node does not exist in the top model part
368  {
369  aux_root.push_back( *(it.base()) ); //node does not exist
370  aux.push_back( *(it.base()) );
371  }
372  else //if it does exist verify it is the same node
373  {
374  if(&(*it_found) != &(*it))//check if the pointee coincides
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;
376  else
377  aux.push_back( *(it.base()) );
378  }
379  }
380 
381  //now add to the root model part
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();
385 
386  //add to all of the leaves
387 
388  ModelPart* current_part = this;
389  while(current_part->IsSubModelPart())
390  {
391  for(auto it = aux.begin(); it!=aux.end(); it++)
392  current_part->Nodes().push_back( *(it.base()) );
393 
394  current_part->Nodes().Unique();
395 
396  current_part = &(current_part->GetParentModelPart());
397  }
398 
399  KRATOS_CATCH("")
400  }
401 
404  NodeType::Pointer CreateNewNode(int Id, double x, double y, double z, VariablesList::Pointer pNewVariablesList, IndexType ThisIndex = 0);
405 
406  NodeType::Pointer CreateNewNode(IndexType Id, double x, double y, double z, IndexType ThisIndex = 0);
407 
408  NodeType::Pointer CreateNewNode(IndexType Id, double x, double y, double z, double* pThisData, IndexType ThisIndex = 0);
409 
410  NodeType::Pointer CreateNewNode(IndexType NodeId, NodeType const& rSourceNode, IndexType ThisIndex = 0);
411 
412  void AssignNode(NodeType::Pointer pThisNode, IndexType ThisIndex = 0);
413 
415  bool HasNode(IndexType NodeId, IndexType ThisIndex = 0) const
416  {
417  return GetMesh(ThisIndex).HasNode(NodeId);
418  }
419 
421  NodeType::Pointer pGetNode(IndexType NodeId, IndexType ThisIndex = 0)
422  {
423  return GetMesh(ThisIndex).pGetNode(NodeId);
424  }
425 
427  const NodeType::Pointer pGetNode(const IndexType NodeId, const IndexType ThisIndex = 0) const
428  {
429  return GetMesh(ThisIndex).pGetNode(NodeId);
430  }
431 
433  NodeType& GetNode(IndexType NodeId, IndexType ThisIndex = 0)
434  {
435  return GetMesh(ThisIndex).GetNode(NodeId);
436  }
437 
438  const NodeType& GetNode(IndexType NodeId, IndexType ThisIndex = 0) const
439  {
440  return GetMesh(ThisIndex).GetNode(NodeId);
441  }
442 
445  void RemoveNode(IndexType NodeId, IndexType ThisIndex = 0);
446 
449  void RemoveNode(NodeType& ThisNode, IndexType ThisIndex = 0);
450 
453  void RemoveNode(NodeType::Pointer pThisNode, IndexType ThisIndex = 0);
454 
457  void RemoveNodeFromAllLevels(IndexType NodeId, IndexType ThisIndex = 0);
458 
461  void RemoveNodeFromAllLevels(NodeType& ThisNode, IndexType ThisIndex = 0);
462 
465  void RemoveNodeFromAllLevels(NodeType::Pointer pThisNode, IndexType ThisIndex = 0);
466 
472  void RemoveNodes(Flags IdentifierFlag = TO_ERASE);
473 
479  void RemoveNodesFromAllLevels(Flags IdentifierFlag = TO_ERASE);
480 
482  ModelPart& GetRootModelPart();
483 
485  const ModelPart& GetRootModelPart() const;
486 
488  {
489  return GetMesh(ThisIndex).NodesBegin();
490  }
491 
493  {
494  return GetMesh(ThisIndex).NodesBegin();
495  }
496 
498  {
499  return GetMesh(ThisIndex).NodesEnd();
500  }
501 
503  {
504  return GetMesh(ThisIndex).NodesEnd();
505  }
506 
508  {
509  return GetMesh(ThisIndex).Nodes();
510  }
511 
512  const NodesContainerType& Nodes(IndexType ThisIndex = 0) const
513  {
514  return GetMesh(ThisIndex).Nodes();
515  }
516 
517  NodesContainerType::Pointer pNodes(IndexType ThisIndex = 0)
518  {
519  return GetMesh(ThisIndex).pNodes();
520  }
521 
522  void SetNodes(NodesContainerType::Pointer pOtherNodes, IndexType ThisIndex = 0)
523  {
524  GetMesh(ThisIndex).SetNodes(pOtherNodes);
525  }
526 
528  {
529  return GetMesh(ThisIndex).NodesArray();
530  }
531 
532  void AddNodalSolutionStepVariable(VariableData const& ThisVariable)
533  {
534  if (!HasNodalSolutionStepVariable(ThisVariable)) {
535  // This error prevents memory leaks if variables are being added to a non-empty modelpart
536  KRATOS_ERROR_IF((this->GetRootModelPart()).Nodes().size() != 0)
537  << "Attempting to add the variable \"" << ThisVariable.Name()
538  << "\" to the model part with name \"" << this->Name() << "\" which is not empty" << std::endl;
539 
540  mpVariablesList->Add(ThisVariable);
541  }
542  }
543 
544  bool HasNodalSolutionStepVariable(VariableData const& ThisVariable) const
545  {
546  return mpVariablesList->Has(ThisVariable);
547  }
548 
550  {
551  return *mpVariablesList;
552  }
553 
555  {
556  return *mpVariablesList;
557  }
558 
559  VariablesList::Pointer pGetNodalSolutionStepVariablesList() const
560  {
561  return mpVariablesList;
562  }
563 
564  void SetNodalSolutionStepVariablesList();
565 
566  void SetNodalSolutionStepVariablesList(VariablesList::Pointer pNewVariablesList)
567  {
568  mpVariablesList = pNewVariablesList;
569  }
570 
572  {
573  return mpVariablesList->DataSize();
574  }
575 
577  {
578  return mpVariablesList->DataSize() * mBufferSize;
579  }
580 
584 
586  {
587  return mTables.size();
588  }
589 
592  void AddTable(IndexType TableId, TableType::Pointer pNewTable);
593 
595  TableType::Pointer pGetTable(IndexType TableId)
596  {
597  return mTables(TableId);
598  }
599 
602  {
603  return mTables[TableId];
604  }
605 
608  void RemoveTable(IndexType TableId);
609 
612  void RemoveTableFromAllLevels(IndexType TableId);
613 
614 
616  {
617  return mTables.begin();
618  }
619 
621  {
622  return mTables.begin();
623  }
624 
626  {
627  return mTables.end();
628  }
629 
631  {
632  return mTables.end();
633  }
634 
636  {
637  return mTables;
638  }
639 
641  {
642  return mTables.GetContainer();
643  }
644 
648 
650  {
651  return GetMesh(ThisIndex).NumberOfMasterSlaveConstraints();
652  }
653 
655  {
656  return GetMesh(ThisIndex).MasterSlaveConstraints();
657  }
658 
660  {
661  return GetMesh(ThisIndex).MasterSlaveConstraints();
662  }
663 
665  {
666  return GetMesh(ThisIndex).MasterSlaveConstraintsBegin();
667  }
668 
670  {
671  return GetMesh(ThisIndex).MasterSlaveConstraintsEnd();
672  }
673 
675  {
676  return GetMesh(ThisIndex).MasterSlaveConstraintsBegin();
677  }
678 
680  {
681  return GetMesh(ThisIndex).MasterSlaveConstraintsEnd();
682  }
683 
686  void AddMasterSlaveConstraint(MasterSlaveConstraintType::Pointer pNewMasterSlaveConstraint, IndexType ThisIndex = 0);
687 
690  void AddMasterSlaveConstraints(std::vector<IndexType> const& MasterSlaveConstraintIds, IndexType ThisIndex = 0);
691 
694  template<class TIteratorType >
695  void AddMasterSlaveConstraints(TIteratorType constraints_begin, TIteratorType constraints_end, IndexType ThisIndex = 0)
696  {
697  KRATOS_TRY
700  ModelPart* root_model_part = &this->GetRootModelPart();
701 
702  for(TIteratorType it = constraints_begin; it!=constraints_end; it++)
703  {
704  auto it_found = root_model_part->MasterSlaveConstraints().find(it->Id());
705  if(it_found == root_model_part->MasterSlaveConstraintsEnd()) //node does not exist in the top model part
706  {
707  aux_root.push_back( *(it.base()) );
708  aux.push_back( *(it.base()) );
709  }
710  else //if it does exist verify it is the same node
711  {
712  if(&(*it_found) != &(*it))//check if the pointee coincides
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;
714  else
715  aux.push_back( *(it.base()) );
716  }
717  }
718 
719  for(auto it = aux_root.begin(); it!=aux_root.end(); it++)
720  root_model_part->MasterSlaveConstraints().push_back( *(it.base()) );
721  root_model_part->MasterSlaveConstraints().Unique();
722 
723  //add to all of the leaves
724 
725  ModelPart* current_part = this;
726  while(current_part->IsSubModelPart())
727  {
728  for(auto it = aux.begin(); it!=aux.end(); it++)
729  current_part->MasterSlaveConstraints().push_back( *(it.base()) );
730 
731  current_part->MasterSlaveConstraints().Unique();
732 
733  current_part = &(current_part->GetParentModelPart());
734  }
735 
736  KRATOS_CATCH("")
737  }
738 
743  MasterSlaveConstraint::Pointer CreateNewMasterSlaveConstraint(const std::string& ConstraintName,
744  IndexType Id,
745  DofsVectorType& rMasterDofsVector,
746  DofsVectorType& rSlaveDofsVector,
747  const MatrixType& RelationMatrix,
748  const VectorType& ConstantVector,
749  IndexType ThisIndex = 0);
750 
751  MasterSlaveConstraint::Pointer CreateNewMasterSlaveConstraint(const std::string& ConstraintName,
752  IndexType Id,
753  NodeType& rMasterNode,
754  const DoubleVariableType& rMasterVariable,
755  NodeType& rSlaveNode,
756  const DoubleVariableType& rSlaveVariable,
757  const double Weight,
758  const double Constant,
759  IndexType ThisIndex = 0);
760 
764  void RemoveMasterSlaveConstraint(IndexType MasterSlaveConstraintId, IndexType ThisIndex = 0);
765 
769  void RemoveMasterSlaveConstraint(MasterSlaveConstraintType& ThisMasterSlaveConstraint, IndexType ThisIndex = 0);
770 
774  void RemoveMasterSlaveConstraintFromAllLevels(IndexType MasterSlaveConstraintId, IndexType ThisIndex = 0);
775 
779  void RemoveMasterSlaveConstraintFromAllLevels(MasterSlaveConstraintType& ThisMasterSlaveConstraint, IndexType ThisIndex = 0);
780 
786  void RemoveMasterSlaveConstraints(Flags IdentifierFlag = TO_ERASE);
787 
793  void RemoveMasterSlaveConstraintsFromAllLevels(Flags IdentifierFlag = TO_ERASE);
794 
801  const IndexType MasterSlaveConstraintId,
802  IndexType ThisIndex = 0
803  ) const
804  {
805  return GetMesh(ThisIndex).HasMasterSlaveConstraint(MasterSlaveConstraintId);
806  }
807 
809  MasterSlaveConstraintType::Pointer pGetMasterSlaveConstraint(IndexType ConstraintId, IndexType ThisIndex = 0);
810 
812  MasterSlaveConstraintType& GetMasterSlaveConstraint(IndexType MasterSlaveConstraintId, IndexType ThisIndex = 0);
814  const MasterSlaveConstraintType& GetMasterSlaveConstraint(IndexType MasterSlaveConstraintId, IndexType ThisIndex = 0) const ;
815 
819 
825  SizeType NumberOfProperties(IndexType ThisIndex = 0) const;
826 
832  void AddProperties(PropertiesType::Pointer pNewProperties, IndexType ThisIndex = 0);
833 
840  bool HasProperties(IndexType PropertiesId, IndexType MeshIndex = 0) const;
841 
848  bool RecursivelyHasProperties(IndexType PropertiesId, IndexType MeshIndex = 0) const;
849 
857  PropertiesType::Pointer CreateNewProperties(IndexType PropertiesId, IndexType MeshIndex = 0);
858 
866  PropertiesType::Pointer pGetProperties(IndexType PropertiesId, IndexType MeshIndex = 0);
867 
875  const PropertiesType::Pointer pGetProperties(IndexType PropertiesId, IndexType MeshIndex = 0) const;
876 
884  PropertiesType& GetProperties(IndexType PropertiesId, IndexType MeshIndex = 0);
885 
893  const PropertiesType& GetProperties(IndexType PropertiesId, IndexType MeshIndex = 0) const;
894 
901  bool HasProperties(
902  const std::string& rAddress,
903  IndexType MeshIndex = 0
904  ) const;
905 
913  PropertiesType::Pointer pGetProperties(
914  const std::string& rAddress,
915  IndexType MeshIndex = 0
916  );
917 
925  const PropertiesType::Pointer pGetProperties(
926  const std::string& rAddress,
927  IndexType MeshIndex = 0
928  ) const;
929 
937  PropertiesType& GetProperties(
938  const std::string& rAddress,
939  IndexType MeshIndex = 0
940  );
941 
949  const PropertiesType& GetProperties(
950  const std::string& rAddress,
951  IndexType MeshIndex = 0
952  ) const;
953 
956  void RemoveProperties(IndexType PropertiesId, IndexType ThisIndex = 0);
957 
960  void RemoveProperties(PropertiesType& ThisProperties, IndexType ThisIndex = 0);
961 
964  void RemoveProperties(PropertiesType::Pointer pThisProperties, IndexType ThisIndex = 0);
965 
968  void RemovePropertiesFromAllLevels(IndexType PropertiesId, IndexType ThisIndex = 0);
969 
972  void RemovePropertiesFromAllLevels(PropertiesType& ThisProperties, IndexType ThisIndex = 0);
973 
976  void RemovePropertiesFromAllLevels(PropertiesType::Pointer pThisProperties, IndexType ThisIndex = 0);
977 
979  {
980  return GetMesh(ThisIndex).PropertiesBegin();
981  }
982 
984  {
985  return GetMesh(ThisIndex).PropertiesBegin();
986  }
987 
989  {
990  return GetMesh(ThisIndex).PropertiesEnd();
991  }
992 
994  {
995  return GetMesh(ThisIndex).PropertiesEnd();
996  }
997 
1004  {
1005  return GetMesh(ThisIndex).Properties();
1006  }
1007 
1008  PropertiesContainerType::Pointer pProperties(IndexType ThisIndex = 0)
1009  {
1010  return GetMesh(ThisIndex).pProperties();
1011  }
1012 
1013  void SetProperties(PropertiesContainerType::Pointer pOtherProperties, IndexType ThisIndex = 0)
1014  {
1015  GetMesh(ThisIndex).SetProperties(pOtherProperties);
1016  }
1017 
1019  {
1020  return GetMesh(ThisIndex).PropertiesArray();
1021  }
1022 
1026 
1027  SizeType NumberOfElements(IndexType ThisIndex = 0) const
1028  {
1029  return GetMesh(ThisIndex).NumberOfElements();
1030  }
1031 
1034  void AddElement(ElementType::Pointer pNewElement, IndexType ThisIndex = 0);
1035 
1038  void AddElements(std::vector<IndexType> const& ElementIds, IndexType ThisIndex = 0);
1039 
1042  template<class TIteratorType >
1043  void AddElements(TIteratorType elements_begin, TIteratorType elements_end, IndexType ThisIndex = 0)
1044  {
1045  KRATOS_TRY
1048  ModelPart* root_model_part = &this->GetRootModelPart();
1049 
1050  for(TIteratorType it = elements_begin; it!=elements_end; it++)
1051  {
1052  auto it_found = root_model_part->Elements().find(it->Id());
1053  if(it_found == root_model_part->ElementsEnd()) //node does not exist in the top model part
1054  {
1055  aux_root.push_back( *(it.base()) );
1056  aux.push_back( *(it.base()) );
1057  }
1058  else //if it does exist verify it is the same node
1059  {
1060  if(&(*it_found) != &(*it))//check if the pointee coincides
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;
1062  else
1063  aux.push_back( *(it.base()) );
1064  }
1065  }
1066 
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();
1070 
1071  //add to all of the leaves
1072 
1073  ModelPart* current_part = this;
1074  while(current_part->IsSubModelPart())
1075  {
1076  for(auto it = aux.begin(); it!=aux.end(); it++)
1077  current_part->Elements().push_back( *(it.base()) );
1078 
1079  current_part->Elements().Unique();
1080 
1081  current_part = &(current_part->GetParentModelPart());
1082  }
1083 
1084  KRATOS_CATCH("")
1085  }
1086 
1088  ElementType::Pointer CreateNewElement(std::string ElementName,
1089  IndexType Id, std::vector<IndexType> ElementNodeIds,
1090  PropertiesType::Pointer pProperties, IndexType ThisIndex = 0);
1091 
1093  ElementType::Pointer CreateNewElement(std::string ElementName,
1094  IndexType Id, Geometry< Node >::PointsArrayType pElementNodes,
1095  PropertiesType::Pointer pProperties, IndexType ThisIndex = 0);
1096 
1098  ElementType::Pointer CreateNewElement(std::string ElementName,
1099  IndexType Id, typename GeometryType::Pointer pGeometry,
1100  PropertiesType::Pointer pProperties, IndexType ThisIndex = 0);
1101 
1103  bool HasElement(IndexType ElementId, IndexType ThisIndex = 0) const
1104  {
1105  return GetMesh(ThisIndex).HasElement(ElementId);
1106  }
1107 
1109  ElementType::Pointer pGetElement(IndexType ElementId, IndexType ThisIndex = 0)
1110  {
1111  return GetMesh(ThisIndex).pGetElement(ElementId);
1112  }
1113 
1115  const ElementType::Pointer pGetElement(const IndexType ElementId, const IndexType ThisIndex = 0) const
1116  {
1117  return GetMesh(ThisIndex).pGetElement(ElementId);
1118  }
1119 
1121  ElementType& GetElement(IndexType ElementId, IndexType ThisIndex = 0)
1122  {
1123  return GetMesh(ThisIndex).GetElement(ElementId);
1124  }
1125 
1126  const ElementType& GetElement(IndexType ElementId, IndexType ThisIndex = 0) const
1127  {
1128  return GetMesh(ThisIndex).GetElement(ElementId);
1129  }
1130 
1133  void RemoveElement(IndexType ElementId, IndexType ThisIndex = 0);
1134 
1137  void RemoveElement(ElementType& ThisElement, IndexType ThisIndex = 0);
1138 
1141  void RemoveElement(ElementType::Pointer pThisElement, IndexType ThisIndex = 0);
1142 
1145  void RemoveElementFromAllLevels(IndexType ElementId, IndexType ThisIndex = 0);
1146 
1149  void RemoveElementFromAllLevels(ElementType& ThisElement, IndexType ThisIndex = 0);
1150 
1153  void RemoveElementFromAllLevels(ElementType::Pointer pThisElement, IndexType ThisIndex = 0);
1154 
1160  void RemoveElements(Flags IdentifierFlag = TO_ERASE);
1161 
1167  void RemoveElementsFromAllLevels(Flags IdentifierFlag = TO_ERASE);
1168 
1170  {
1171  return GetMesh(ThisIndex).ElementsBegin();
1172  }
1173 
1175  {
1176  return GetMesh(ThisIndex).ElementsBegin();
1177  }
1178 
1180  {
1181  return GetMesh(ThisIndex).ElementsEnd();
1182  }
1183 
1185  {
1186  return GetMesh(ThisIndex).ElementsEnd();
1187  }
1188 
1190  {
1191  return GetMesh(ThisIndex).Elements();
1192  }
1193 
1194  const ElementsContainerType& Elements(IndexType ThisIndex = 0) const
1195  {
1196  return GetMesh(ThisIndex).Elements();
1197  }
1198 
1199  ElementsContainerType::Pointer pElements(IndexType ThisIndex = 0)
1200  {
1201  return GetMesh(ThisIndex).pElements();
1202  }
1203 
1204  void SetElements(ElementsContainerType::Pointer pOtherElements, IndexType ThisIndex = 0)
1205  {
1206  GetMesh(ThisIndex).SetElements(pOtherElements);
1207  }
1208 
1210  {
1211  return GetMesh(ThisIndex).ElementsArray();
1212  }
1213 
1217 
1219  {
1220  return GetMesh(ThisIndex).NumberOfConditions();
1221  }
1222 
1225  void AddCondition(ConditionType::Pointer pNewCondition, IndexType ThisIndex = 0);
1226 
1229  void AddConditions(std::vector<IndexType> const& ConditionIds, IndexType ThisIndex = 0);
1230 
1233  template<class TIteratorType >
1234  void AddConditions(TIteratorType conditions_begin, TIteratorType conditions_end, IndexType ThisIndex = 0)
1235  {
1236  KRATOS_TRY
1239  ModelPart* root_model_part = &this->GetRootModelPart();
1240 
1241  for(TIteratorType it = conditions_begin; it!=conditions_end; it++)
1242  {
1243  auto it_found = root_model_part->Conditions().find(it->Id());
1244  if(it_found == root_model_part->ConditionsEnd()) //node does not exist in the top model part
1245  {
1246  aux.push_back( *(it.base()) );
1247  aux_root.push_back( *(it.base()) );
1248  }
1249  else //if it does exist verify it is the same node
1250  {
1251  if(&(*it_found) != &(*it))//check if the pointee coincides
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;
1253  else
1254  aux.push_back( *(it.base()) );
1255  }
1256  }
1257 
1258  //now add to the root model part
1259  for(auto it = aux_root.begin(); it!=aux_root.end(); it++)
1260  root_model_part->Conditions().push_back( *(it.base()) );
1261  root_model_part->Conditions().Unique();
1262 
1263  //add to all of the leaves
1264 
1265  ModelPart* current_part = this;
1266  while(current_part->IsSubModelPart())
1267  {
1268  for(auto it = aux.begin(); it!=aux.end(); it++)
1269  current_part->Conditions().push_back( *(it.base()) );
1270 
1271  current_part->Conditions().Unique();
1272 
1273  current_part = &(current_part->GetParentModelPart());
1274  }
1275 
1276  KRATOS_CATCH("")
1277  }
1278 
1280  ConditionType::Pointer CreateNewCondition(std::string ConditionName,
1281  IndexType Id, std::vector<IndexType> ConditionNodeIds,
1282  PropertiesType::Pointer pProperties, IndexType ThisIndex = 0);
1283 
1285  ConditionType::Pointer CreateNewCondition(std::string ConditionName,
1286  IndexType Id, Geometry< Node >::PointsArrayType pConditionNodes,
1287  PropertiesType::Pointer pProperties, IndexType ThisIndex = 0);
1288 
1290  ConditionType::Pointer CreateNewCondition(std::string ConditionName,
1291  IndexType Id, typename GeometryType::Pointer pGeometry,
1292  PropertiesType::Pointer pProperties, IndexType ThisIndex = 0);
1293 
1295  bool HasCondition(IndexType ConditionId, IndexType ThisIndex = 0) const
1296  {
1297  return GetMesh(ThisIndex).HasCondition(ConditionId);
1298  }
1299 
1301  ConditionType::Pointer pGetCondition(IndexType ConditionId, IndexType ThisIndex = 0)
1302  {
1303  return GetMesh(ThisIndex).pGetCondition(ConditionId);
1304  }
1305 
1307  const ConditionType::Pointer pGetCondition(const IndexType ConditionId, const IndexType ThisIndex = 0) const
1308  {
1309  return GetMesh(ThisIndex).pGetCondition(ConditionId);
1310  }
1311 
1313  ConditionType& GetCondition(IndexType ConditionId, IndexType ThisIndex = 0)
1314  {
1315  return GetMesh(ThisIndex).GetCondition(ConditionId);
1316  }
1317 
1318  const ConditionType& GetCondition(IndexType ConditionId, IndexType ThisIndex = 0) const
1319  {
1320  return GetMesh(ThisIndex).GetCondition(ConditionId);
1321  }
1322 
1325  void RemoveCondition(IndexType ConditionId, IndexType ThisIndex = 0);
1326 
1329  void RemoveCondition(ConditionType& ThisCondition, IndexType ThisIndex = 0);
1330 
1333  void RemoveCondition(ConditionType::Pointer pThisCondition, IndexType ThisIndex = 0);
1334 
1337  void RemoveConditionFromAllLevels(IndexType ConditionId, IndexType ThisIndex = 0);
1338 
1341  void RemoveConditionFromAllLevels(ConditionType& ThisCondition, IndexType ThisIndex = 0);
1342 
1345  void RemoveConditionFromAllLevels(ConditionType::Pointer pThisCondition, IndexType ThisIndex = 0);
1346 
1352  void RemoveConditions(Flags IdentifierFlag = TO_ERASE);
1353 
1359  void RemoveConditionsFromAllLevels(Flags IdentifierFlag = TO_ERASE);
1360 
1362  {
1363  return GetMesh(ThisIndex).ConditionsBegin();
1364  }
1365 
1367  {
1368  return GetMesh(ThisIndex).ConditionsBegin();
1369  }
1370 
1372  {
1373  return GetMesh(ThisIndex).ConditionsEnd();
1374  }
1375 
1377  {
1378  return GetMesh(ThisIndex).ConditionsEnd();
1379  }
1380 
1382  {
1383  return GetMesh(ThisIndex).Conditions();
1384  }
1385 
1386  const ConditionsContainerType& Conditions(IndexType ThisIndex = 0) const
1387  {
1388  return GetMesh(ThisIndex).Conditions();
1389  }
1390 
1391  ConditionsContainerType::Pointer pConditions(IndexType ThisIndex = 0)
1392  {
1393  return GetMesh(ThisIndex).pConditions();
1394  }
1395 
1396  void SetConditions(ConditionsContainerType::Pointer pOtherConditions, IndexType ThisIndex = 0)
1397  {
1398  GetMesh(ThisIndex).SetConditions(pOtherConditions);
1399  }
1400 
1402  {
1403  return GetMesh(ThisIndex).ConditionsArray();
1404  }
1405 
1409 
1411  {
1412  return mGeometries.NumberOfGeometries();
1413  }
1414 
1420  GeometryType::Pointer CreateNewGeometry(
1421  const std::string& rGeometryTypeName,
1422  const std::vector<IndexType>& rGeometryNodeIds
1423  );
1424 
1430  GeometryType::Pointer CreateNewGeometry(
1431  const std::string& rGeometryTypeName,
1432  GeometryType::PointsArrayType pGeometryNodes
1433  );
1434 
1440  GeometryType::Pointer CreateNewGeometry(
1441  const std::string& rGeometryTypeName,
1442  GeometryType::Pointer pGeometry
1443  );
1444 
1451  GeometryType::Pointer CreateNewGeometry(
1452  const std::string& rGeometryTypeName,
1453  const IndexType GeometryId,
1454  const std::vector<IndexType>& rGeometryNodeIds
1455  );
1456 
1463  GeometryType::Pointer CreateNewGeometry(
1464  const std::string& rGeometryTypeName,
1465  const IndexType GeometryId,
1466  GeometryType::PointsArrayType pGeometryNodes
1467  );
1468 
1475  GeometryType::Pointer CreateNewGeometry(
1476  const std::string& rGeometryTypeName,
1477  const IndexType GeometryId,
1478  GeometryType::Pointer pGeometry
1479  );
1480 
1487  GeometryType::Pointer CreateNewGeometry(
1488  const std::string& rGeometryTypeName,
1489  const std::string& rGeometryIdentifierName,
1490  const std::vector<IndexType>& rGeometryNodeIds
1491  );
1492 
1499  GeometryType::Pointer CreateNewGeometry(
1500  const std::string& rGeometryTypeName,
1501  const std::string& rGeometryIdentifierName,
1502  GeometryType::PointsArrayType pGeometryNodes
1503  );
1504 
1511  GeometryType::Pointer CreateNewGeometry(
1512  const std::string& rGeometryTypeName,
1513  const std::string& rGeometryIdentifierName,
1514  GeometryType::Pointer pGeometry
1515  );
1516 
1518  void AddGeometry(typename GeometryType::Pointer pNewGeometry);
1519 
1521  void AddGeometries(std::vector<IndexType> const& GeometriesIds);
1522 
1524  template<class TIteratorType >
1525  void AddGeometries(TIteratorType GeometryBegin, TIteratorType GeometriesEnd, IndexType ThisIndex = 0)
1526  {
1527  KRATOS_TRY
1528  std::vector<GeometryType::Pointer> aux, aux_root;
1529  ModelPart* p_root_model_part = &this->GetRootModelPart();
1530 
1531  for(TIteratorType it = GeometryBegin; it!=GeometriesEnd; it++) {
1532  auto it_found = p_root_model_part->Geometries().find(it->Id());
1533  if(it_found == p_root_model_part->GeometriesEnd()) { // Geometry does not exist in the top model part
1534  aux_root.push_back( it.operator->() );
1535  aux.push_back( it.operator->() );
1536  } else { // If it does exist verify it is the same geometry
1537  if(&(*it_found) != &(*it)) { // Check if the pointee coincides
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;
1539  } else {
1540  aux.push_back( it.operator->() );
1541  }
1542  }
1543  }
1544 
1545  // Add to root model part
1546  for(auto& p_geom : aux_root) {
1547  p_root_model_part->AddGeometry(p_geom);
1548  }
1549 
1550  // Add to all of the leaves
1551  ModelPart* p_current_part = this;
1552  while(p_current_part->IsSubModelPart()) {
1553  for(auto& p_geom : aux) {
1554  p_current_part->AddGeometry(p_geom);
1555  }
1556 
1557  p_current_part = &(p_current_part->GetParentModelPart());
1558  }
1559 
1560  KRATOS_CATCH("")
1561  }
1562 
1564  typename GeometryType::Pointer pGetGeometry(IndexType GeometryId) {
1565  return mGeometries.pGetGeometry(GeometryId);
1566  }
1567 
1569  const typename GeometryType::Pointer pGetGeometry(IndexType GeometryId) const {
1570  return mGeometries.pGetGeometry(GeometryId);
1571  }
1572 
1574  typename GeometryType::Pointer pGetGeometry(std::string GeometryName) {
1575  return mGeometries.pGetGeometry(GeometryName);
1576  }
1577 
1579  const typename GeometryType::Pointer pGetGeometry(std::string GeometryName) const {
1580  return mGeometries.pGetGeometry(GeometryName);
1581  }
1582 
1585  return mGeometries.GetGeometry(GeometryId);
1586  }
1587 
1589  const GeometryType& GetGeometry(IndexType GeometryId) const {
1590  return mGeometries.GetGeometry(GeometryId);
1591  }
1592 
1594  GeometryType& GetGeometry(std::string GeometryName) {
1595  return mGeometries.GetGeometry(GeometryName);
1596  }
1597 
1599  const GeometryType& GetGeometry(std::string GeometryName) const {
1600  return mGeometries.GetGeometry(GeometryName);
1601  }
1602 
1603 
1605  bool HasGeometry(IndexType GeometryId) const {
1606  return mGeometries.HasGeometry(GeometryId);
1607  }
1608 
1610  bool HasGeometry(std::string GeometryName) const {
1611  return mGeometries.HasGeometry(GeometryName);
1612  }
1613 
1614 
1616  void RemoveGeometry(IndexType GeometryId);
1617 
1619  void RemoveGeometry(std::string GeometryName);
1620 
1622  void RemoveGeometryFromAllLevels(IndexType GeometryId);
1623 
1625  void RemoveGeometryFromAllLevels(std::string GeometryName);
1626 
1627 
1630  return mGeometries.GeometriesBegin();
1631  }
1632 
1635  return mGeometries.GeometriesBegin();
1636  }
1637 
1640  return mGeometries.GeometriesEnd();
1641  }
1642 
1645  return mGeometries.GeometriesEnd();
1646  }
1647 
1648 
1651  {
1652  return mGeometries.Geometries();
1653  }
1654 
1657  {
1658  return mGeometries.Geometries();
1659  }
1660 
1664 
1666  {
1667  return mSubModelParts.size();
1668  }
1669 
1673  ModelPart& CreateSubModelPart(std::string const& NewSubModelPartName);
1674 
1678  ModelPart& GetSubModelPart(std::string const& SubModelPartName);
1679 
1683  const ModelPart& GetSubModelPart(std::string const& SubModelPartName) const;
1684 
1688  ModelPart* pGetSubModelPart(std::string const& SubModelPartName);
1689 
1692  void RemoveSubModelPart(std::string const& ThisSubModelPartName);
1693 
1696  void RemoveSubModelPart(ModelPart& ThisSubModelPart);
1697 
1699  {
1700  return mSubModelParts.begin();
1701  }
1702 
1704  {
1705  return mSubModelParts.begin();
1706  }
1707 
1709  {
1710  return mSubModelParts.end();
1711  }
1712 
1714  {
1715  return mSubModelParts.end();
1716  }
1717 
1719  {
1720  return mSubModelParts;
1721  }
1722 
1724  {
1725  return mSubModelParts;
1726  }
1727 
1731  ModelPart& GetParentModelPart();
1732 
1736  const ModelPart& GetParentModelPart() const;
1737 
1740  bool HasSubModelPart(std::string const& ThisSubModelPartName) const;
1741 
1745 
1747  {
1748  return *mpProcessInfo;
1749  }
1750 
1752  {
1753  return *mpProcessInfo;
1754  }
1755 
1756  ProcessInfo::Pointer pGetProcessInfo()
1757  {
1758  return mpProcessInfo;
1759  }
1760 
1761  const ProcessInfo::Pointer pGetProcessInfo() const
1762  {
1763  return mpProcessInfo;
1764  }
1765 
1766  void SetProcessInfo(ProcessInfo::Pointer pNewProcessInfo)
1767  {
1768  mpProcessInfo = pNewProcessInfo;
1769  }
1770 
1771  void SetProcessInfo(ProcessInfo& NewProcessInfo)
1772  {
1773  *mpProcessInfo = NewProcessInfo;
1774  }
1775 
1777  {
1778  return mMeshes.size();
1779  }
1780 
1781  MeshType::Pointer pGetMesh(IndexType ThisIndex = 0)
1782  {
1783  return mMeshes(ThisIndex);
1784  }
1785 
1786  const MeshType::Pointer pGetMesh(IndexType ThisIndex = 0) const
1787  {
1788  return mMeshes(ThisIndex);
1789  }
1790 
1791  MeshType& GetMesh(IndexType ThisIndex = 0)
1792  {
1793  return mMeshes[ThisIndex];
1794  }
1795 
1796  MeshType const& GetMesh(IndexType ThisIndex = 0) const
1797  {
1798  return mMeshes[ThisIndex];
1799  }
1800 
1802  {
1803  return mMeshes;
1804  }
1805 
1807  {
1808  return mMeshes;
1809  }
1810 
1811  std::string& Name()
1812  {
1813  return mName;
1814  }
1815 
1816  std::string const& Name() const
1817  {
1818  return mName;
1819  }
1820 
1822  {
1823  return *mpCommunicator;
1824  }
1825 
1827  {
1828  return *mpCommunicator;
1829  }
1830 
1831  Communicator::Pointer pGetCommunicator()
1832  {
1833  return mpCommunicator;
1834  }
1835 
1836  void SetCommunicator(Communicator::Pointer pNewCommunicator)
1837  {
1838  mpCommunicator = pNewCommunicator;
1839  }
1840 
1844 
1850  std::string FullName() const
1851  {
1852  std::string full_name = this->Name();
1853  if (this->IsSubModelPart()) {
1854  full_name = this->GetParentModelPart().FullName() + "." + full_name;
1855  }
1856  return full_name;
1857  }
1858 
1863  std::vector<std::string> GetSubModelPartNames() const;
1864 
1870  void SetBufferSize(IndexType NewBufferSize);
1871 
1877  {
1878  return mBufferSize;
1879  }
1880 
1882  virtual int Check() const;
1883 
1887 
1888 
1892 
1893  bool IsSubModelPart() const
1894  {
1895  return (mpParentModelPart != NULL);
1896  }
1897 
1898  bool IsDistributed() const
1899  {
1900  return mpCommunicator->IsDistributed();
1901  }
1902 
1906 
1908  std::string Info() const override;
1909 
1911  void PrintInfo(std::ostream& rOStream) const override;
1912 
1914  void PrintData(std::ostream& rOStream) const override;
1915 
1917  virtual void PrintInfo(std::ostream& rOStream, std::string const& PrefixString) const;
1918 
1920  virtual void PrintData(std::ostream& rOStream, std::string const& PrefixString) const;
1921 
1922 
1926 
1927 
1929 
1930 private:
1931 
1932  friend class Model;
1933 
1935  ModelPart(VariablesList::Pointer pVariableList, Model& rOwnerModel);
1936 
1938  ModelPart(std::string const& NewName,VariablesList::Pointer pVariableList, Model& rOwnerModel);
1939 
1941  ModelPart(std::string const& NewName, IndexType NewBufferSize,VariablesList::Pointer pVariableList, Model& rOwnerModel);
1942 
1944  ModelPart(ModelPart const& rOther) = delete;
1945 
1946 
1949 
1950 
1954 
1955  std::string mName;
1956 
1957  IndexType mBufferSize;
1958 
1959  ProcessInfo::Pointer mpProcessInfo;
1960 
1961  TablesContainerType mTables;
1962 
1963  MeshesContainerType mMeshes;
1964 
1965  GeometryContainerType mGeometries;
1966 
1967  VariablesList::Pointer mpVariablesList;
1968 
1969  Communicator::Pointer mpCommunicator;
1970 
1971  ModelPart* mpParentModelPart = NULL;
1972 
1973  SubModelPartsContainerType mSubModelParts;
1974 
1975  Model& mrModel;
1976 
1980 
1981 
1985 
1991  std::vector<IndexType> TrimComponentName(const std::string& rStringName) const
1992  {
1993  std::vector<IndexType> list_indexes;
1994 
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));
1998  }
1999 
2000  KRATOS_ERROR_IF(list_indexes.size() == 0) << "Properties:: Empty list of indexes when reading suproperties" << std::endl;
2001 
2002  return list_indexes;
2003  }
2004 
2009  void SetBufferSizeSubModelParts(IndexType NewBufferSize);
2010 
2011 
2012  void SetParentModelPart(ModelPart* pParentModelPart)
2013  {
2014  mpParentModelPart = pParentModelPart;
2015  }
2016 
2017  template <typename TEntitiesContainerType>
2018  void AddEntities(TEntitiesContainerType const& Source, TEntitiesContainerType& rDestination, Flags Options)
2019  {
2020  //if (Options->Is(ALL_ENTITIES))
2021  //{
2022  // if(Options->Is())
2023  //}
2024  }
2025 
2030  [[ noreturn ]] void ErrorNonExistingSubModelPart(const std::string& rSubModelPartName) const;
2031 
2035 
2036  friend class Serializer;
2037 
2038  void save(Serializer& rSerializer) const override;
2039 
2040  void load(Serializer& rSerializer) override;
2041 
2045 
2046 
2050 
2051 
2055 
2056 
2058 
2059 }; // Class ModelPart
2060 
2062 
2065 
2066 
2070 
2071 
2073 KRATOS_API(KRATOS_CORE) inline std::istream & operator >>(std::istream& rIStream,
2074  ModelPart& rThis)
2075 {
2076  return rIStream;
2077 }
2079 KRATOS_API(KRATOS_CORE) inline std::ostream & operator <<(std::ostream& rOStream,
2080  const ModelPart& rThis)
2081 {
2082  rThis.PrintInfo(rOStream);
2083  rOStream << std::endl;
2084  rThis.PrintData(rOStream);
2085 
2086  return rOStream;
2087 }
2088 
2090 
2091 } // namespace Kratos.
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
Definition: flags.h:58
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 find(const key_type &Key)
Definition: pointer_hash_map_set.h:340
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
Definition: table.h:435
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)
Matrix MatrixType
Definition: geometrical_transformation_utilities.h:55
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