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.
|
IO provides different implementation of input output procedures which can be used to read and write with different formats and characteristics. More...
#include <io.h>
Classes | |
struct | PartitioningInfo |
Public Member Functions | |
Life Cycle | |
IO ()=default | |
Default constructor. More... | |
virtual | ~IO ()=default |
Destructor. More... | |
IO (IO const &rOther)=delete | |
Copy constructor. More... | |
Operators | |
IO & | operator= (IO const &rOther)=delete |
Assignment operator. More... | |
Operations | |
virtual bool | ReadNode (NodeType &rThisNode) |
This method reads one node. More... | |
virtual bool | ReadNodes (NodesContainerType &rThisNodes) |
This method reads the nodes from an array of nodes. More... | |
virtual std::size_t | ReadNodesNumber () |
This method reads the number of nodes. More... | |
virtual void | WriteNodes (NodesContainerType const &rThisNodes) |
This method writes the nodes from an array of nodes. More... | |
virtual void | ReadProperties (Properties &rThisProperties) |
This method reads one Properties. More... | |
virtual void | ReadProperties (PropertiesContainerType &rThisProperties) |
This method reads the Properties from an array of Properties. More... | |
virtual void | WriteProperties (Properties const &rThisProperties) |
This method writes one Properties. More... | |
virtual void | WriteProperties (PropertiesContainerType const &rThisProperties) |
This method writes the Properties from an array of Properties. More... | |
virtual void | ReadGeometry (NodesContainerType &rThisNodes, GeometryType::Pointer &pThisGeometry) |
This method reads one geometry. More... | |
virtual void | ReadGeometries (NodesContainerType &rThisNodes, GeometryContainerType &rThisGeometries) |
This method reads an array of geometries. More... | |
virtual std::size_t | ReadGeometriesConnectivities (ConnectivitiesContainerType &rGeometriesConnectivities) |
This method reads the geometries connectivities. More... | |
virtual void | WriteGeometries (GeometryContainerType const &rThisGeometries) |
This method writes an array of geometries. More... | |
virtual void | ReadElement (NodesContainerType &rThisNodes, PropertiesContainerType &rThisProperties, Element::Pointer &pThisElement) |
This method reads one element. More... | |
virtual void | ReadElements (NodesContainerType &rThisNodes, PropertiesContainerType &rThisProperties, ElementsContainerType &rThisElements) |
This method reads an array of elements. More... | |
virtual std::size_t | ReadElementsConnectivities (ConnectivitiesContainerType &rElementsConnectivities) |
This method reads the elements connectivities. More... | |
virtual void | WriteElements (ElementsContainerType const &rThisElements) |
This method writes an array of elements. More... | |
virtual void | ReadCondition (NodesContainerType &rThisNodes, PropertiesContainerType &rThisProperties, Condition::Pointer &pThisCondition) |
This method reads one condition. More... | |
virtual void | ReadConditions (NodesContainerType &rThisNodes, PropertiesContainerType &rThisProperties, ConditionsContainerType &rThisConditions) |
This method reads an array of conditions. More... | |
virtual std::size_t | ReadConditionsConnectivities (ConnectivitiesContainerType &rConditionsConnectivities) |
This method reads the conditions connectivities. More... | |
virtual void | WriteConditions (ConditionsContainerType const &rThisConditions) |
This method writes an array of conditions. More... | |
virtual void | ReadInitialValues (ModelPart &rThisModelPart) |
This method reads the initial values of the model part. More... | |
virtual void | ReadInitialValues (NodesContainerType &rThisNodes, ElementsContainerType &rThisElements, ConditionsContainerType &rThisConditions) |
This method reads the initial values of the nodes, elements and conditios. More... | |
virtual void | ReadMesh (MeshType &rThisMesh) |
This method reads the mesh. More... | |
virtual void | WriteMesh (MeshType &rThisMesh) |
This method writes the mesh. More... | |
virtual void | WriteMesh (const MeshType &rThisMesh) |
This method writes the mesh. More... | |
virtual void | ReadModelPart (ModelPart &rThisModelPart) |
This method reads the model part. More... | |
virtual void | WriteModelPart (ModelPart &rThisModelPart) |
This method writes the model part. More... | |
virtual void | WriteModelPart (const ModelPart &rThisModelPart) |
This method writes the model part. More... | |
virtual void | WriteNodeMesh (MeshType &rThisMesh) |
This method writes the node mesh. More... | |
virtual void | WriteNodeMesh (const MeshType &rThisMesh) |
This method writes the node mesh. More... | |
virtual std::size_t | ReadNodalGraph (ConnectivitiesContainerType &rAuxConnectivities) |
Read the input file and create the nodal connectivities graph, stored in CSR format. More... | |
virtual void | DivideInputToPartitions (SizeType NumberOfPartitions, const PartitioningInfo &rPartitioningInfo) |
This method divides a model part into partitions. More... | |
virtual void | DivideInputToPartitions (SizeType NumberOfPartitions, GraphType const &rDomainsColoredGraph, PartitionIndicesType const &rNodesPartitions, PartitionIndicesType const &rElementsPartitions, PartitionIndicesType const &rConditionsPartitions, PartitionIndicesContainerType const &rNodesAllPartitions, PartitionIndicesContainerType const &rElementsAllPartitions, PartitionIndicesContainerType const &rConditionsAllPartitions) |
This method divides a model part into partitions. More... | |
virtual void | DivideInputToPartitions (Kratos::shared_ptr< std::iostream > *pStreams, SizeType NumberOfPartitions, const PartitioningInfo &rPartitioningInfo) |
This method divides a model part into partitions. More... | |
virtual void | DivideInputToPartitions (Kratos::shared_ptr< std::iostream > *pStreams, SizeType NumberOfPartitions, GraphType const &rDomainsColoredGraph, PartitionIndicesType const &rNodesPartitions, PartitionIndicesType const &rElementsPartitions, PartitionIndicesType const &rConditionsPartitions, PartitionIndicesContainerType const &rNodesAllPartitions, PartitionIndicesContainerType const &rElementsAllPartitions, PartitionIndicesContainerType const &rConditionsAllPartitions) |
This method divides a model part into partitions. More... | |
virtual void | ReadSubModelPartElementsAndConditionsIds (std::string const &rModelPartName, std::unordered_set< SizeType > &rElementsIds, std::unordered_set< SizeType > &rConditionsIds) |
virtual std::size_t | ReadNodalGraphFromEntitiesList (ConnectivitiesContainerType &rAuxConnectivities, std::unordered_set< SizeType > &rElementsIds, std::unordered_set< SizeType > &rConditionsIds) |
Input and output | |
virtual std::string | Info () const |
Turn back information as a string. More... | |
virtual void | PrintInfo (std::ostream &rOStream) const |
Print information about this object. More... | |
virtual void | PrintData (std::ostream &rOStream) const |
Print object's data. More... | |
IO provides different implementation of input output procedures which can be used to read and write with different formats and characteristics.
IO provides different implementation of input output procedures which can be used to read and write with different formats and characteristics. An automatic configurable IO module is added to these components providing the complete set of solutions necessary for dealing with multi-disciplinary problems. This IO module uses different component lists to adjust itself when reading and writing new concepts originating from different fields of analysis.
typedef std::vector<std::vector<std::size_t> > Kratos::IO::ConnectivitiesContainerType |
typedef Geometry<NodeType> Kratos::IO::GeometryType |
typedef DenseMatrix<int> Kratos::IO::GraphType |
typedef Mesh<NodeType, Properties, Element, Condition> Kratos::IO::MeshType |
typedef Node Kratos::IO::NodeType |
typedef std::vector<std::vector<std::size_t> > Kratos::IO::PartitionIndicesContainerType |
typedef std::vector<std::size_t> Kratos::IO::PartitionIndicesType |
typedef std::size_t Kratos::IO::SizeType |
|
default |
Default constructor.
|
virtualdefault |
Destructor.
|
delete |
Copy constructor.
|
inlinevirtual |
This method divides a model part into partitions.
pStreams | The stream pointer |
NumberOfPartitions | The number of partitions |
rPartitioningInfo | Information about partitioning of entities |
Reimplemented in Kratos::ModelPartIO, and Kratos::MedModelPartIO.
|
inlinevirtual |
This method divides a model part into partitions.
pStreams | The stream pointer |
NumberOfPartitions | The number of partitions |
rDomainsColoredGraph | The colors of the partition graph |
rNodesPartitions | The partitions indices of the nodes |
rElementsPartitions | The partitions indices of the elements |
rConditionsPartitions | The partitions indices of the conditions |
rNodesAllPartitions | The partitions of the nodes |
rElementsAllPartitions | The partitions of the elements |
rConditionsAllPartitions | The partitions of the conditions |
|
inlinevirtual |
This method divides a model part into partitions.
NumberOfPartitions | The number of partitions |
rPartitioningInfo | Information about partitioning of entities |
Reimplemented in Kratos::ModelPartIO, and Kratos::MedModelPartIO.
|
inlinevirtual |
This method divides a model part into partitions.
NumberOfPartitions | The number of partitions |
rDomainsColoredGraph | The colors of the partition graph |
rNodesPartitions | The partitions indices of the nodes |
rElementsPartitions | The partitions indices of the elements |
rConditionsPartitions | The partitions indices of the conditions |
rNodesAllPartitions | The partitions of the nodes |
rElementsAllPartitions | The partitions of the elements |
rConditionsAllPartitions | The partitions of the conditions |
|
inlinevirtual |
Turn back information as a string.
Reimplemented in Kratos::VtkOutput, Kratos::StlIO, Kratos::ModelPartIO, Kratos::GidIO< TGaussPointContainer, TMeshContainer >, Kratos::GidIO< GidGaussPointsContainer, GidMeshContainer >, Kratos::VtkEigenOutput, Kratos::GidEigenIO, Kratos::ParticleVtkOutput, Kratos::MmgIO< TMMGLibrary >, Kratos::MedModelPartIO, and Kratos::KratosJsonIO.
Kratos::IO::KRATOS_DEFINE_LOCAL_FLAG | ( | APPEND | ) |
Kratos::IO::KRATOS_DEFINE_LOCAL_FLAG | ( | IGNORE_VARIABLES_ERROR | ) |
Kratos::IO::KRATOS_DEFINE_LOCAL_FLAG | ( | MESH_ONLY | ) |
Kratos::IO::KRATOS_DEFINE_LOCAL_FLAG | ( | READ | ) |
Local Flags.
Kratos::IO::KRATOS_DEFINE_LOCAL_FLAG | ( | SCIENTIFIC_PRECISION | ) |
Kratos::IO::KRATOS_DEFINE_LOCAL_FLAG | ( | SKIP_TIMER | ) |
Kratos::IO::KRATOS_DEFINE_LOCAL_FLAG | ( | WRITE | ) |
|
inlinevirtual |
Print object's data.
Reimplemented in Kratos::VtkOutput, Kratos::StlIO, Kratos::ModelPartIO, Kratos::GidIO< TGaussPointContainer, TMeshContainer >, Kratos::GidIO< GidGaussPointsContainer, GidMeshContainer >, Kratos::VtkEigenOutput, Kratos::GidEigenIO, Kratos::ParticleVtkOutput, Kratos::MmgIO< TMMGLibrary >, Kratos::MedModelPartIO, and Kratos::KratosJsonIO.
|
inlinevirtual |
Print information about this object.
Reimplemented in Kratos::VtkOutput, Kratos::StlIO, Kratos::ModelPartIO, Kratos::GidIO< TGaussPointContainer, TMeshContainer >, Kratos::GidIO< GidGaussPointsContainer, GidMeshContainer >, Kratos::VtkEigenOutput, Kratos::GidEigenIO, Kratos::ParticleVtkOutput, Kratos::MmgIO< TMMGLibrary >, Kratos::MedModelPartIO, and Kratos::KratosJsonIO.
|
inlinevirtual |
This method reads one condition.
rThisNodes | The nodes constituying the condition |
rThisProperties | The Properties of the condition |
pThisCondition | The pointer to the condition |
|
inlinevirtual |
This method reads an array of conditions.
rThisNodes | The nodes constituying the condition |
rThisProperties | The Properties of the condition |
rThisConditions | The array of conditions |
Reimplemented in Kratos::ModelPartIO, and Kratos::HDF5::ModelPartIO.
|
inlinevirtual |
This method reads the conditions connectivities.
rConditionsConnectivities | The conditions connectivities |
Reimplemented in Kratos::ModelPartIO.
|
inlinevirtual |
This method reads one element.
rThisNodes | The nodes constituying the element |
rThisProperties | The Properties of the element |
pThisElements | The pointer to the element |
Reimplemented in Kratos::ModelPartIO.
|
inlinevirtual |
This method reads an array of elements.
rThisNodes | The nodes constituying the element |
rThisProperties | The Properties of the element |
rThisElement | The array of elements |
Reimplemented in Kratos::ModelPartIO, and Kratos::HDF5::ModelPartIO.
|
inlinevirtual |
This method reads the elements connectivities.
rElementsConnectivities | The elements connectivities |
Reimplemented in Kratos::ModelPartIO.
|
inlinevirtual |
This method reads an array of geometries.
rThisNodes | The nodes constituting the geometry |
rThisGeometry | The array of geometries |
Reimplemented in Kratos::ModelPartIO.
|
inlinevirtual |
This method reads the geometries connectivities.
rGeometriesConnectivities | The geometries connectivities |
Reimplemented in Kratos::ModelPartIO.
|
inlinevirtual |
This method reads one geometry.
rThisNodes | The nodes constituting the geometry |
pThisGeometries | The pointer to the geometry |
Reimplemented in Kratos::ModelPartIO.
|
inlinevirtual |
This method reads the initial values of the model part.
rThisModelPart | The model part with the initial values to be read |
Reimplemented in Kratos::ModelPartIO.
|
inlinevirtual |
This method reads the initial values of the nodes, elements and conditios.
rThisNodes | The nodes with the initial values to be read |
rThisElements | The elements with the initial values to be read |
rThisConditions | The conditions with the initial values to be read |
|
inlinevirtual |
This method reads the mesh.
rThisMesh | The mesh to be read |
Reimplemented in Kratos::ModelPartIO.
|
inlinevirtual |
This method reads the model part.
rThisModelPart | The model part to be read |
Reimplemented in Kratos::StlIO, Kratos::ModelPartIO, Kratos::MedModelPartIO, Kratos::KratosJsonIO, Kratos::CadJsonInput< TNodeType, TEmbeddedNodeType >, Kratos::MmgIO< TMMGLibrary >, Kratos::HDF5::PartitionedModelPartIO, and Kratos::HDF5::ModelPartIO.
|
inlinevirtual |
Read the input file and create the nodal connectivities graph, stored in CSR format.
This function produces input for Metis' nodal graph partitioning algorithms. The nodal graph is stored as a (compressed) matrix where index (i,j) is non-zero if there is an edge in the mesh joining nodes i and j (note that nodes are numbered from zero here, to make integration with Metis simpler). After call, will point to C array of size NumNodes+1 containing the first CSR array: entries related to node k are stored between positions (*NodeIndices)[k] and (*NodeIndices)[k+1] of *NodeConnectivities.
rAuxConnectivities | After call, will point to a C array of size (*NodeIndices)[NumNodes]. entries between (*NodeIndices)[k] and (*NodeIndices)[k+1] are a list of all nodes connected to node k (counting from 0). |
Reimplemented in Kratos::ModelPartIO.
|
inlinevirtual |
Reimplemented in Kratos::ModelPartIO.
This method reads one node.
rThisNode | The node to be read |
Reimplemented in Kratos::ModelPartIO.
|
inlinevirtual |
This method reads the nodes from an array of nodes.
rThisNodes | The array of nodes to be read |
Reimplemented in Kratos::ModelPartIO, Kratos::HDF5::PartitionedModelPartIO, and Kratos::HDF5::ModelPartIO.
|
inlinevirtual |
This method reads the number of nodes.
Reimplemented in Kratos::ModelPartIO, and Kratos::HDF5::ModelPartIO.
|
inlinevirtual |
This method reads one Properties.
rThisProperties | The Properties to be read |
Reimplemented in Kratos::ModelPartIO.
|
inlinevirtual |
This method reads the Properties from an array of Properties.
rThisProperties | The array of Properties to be read |
Reimplemented in Kratos::ModelPartIO, and Kratos::HDF5::ModelPartIO.
|
inlinevirtual |
Reimplemented in Kratos::ModelPartIO.
|
inlinevirtual |
This method writes an array of conditions.
rThisConditions | The array of conditions to be written |
Reimplemented in Kratos::ModelPartIO, and Kratos::HDF5::ModelPartIO.
|
inlinevirtual |
This method writes an array of elements.
rThisElements | The array of elements to be written |
Reimplemented in Kratos::ModelPartIO, and Kratos::HDF5::ModelPartIO.
|
inlinevirtual |
This method writes an array of geometries.
rThisGeometries | The array of geometries to be written |
Reimplemented in Kratos::ModelPartIO.
|
inlinevirtual |
This method writes the mesh.
rThisMesh | The mesh to be written |
|
inlinevirtual |
This method writes the mesh.
rThisMesh | The mesh to be written |
Reimplemented in Kratos::ModelPartIO, Kratos::GidIO< TGaussPointContainer, TMeshContainer >, and Kratos::GidIO< GidGaussPointsContainer, GidMeshContainer >.
|
inlinevirtual |
This method writes the model part.
rThisModelPart | The model part to be written |
Reimplemented in Kratos::StlIO, and Kratos::MedModelPartIO.
|
inlinevirtual |
This method writes the model part.
rThisModelPart | The model part to be written |
Reimplemented in Kratos::ModelPartIO, Kratos::MmgIO< TMMGLibrary >, and Kratos::HDF5::ModelPartIO.
|
inlinevirtual |
This method writes the node mesh.
rThisMesh | The mesh to be written |
|
inlinevirtual |
This method writes the node mesh.
rThisMesh | The mesh to be written |
Reimplemented in Kratos::GidIO< TGaussPointContainer, TMeshContainer >, Kratos::GidIO< GidGaussPointsContainer, GidMeshContainer >, and Kratos::PfemFluidGidIO< TGaussPointContainer, TMeshContainer >.
|
inlinevirtual |
This method writes the nodes from an array of nodes.
rThisNodes | The array of nodes to be written |
Reimplemented in Kratos::ModelPartIO, Kratos::HDF5::PartitionedModelPartIO, and Kratos::HDF5::ModelPartIO.
|
inlinevirtual |
This method writes one Properties.
rThisProperties | The Properties to be written |
Reimplemented in Kratos::HDF5::ModelPartIO.
|
inlinevirtual |
This method writes the Properties from an array of Properties.
rThisProperties | The array of Properties to be written |
Reimplemented in Kratos::ModelPartIO, and Kratos::HDF5::ModelPartIO.