69 GidIO<>(rDatafilename,
71 use_multiple_files_flag,
73 write_conditions_flag) { }
92 const SizeType NumberOfAnimationStep )
94 Label +=
"_" + rVariable.
Name();
95 GiD_fBeginResult(
mResultFile, (
char*)Label.c_str() ,
"EigenVector_Animation",
96 NumberOfAnimationStep, GiD_Scalar,
97 GiD_OnNodes, NULL, NULL, 0, NULL );
99 for (
const auto& r_node : rModelPart.
Nodes())
101 const double& nodal_result = r_node.FastGetSolutionStepValue(rVariable);
102 GiD_fWriteScalar(
mResultFile, r_node.Id(), nodal_result );
116 const SizeType NumberOfAnimationStep)
118 Label +=
"_" + rVariable.Name();
119 GiD_fBeginResult(
mResultFile, (
char*)Label.c_str() ,
"EigenVector_Animation",
120 NumberOfAnimationStep, GiD_Vector,
121 GiD_OnNodes, NULL, NULL, 0, NULL );
123 for (
auto& r_node : rModelPart.
Nodes())
126 GiD_fWriteVector(
mResultFile, r_node.Id(), nodal_result[0], nodal_result[1], nodal_result[2]);
148 std::string
Info()
const override
150 std::stringstream buffer;
151 buffer <<
"GidEigenIO" ;
156 void PrintInfo(std::ostream& rOStream)
const override {rOStream <<
"GidEigenIO";}
159 void PrintData(std::ostream& rOStream)
const override {}
GidIO extended for writting Eigenvalue Results.
Definition: gid_eigen_io.h:49
GidEigenIO(const std::string &rDatafilename, GiD_PostMode Mode, MultiFileFlag use_multiple_files_flag, WriteDeformedMeshFlag write_deformed_flag, WriteConditionsFlag write_conditions_flag)
Default constructor.
Definition: gid_eigen_io.h:64
KRATOS_CLASS_POINTER_DEFINITION(GidEigenIO)
Pointer definition of GidEigenIO.
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: gid_eigen_io.h:159
std::size_t SizeType
Definition: gid_eigen_io.h:57
std::string Info() const override
Turn back information as a string.
Definition: gid_eigen_io.h:148
void WriteEigenResults(ModelPart &rModelPart, const Variable< array_1d< double, 3 >> &rVariable, std::string Label, const SizeType NumberOfAnimationStep)
Definition: gid_eigen_io.h:113
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: gid_eigen_io.h:156
void WriteEigenResults(ModelPart &rModelPart, const Variable< double > &rVariable, std::string Label, const SizeType NumberOfAnimationStep)
Definition: gid_eigen_io.h:89
This class defines an interface to the GiDPost library in order to provide GiD compliant I/O function...
Definition: gid_io.h:112
GiD_FILE mResultFile
Definition: gid_io.h:1512
std::size_t SizeType
Definition: io.h:97
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
NodesContainerType & Nodes(IndexType ThisIndex=0)
Definition: model_part.h:507
const std::string & Name() const
Definition: variable_data.h:201
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
WriteDeformedMeshFlag
Flags for mesh writing.
Definition: gid_io.h:52
MultiFileFlag
Definition: gid_io.h:54
WriteConditionsFlag
Definition: gid_io.h:53