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.
|
This class is a IO which uses the MMG library. More...
#include <mmg_io.h>
Public Member Functions | |
Life Cycle | |
MmgIO (std::string const &rFilename, Parameters ThisParameters=Parameters(R"({})"), const Flags Options=IO::READ|IO::IGNORE_VARIABLES_ERROR.AsFalse()|IO::SKIP_TIMER) | |
Constructor with filenames. More... | |
~MmgIO () override=default | |
Destructor. More... | |
Operations | |
void | ReadModelPart (ModelPart &rModelPart) override |
This read the current stream file in order to write a model part. More... | |
void | WriteModelPart (ModelPart &rModelPart) override |
This writes the current model part info a file. More... | |
std::string | GetMmgVersion () |
This method retrieves the current Mmg version. More... | |
Input and output | |
std::string | Info () const override |
Turn back information as a string. More... | |
void | PrintInfo (std::ostream &rOStream) const override |
Print information about this object. More... | |
void | PrintData (std::ostream &rOStream) const override |
Print object's data. More... | |
Public Member Functions inherited from Kratos::IO | |
IO ()=default | |
Default constructor. More... | |
virtual | ~IO ()=default |
Destructor. More... | |
IO (IO const &rOther)=delete | |
Copy constructor. More... | |
IO & | operator= (IO const &rOther)=delete |
Assignment operator. More... | |
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 | 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) |
KRATOS_CLASS_POINTER_DEFINITION (IO) | |
Pointer definition of IO. More... | |
KRATOS_DEFINE_LOCAL_FLAG (READ) | |
Local Flags. More... | |
KRATOS_DEFINE_LOCAL_FLAG (WRITE) | |
KRATOS_DEFINE_LOCAL_FLAG (APPEND) | |
KRATOS_DEFINE_LOCAL_FLAG (IGNORE_VARIABLES_ERROR) | |
KRATOS_DEFINE_LOCAL_FLAG (SKIP_TIMER) | |
KRATOS_DEFINE_LOCAL_FLAG (MESH_ONLY) | |
KRATOS_DEFINE_LOCAL_FLAG (SCIENTIFIC_PRECISION) | |
Additional Inherited Members | |
Public Types inherited from Kratos::IO | |
typedef Node | NodeType |
typedef Geometry< NodeType > | GeometryType |
typedef Mesh< NodeType, Properties, Element, Condition > | MeshType |
typedef MeshType::NodesContainerType | NodesContainerType |
typedef MeshType::PropertiesContainerType | PropertiesContainerType |
typedef ModelPart::GeometryContainerType | GeometryContainerType |
typedef MeshType::ElementsContainerType | ElementsContainerType |
typedef MeshType::ConditionsContainerType | ConditionsContainerType |
typedef std::vector< std::vector< std::size_t > > | ConnectivitiesContainerType |
typedef std::vector< std::vector< std::size_t > > | PartitionIndicesContainerType |
typedef std::vector< std::size_t > | PartitionIndicesType |
typedef std::size_t | SizeType |
typedef DenseMatrix< int > | GraphType |
This class is a IO which uses the MMG library.
This class is an IO tool for MMG .mesh files
typedef std::unordered_map<IndexType,IndexType> Kratos::MmgIO< TMMGLibrary >::ColorsMapType |
Colors map.
typedef MeshType::ConditionConstantIterator Kratos::MmgIO< TMMGLibrary >::ConditionConstantIterator |
Conditions container definition.
typedef ModelPart::ConditionsContainerType Kratos::MmgIO< TMMGLibrary >::ConditionsArrayType |
Conditions containers definition.
typedef std::unordered_map<DoubleVectorType, IndexType, KeyHasherRange<DoubleVectorType>, KeyComparorRange<DoubleVectorType> > Kratos::MmgIO< TMMGLibrary >::DoubleVectorMapType |
Double vector map.
typedef std::vector<double> Kratos::MmgIO< TMMGLibrary >::DoubleVectorType |
Double vector.
typedef MeshType::ElementConstantIterator Kratos::MmgIO< TMMGLibrary >::ElementConstantIterator |
Elements container definition.
typedef ModelPart::ElementsContainerType Kratos::MmgIO< TMMGLibrary >::ElementsArrayType |
Elements containers definition.
typedef Geometry<NodeType> Kratos::MmgIO< TMMGLibrary >::GeometryType |
typedef std::pair<IndexType,IndexType> Kratos::MmgIO< TMMGLibrary >::IndexPairType |
Index pair.
typedef std::unordered_map<IndexVectorType, IndexType, KeyHasherRange<IndexVectorType>, KeyComparorRange<IndexVectorType> > Kratos::MmgIO< TMMGLibrary >::IndexVectorMapType |
Index vector map.
typedef Mesh<NodeType, Properties, Element, Condition> Kratos::MmgIO< TMMGLibrary >::MeshType |
Mesh definition.
typedef MeshType::NodeConstantIterator Kratos::MmgIO< TMMGLibrary >::NodeConstantIterator |
Nodes container definition.
typedef ModelPart::NodesContainerType Kratos::MmgIO< TMMGLibrary >::NodesArrayType |
Node containers definition.
typedef Node Kratos::MmgIO< TMMGLibrary >::NodeType |
Node definition.
typedef MeshType::PropertiesContainerType Kratos::MmgIO< TMMGLibrary >::PropertiesContainerType |
Properties container definition.
typedef std::conditional<Dimension == 2, array_1d<double, 3>, array_1d<double, 6> >::type Kratos::MmgIO< TMMGLibrary >::TensorArrayType |
The type of array considered for the tensor.
Kratos::MmgIO< TMMGLibrary >::MmgIO | ( | std::string const & | rFilename, |
Parameters | ThisParameters = Parameters(R"({})") , |
||
const Flags | Options = IO::READ | IO::IGNORE_VARIABLES_ERROR.AsFalse() | IO::SKIP_TIMER |
||
) |
Constructor with filenames.
|
overridedefault |
Destructor.
std::string Kratos::MmgIO< TMMGLibrary >::GetMmgVersion |
This method retrieves the current Mmg version.
|
inlineoverridevirtual |
Turn back information as a string.
Reimplemented from Kratos::IO.
Kratos::MmgIO< TMMGLibrary >::KRATOS_CLASS_POINTER_DEFINITION | ( | MmgIO< TMMGLibrary > | ) |
Pointer definition of MmgIO.
|
inlineoverridevirtual |
Print object's data.
Reimplemented from Kratos::IO.
|
inlineoverridevirtual |
Print information about this object.
Reimplemented from Kratos::IO.
|
overridevirtual |
This read the current stream file in order to write a model part.
Where the sub model parts IDs are stored
Reference condition
Reference element
Reimplemented from Kratos::IO.
|
overridevirtual |
This writes the current model part info a file.
Where the sub model parts IDs are stored
Reference element
Reference condition
Reimplemented from Kratos::IO.
|
staticconstexpr |
Conditions array size.
|
staticconstexpr |
Conditions array size.
|
staticconstexpr |
Elements array size.