![]() |
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 defines an interface to the GiDPost library in order to provide GiD compliant I/O functionality. More...
#include <gid_io.h>
Public Member Functions | |
Life Cycle | |
GidIO (const std::string &rDatafilename, const GiD_PostMode Mode, const MultiFileFlag UseMultipleFilesFlag, const WriteDeformedMeshFlag WriteDeformedFlag, const WriteConditionsFlag WriteConditions, const bool InitializeGaussPointContainers=true) | |
Constructor. Single stream IO constructor. More... | |
~GidIO () override | |
Destructor. More... | |
![]() | |
int | GetData () |
void | SetData (int data) |
![]() | |
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 (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 (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) | |
Type Definitions | |
typedef IO | BaseType |
Base class definition. More... | |
typedef ModelPart::ElementsContainerType | ElementsArrayType |
Containers definition. More... | |
typedef ModelPart::NodesContainerType | NodesArrayType |
typedef ModelPart::ConditionsContainerType | ConditionsArrayType |
typedef GeometryData::IntegrationMethod | IntegrationMethodType |
Integration method definition. More... | |
typedef GeometryData::KratosGeometryFamily | KratosGeometryFamily |
Geometry family definition. More... | |
KRATOS_CLASS_POINTER_DEFINITION (GidIO) | |
Pointer definition of GidIO. More... | |
Operations | |
std::string | mResultFileName |
std::string | mMeshFileName |
GiD_FILE | mMeshFile |
GiD_FILE | mResultFile |
WriteDeformedMeshFlag | mWriteDeformed |
WriteConditionsFlag | mWriteConditions |
MultiFileFlag | mUseMultiFile |
GiD_PostMode | mMode |
std::vector< TMeshContainer > | mGidMeshContainers |
std::vector< TGaussPointContainer > | mGidGaussPointContainers |
bool | mMeshFileOpen |
bool | mResultFileOpen |
void | SetUpMeshContainers () |
Creates the mesh containers for all different element types. More... | |
virtual void | SetUpGaussPointContainers () |
Creates the gauss point containers for all different element types. More... | |
void | ChangeOutputName (const std::string &rDatafilename) |
General GidIO related functions ///. More... | |
void | InitializeResultFile (std::string const &rResultFileName) |
void | CloseResultFile () |
void | Flush () |
std::string | Info () const override |
void | PrintInfo (std::ostream &rOStream) const override |
void | PrintData (std::ostream &rOStream) const override |
virtual void | InitializeResults (const double name, const MeshType &rThisMesh) |
result functions More... | |
void | FinalizeResults () |
void | WriteNodalResults (Variable< bool > const &rVariable, const NodesContainerType &rNodes, const double SolutionTag, const std::size_t SolutionStepNumber) |
functions for writing nodal results More... | |
void | WriteNodalResults (Variable< double > const &rVariable, const NodesContainerType &rNodes, const double SolutionTag, const std::size_t SolutionStepNumber) |
functions for writing nodal results More... | |
void | WriteNodalResults (Variable< int > const &rVariable, const NodesContainerType &rNodes, const double SolutionTag, const std::size_t SolutionStepNumber) |
void | WriteNodalResults (Variable< array_1d< double, 3 > > const &rVariable, const NodesContainerType &rNodes, const double SolutionTag, const std::size_t SolutionStepNumber) |
void | WriteNodalResults (Variable< Vector > const &rVariable, const NodesContainerType &rNodes, const double SolutionTag, const std::size_t SolutionStepNumber) |
void | WriteNodalResults (Variable< Matrix > const &rVariable, const NodesContainerType &rNodes, const double SolutionTag, const std::size_t SolutionStepNumber) |
void | WriteLocalAxesOnNodes (Variable< array_1d< double, 3 > > const &rVariable, const NodesContainerType &rNodes, const double SolutionTag, const std::size_t SolutionStepNumber) |
void | WriteNodalFlags (const Kratos::Flags &rFlag, const std::string &rFlagName, const NodesContainerType &rNodes, const double SolutionTag) |
void | WriteNodalResultsNonHistorical (Variable< bool > const &rVariable, const NodesContainerType &rNodes, const double SolutionTag) |
void | WriteNodalResultsNonHistorical (Variable< double > const &rVariable, const NodesContainerType &rNodes, const double SolutionTag) |
functions for writing nodal results More... | |
void | WriteNodalResultsNonHistorical (Variable< int > const &rVariable, const NodesContainerType &rNodes, const double SolutionTag) |
void | WriteNodalResultsNonHistorical (Variable< array_1d< double, 3 > > const &rVariable, const NodesContainerType &rNodes, const double SolutionTag) |
void | WriteNodalResultsNonHistorical (Variable< Vector > const &rVariable, const NodesContainerType &rNodes, const double SolutionTag) |
void | WriteNodalResultsNonHistorical (Variable< Matrix > const &rVariable, const NodesContainerType &rNodes, const double SolutionTag) |
void | WriteLocalAxesOnNodesNonHistorical (Variable< array_1d< double, 3 > > const &rVariable, const NodesContainerType &rNodes, const double SolutionTag) |
void | InitializeMesh (const double name) |
mesh writing functions More... | |
void | FinalizeMesh () |
void | WriteNodeMesh (MeshType &rThisMesh) override |
void | WriteSphereMesh (const MeshType &rThisMesh) |
void | WriteCircleMesh (const MeshType &rThisMesh) |
void | WriteClusterMesh (const MeshType &rThisMesh) |
void | WriteMesh (MeshType &rThisMesh) override |
void | PrintFlagsOnGaussPoints (const Kratos::Flags &rFlag, const std::string &rFlagName, const ModelPart &rModelPart, const double SolutionTag) |
functions for printing results on gauss points More... | |
virtual void | PrintOnGaussPoints (const Variable< bool > &rVariable, const ModelPart &rModelPart, const double SolutionTag, const int ValueIndex=0) |
virtual void | PrintOnGaussPoints (const Variable< int > &rVariable, const ModelPart &rModelPart, const double SolutionTag, const int ValueIndex=0) |
virtual void | PrintOnGaussPoints (const Variable< double > &rVariable, const ModelPart &rModelPart, const double SolutionTag, const int ValueIndex=0) |
virtual void | PrintOnGaussPoints (const Variable< array_1d< double, 3 > > &rVariable, const ModelPart &rModelPart, const double SolutionTag, const int ValueIndex=0) |
virtual void | PrintOnGaussPoints (const Variable< Vector > &rVariable, const ModelPart &rModelPart, const double SolutionTag, const int ValueIndex=0) |
virtual void | PrintOnGaussPoints (const Variable< Matrix > &rVariable, const ModelPart &rModelPart, const double SolutionTag, const int ValueIndex=0) |
This class defines an interface to the GiDPost library in order to provide GiD compliant I/O functionality.
TGaussPointContainer | The gauss point container considered |
TMeshContainer | The mesh container considered |
typedef IO Kratos::GidIO< TGaussPointContainer, TMeshContainer >::BaseType |
Base class definition.
typedef ModelPart::ConditionsContainerType Kratos::GidIO< TGaussPointContainer, TMeshContainer >::ConditionsArrayType |
typedef ModelPart::ElementsContainerType Kratos::GidIO< TGaussPointContainer, TMeshContainer >::ElementsArrayType |
Containers definition.
typedef GeometryData::IntegrationMethod Kratos::GidIO< TGaussPointContainer, TMeshContainer >::IntegrationMethodType |
Integration method definition.
typedef GeometryData::KratosGeometryFamily Kratos::GidIO< TGaussPointContainer, TMeshContainer >::KratosGeometryFamily |
Geometry family definition.
typedef ModelPart::NodesContainerType Kratos::GidIO< TGaussPointContainer, TMeshContainer >::NodesArrayType |
|
inline |
Constructor. Single stream IO constructor.
|
inlineoverride |
Destructor.
|
inline |
|
inline |
TODO: check whether this is still necessary!
|
inline |
closes a mesh group
|
inline |
This has to be called for each solution step AFTER all the results have been written
|
inline |
TODO: check whether this is still necessary!
|
inlineoverridevirtual |
Turn back information as a string.
Reimplemented from Kratos::IO.
Reimplemented in Kratos::GidEigenIO.
|
inline |
mesh writing functions
opens a new mesh group
|
inline |
sets up the file names and opens the result file in case there is ASCII mode and only one file written
|
inlinevirtual |
result functions
This has to be called for each solution step BEFORE any results (on nodes and on gauss points) is written
SolutionTag | the current solution step (i.e. time) |
conditions_flag | states whether results should also be written on conditions |
Kratos::GidIO< TGaussPointContainer, TMeshContainer >::KRATOS_CLASS_POINTER_DEFINITION | ( | GidIO< TGaussPointContainer, TMeshContainer > | ) |
Pointer definition of GidIO.
|
inlineoverridevirtual |
|
inline |
functions for printing results on gauss points
Writes elemental and conditional flags
rFlag | the flag |
rFlagName | the given flag name |
rModelPart | the current model part |
|
inlineoverridevirtual |
Print information about this object.
Reimplemented from Kratos::IO.
Reimplemented in Kratos::GidEigenIO.
|
inlinevirtual |
Prints variables of type double on gauss points of the complete mesh
rVariable | the given variable name |
rModelPart | the current model part |
|
inlinevirtual |
Prints variables of type int on gauss points of the complete mesh
rVariable | the given variable name |
rModelPart | the current model part |
|
inlinevirtual |
Prints variables of type double on gauss points of the complete mesh
rVariable | the given variable name |
rModelPart | the current model part |
|
inlinevirtual |
Prints variables of type int on gauss points of the complete mesh
rVariable | the given variable name |
rModelPart | the current model part |
|
inlinevirtual |
Prints variables of type double on gauss points of the complete mesh
rVariable | the given variable name |
rModelPart | the current model part |
|
inlinevirtual |
Prints variables of type double on gauss points of the complete mesh
rVariable | the given variable name |
rModelPart | the current model part |
|
inlinevirtual |
Creates the gauss point containers for all different element types.
|
inline |
Creates the mesh containers for all different element types.
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineoverridevirtual |
This is a multi-purpose function that writes arbitrary meshes of elements and conditions in either deformed or undeformed state
rThisMesh | the current mesh to be written |
deformed_flag | states whether the mesh should be written in deformed configuration |
conditions_flag | states whether conditions should also be written |
Reimplemented from Kratos::IO.
|
inline |
Writes nodal flags
|
inline |
writes nodal results for variables of type array_1d<double, 3> (e.g. DISPLACEMENT)
|
inline |
functions for writing nodal results
writes nodal results for variables of type bool
|
inline |
functions for writing nodal results
writes nodal results for variables of type double
|
inline |
writes nodal results for variables of type int
|
inline |
writes nodal results for variables of type Matrix
|
inline |
writes nodal results for variables of type Vector (note that only vectors with 3 components can be printed)
|
inline |
writes nodal results for variables of type array_1d<double, 3> (e.g. DISPLACEMENT)
|
inline |
writes nodal results for variables of type bool
|
inline |
functions for writing nodal results
writes nodal results for variables of type double
|
inline |
writes nodal results for variables of type int
|
inline |
writes nodal results for variables of type Matrix
|
inline |
writes nodal results for variables of type Vector (note that only vectors with 3 components can be printed)
|
inlineoverridevirtual |
Writes a node mesh.
rThisMesh | the given mesh to be written to the output file |
solution_step | the current solution step |
deformed_flag | indicates whether the mesh shall be written in deformed or undeformed state |
Mode | either GiD_PostAscii (default) or GiD_PostBinary |
Reimplemented from Kratos::IO.
|
inline |
|
protected |
|
protected |
member variables
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
File names
|
protected |
|
protected |
|
protected |
|
protected |