18 #include <unordered_set>
57 class KRATOS_API(KRATOS_CORE)
IO
143 KRATOS_ERROR <<
"Calling base class method (ReadNode). Please check the definition of derived class." << std::endl;
152 KRATOS_ERROR <<
"Calling base class method (ReadNodes). Please check the definition of derived class" << std::endl;
161 KRATOS_ERROR <<
"Calling base class method (ReadNodesNumber). Please check the definition of derived class." << std::endl;;
170 KRATOS_ERROR <<
"Calling base class method (WriteNodes). Please check the definition of derived class" << std::endl;
179 KRATOS_ERROR <<
"Calling base class method (ReadProperties). Please check the definition of derived class" << std::endl;
188 KRATOS_ERROR <<
"Calling base class method (ReadProperties). Please check the definition of derived class" << std::endl;
197 KRATOS_ERROR <<
"Calling base class method (WriteProperties). Please check the definition of derived class" << std::endl;
206 KRATOS_ERROR <<
"Calling base class method (WriteProperties). Please check the definition of derived class" << std::endl;
216 GeometryType::Pointer& pThisGeometry
219 KRATOS_ERROR <<
"Calling base class method (ReadGeometry). Please check the definition of derived class" << std::endl;
232 KRATOS_ERROR <<
"Calling base class method (ReadGeometries). Please check the definition of derived class" << std::endl;
242 KRATOS_ERROR <<
"Calling base class method (ReadGeometriesConnectivities). Please check the definition of derived class" << std::endl;
251 KRATOS_ERROR <<
"Calling base class method (WriteGeometries). Please check the definition of derived class" << std::endl;
263 Element::Pointer& pThisElement
266 KRATOS_ERROR <<
"Calling base class method (ReadElement). Please check the definition of derived class" << std::endl;
281 KRATOS_ERROR <<
"Calling base class method (ReadElements). Please check the definition of derived class" << std::endl;
291 KRATOS_ERROR <<
"Calling base class method (ReadElementsConnectivities). Please check the definition of derived class" << std::endl;
300 KRATOS_ERROR <<
"Calling base class method (WriteElements). Please check the definition of derived class" << std::endl;
312 Condition::Pointer& pThisCondition
315 KRATOS_ERROR <<
"Calling base class method (ReadCondition). Please check the definition of derived class" << std::endl;
330 KRATOS_ERROR <<
"Calling base class method (ReadConditions). Please check the definition of derived class" << std::endl;
340 KRATOS_ERROR <<
"Calling base class method (ReadConditionsConnectivities). Please check the definition of derived class" << std::endl;
349 KRATOS_ERROR <<
"Calling base class method (WriteConditions). Please check the definition of derived class" << std::endl;
358 KRATOS_ERROR <<
"Calling base class method (ReadInitialValues). Please check the definition of derived class" << std::endl;
369 KRATOS_ERROR <<
"Calling base class method (ReadInitialValues). Please check the definition of derived class" << std::endl;
378 KRATOS_ERROR <<
"Calling base class method (ReadMesh). Please check the definition of derived class" << std::endl;
385 KRATOS_DEPRECATED_MESSAGE(
"'WriteMesh' with a non-const Mesh as input is deprecated. Please use the version of this function that accepts a const Mesh instead.")
388 KRATOS_ERROR <<
"Calling base class method (WriteMesh). Please check the implementation of derived classes" << std::endl;
413 KRATOS_ERROR <<
"Calling base class method (ReadModelPart). Please check the definition of derived class" << std::endl;
420 KRATOS_DEPRECATED_MESSAGE(
"'WriteModelPart' with a non-const ModelPart as input is deprecated. Please use the version of this function that accepts a const ModelPart instead.")
423 KRATOS_ERROR <<
"Calling base class method (WriteModelPart). Please check the definition of derived class" << std::endl;
435 this->WriteModelPart(non_const_model_part);
446 KRATOS_DEPRECATED_MESSAGE(
"'WriteNodeMesh' with a non-const Mesh as input is deprecated. Please use the version of this function that accepts a const Mesh instead.")
449 KRATOS_ERROR <<
"Calling base class method (WriteNodeMesh). Please check the implementation of derived classes" << std::endl;
482 KRATOS_ERROR <<
"Calling base class method (ReadNodalGraph). Please check the definition of derived class" << std::endl;;
511 KRATOS_DEPRECATED_MESSAGE(
"'This version of \"DivideInputToPartitions\" is deprecated, please use the interface that accepts a \"PartitioningInfo\"")
512 virtual
void DivideInputToPartitions(
SizeType NumberOfPartitions,
521 KRATOS_ERROR <<
"Calling base class method (DivideInputToPartitions). Please check the definition of derived class" << std::endl;
553 KRATOS_DEPRECATED_MESSAGE(
"'This version of \"DivideInputToPartitions\" is deprecated, please use the interface that accepts a \"PartitioningInfo\"")
564 KRATOS_ERROR <<
"Calling base class method (DivideInputToPartitions). Please check the definition of derived class" << std::endl;
568 std::string
const& rModelPartName,
569 std::unordered_set<SizeType> &rElementsIds,
570 std::unordered_set<SizeType> &rConditionsIds)
572 KRATOS_ERROR <<
"Calling base class method (ReadSubModelPartElementsAndConditionsIds). Please check the definition of derived class" << std::endl;
577 std::unordered_set<SizeType> &rElementsIds,
578 std::unordered_set<SizeType> &rConditionsIds)
580 KRATOS_ERROR <<
"Calling base class method (ReadNodalGraphFromEntitiesList). Please check the definition of derived class" << std::endl;
598 virtual std::string
Info()
const
714 rOStream << std::endl;
Geometry base class.
Definition: geometry.h:71
IO provides different implementation of input output procedures which can be used to read and write w...
Definition: io.h:58
virtual void ReadConditions(NodesContainerType &rThisNodes, PropertiesContainerType &rThisProperties, ConditionsContainerType &rThisConditions)
This method reads an array of conditions.
Definition: io.h:324
virtual void WriteModelPart(const ModelPart &rThisModelPart)
This method writes the model part.
Definition: io.h:430
IO()=default
Default constructor.
Node NodeType
Definition: io.h:75
virtual void ReadInitialValues(NodesContainerType &rThisNodes, ElementsContainerType &rThisElements, ConditionsContainerType &rThisConditions)
This method reads the initial values of the nodes, elements and conditios.
Definition: io.h:367
MeshType::ElementsContainerType ElementsContainerType
Definition: io.h:87
virtual void WriteMesh(const MeshType &rThisMesh)
This method writes the mesh.
Definition: io.h:395
virtual std::size_t ReadNodalGraph(ConnectivitiesContainerType &rAuxConnectivities)
Read the input file and create the nodal connectivities graph, stored in CSR format.
Definition: io.h:480
virtual void DivideInputToPartitions(Kratos::shared_ptr< std::iostream > *pStreams, SizeType NumberOfPartitions, const PartitioningInfo &rPartitioningInfo)
This method divides a model part into partitions.
Definition: io.h:530
virtual void ReadModelPart(ModelPart &rThisModelPart)
This method reads the model part.
Definition: io.h:411
IO(IO const &rOther)=delete
Copy constructor.
Mesh< NodeType, Properties, Element, Condition > MeshType
Definition: io.h:79
MeshType::ConditionsContainerType ConditionsContainerType
Definition: io.h:89
virtual void ReadGeometry(NodesContainerType &rThisNodes, GeometryType::Pointer &pThisGeometry)
This method reads one geometry.
Definition: io.h:214
virtual void DivideInputToPartitions(SizeType NumberOfPartitions, const PartitioningInfo &rPartitioningInfo)
This method divides a model part into partitions.
Definition: io.h:490
KRATOS_DEFINE_LOCAL_FLAG(IGNORE_VARIABLES_ERROR)
virtual bool ReadNode(NodeType &rThisNode)
This method reads one node.
Definition: io.h:141
virtual void ReadProperties(Properties &rThisProperties)
This method reads one Properties.
Definition: io.h:177
virtual std::size_t ReadConditionsConnectivities(ConnectivitiesContainerType &rConditionsConnectivities)
This method reads the conditions connectivities.
Definition: io.h:338
KRATOS_DEFINE_LOCAL_FLAG(SKIP_TIMER)
virtual void WriteGeometries(GeometryContainerType const &rThisGeometries)
This method writes an array of geometries.
Definition: io.h:249
KRATOS_DEFINE_LOCAL_FLAG(MESH_ONLY)
virtual void WriteNodes(NodesContainerType const &rThisNodes)
This method writes the nodes from an array of nodes.
Definition: io.h:168
virtual void ReadMesh(MeshType &rThisMesh)
This method reads the mesh.
Definition: io.h:376
virtual void ReadElement(NodesContainerType &rThisNodes, PropertiesContainerType &rThisProperties, Element::Pointer &pThisElement)
This method reads one element.
Definition: io.h:260
virtual std::string Info() const
Turn back information as a string.
Definition: io.h:598
virtual void WriteNodeMesh(const MeshType &rThisMesh)
This method writes the node mesh.
Definition: io.h:456
virtual std::size_t ReadNodesNumber()
This method reads the number of nodes.
Definition: io.h:159
virtual void ReadInitialValues(ModelPart &rThisModelPart)
This method reads the initial values of the model part.
Definition: io.h:356
KRATOS_DEFINE_LOCAL_FLAG(APPEND)
MeshType::NodesContainerType NodesContainerType
Definition: io.h:81
virtual void ReadElements(NodesContainerType &rThisNodes, PropertiesContainerType &rThisProperties, ElementsContainerType &rThisElements)
This method reads an array of elements.
Definition: io.h:275
virtual void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: io.h:610
Geometry< NodeType > GeometryType
Definition: io.h:77
virtual bool ReadNodes(NodesContainerType &rThisNodes)
This method reads the nodes from an array of nodes.
Definition: io.h:150
virtual void WriteElements(ElementsContainerType const &rThisElements)
This method writes an array of elements.
Definition: io.h:298
IO & operator=(IO const &rOther)=delete
Assignment operator.
virtual void ReadGeometries(NodesContainerType &rThisNodes, GeometryContainerType &rThisGeometries)
This method reads an array of geometries.
Definition: io.h:227
KRATOS_CLASS_POINTER_DEFINITION(IO)
Pointer definition of IO.
std::vector< std::vector< std::size_t > > ConnectivitiesContainerType
Definition: io.h:91
KRATOS_DEFINE_LOCAL_FLAG(READ)
Local Flags.
virtual void WriteProperties(PropertiesContainerType const &rThisProperties)
This method writes the Properties from an array of Properties.
Definition: io.h:204
virtual std::size_t ReadGeometriesConnectivities(ConnectivitiesContainerType &rGeometriesConnectivities)
This method reads the geometries connectivities.
Definition: io.h:240
DenseMatrix< int > GraphType
Definition: io.h:99
virtual void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: io.h:604
virtual void ReadCondition(NodesContainerType &rThisNodes, PropertiesContainerType &rThisProperties, Condition::Pointer &pThisCondition)
This method reads one condition.
Definition: io.h:309
KRATOS_DEFINE_LOCAL_FLAG(SCIENTIFIC_PRECISION)
MeshType::PropertiesContainerType PropertiesContainerType
Definition: io.h:83
virtual void ReadProperties(PropertiesContainerType &rThisProperties)
This method reads the Properties from an array of Properties.
Definition: io.h:186
std::size_t SizeType
Definition: io.h:97
std::vector< std::size_t > PartitionIndicesType
Definition: io.h:95
std::vector< std::vector< std::size_t > > PartitionIndicesContainerType
Definition: io.h:93
ModelPart::GeometryContainerType GeometryContainerType
Definition: io.h:85
virtual std::size_t ReadNodalGraphFromEntitiesList(ConnectivitiesContainerType &rAuxConnectivities, std::unordered_set< SizeType > &rElementsIds, std::unordered_set< SizeType > &rConditionsIds)
Definition: io.h:575
virtual std::size_t ReadElementsConnectivities(ConnectivitiesContainerType &rElementsConnectivities)
This method reads the elements connectivities.
Definition: io.h:289
KRATOS_DEFINE_LOCAL_FLAG(WRITE)
virtual void WriteProperties(Properties const &rThisProperties)
This method writes one Properties.
Definition: io.h:195
virtual ~IO()=default
Destructor.
virtual void WriteConditions(ConditionsContainerType const &rThisConditions)
This method writes an array of conditions.
Definition: io.h:347
virtual void ReadSubModelPartElementsAndConditionsIds(std::string const &rModelPartName, std::unordered_set< SizeType > &rElementsIds, std::unordered_set< SizeType > &rConditionsIds)
Definition: io.h:567
Definition: amatrix_interface.h:41
Mesh is the second level of abstraction in the data structure which hold Nodes, Elements and Conditio...
Definition: mesh.h:69
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
This class defines the node.
Definition: node.h:65
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
Properties encapsulates data shared by different Elements or Conditions. It can store any type of dat...
Definition: properties.h:69
#define KRATOS_STOP_IGNORING_DEPRECATED_FUNCTION_WARNING
Definition: define.h:776
#define KRATOS_START_IGNORING_DEPRECATED_FUNCTION_WARNING
Definition: define.h:761
#define KRATOS_ERROR
Definition: exception.h:161
void WriteMesh(GidIOType &dummy, GidIOType::MeshType &rThisMesh)
Definition: add_custom_io_to_python.cpp:74
void WriteNodeMesh(GidIOType &dummy, GidIOType::MeshType &rThisMesh)
Definition: add_custom_io_to_python.cpp:69
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
std::shared_ptr< T > shared_ptr
Definition: smart_pointers.h:27
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
namespace KRATOS_DEPRECATED_MESSAGE("Please use std::filesystem directly") filesystem
Definition: kratos_filesystem.h:33
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
tuple const
Definition: ode_solve.py:403
namespace
Definition: array_1d.h:793
PartitionIndicesType ElementsPartitions
Definition: io.h:106
PartitionIndicesType ConditionsPartitions
Definition: io.h:107
PartitionIndicesType NodesPartitions
Definition: io.h:105
GraphType Graph
Definition: io.h:104
PartitionIndicesContainerType NodesAllPartitions
Definition: io.h:108
PartitionIndicesContainerType ConditionsAllPartitions
Definition: io.h:110
PartitionIndicesContainerType ElementsAllPartitions
Definition: io.h:109