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.
Public Types | Public Member Functions | List of all members
Kratos::UnvOutput Class Reference

Provides a tool to write UNV files. More...

#include <unv_output.h>

Collaboration diagram for Kratos::UnvOutput:

Public Types

enum class  DatasetID { NODES_DATASET = 2411 , ELEMENTS_DATASET = 2412 , RESULTS_DATASET = 2414 }
 
enum class  DatasetLocation {
  DATA_AT_NODES = 1 , DATA_AT_ELEMENTS = 2 , DATA_AT_NODES_ON_ELEMENTS = 3 , DATA_AT_POINTS = 5 ,
  DATA_ON_ELEMENTS_AT_NODES = 6
}
 
enum class  ModelType { UNKNOWN = 0 , STRUCTURAL = 1 , HEAT_TRANSFER = 2 , FLUID_FLOW = 3 }
 
enum class  AnalysisType {
  UNKNOWN = 0 , STATIC = 1 , NORMAL_MODE = 2 , COMPLEX_EIGENVALUE_FIRST_ORDER = 3 ,
  TRANSIENT = 4 , FREQUENCY_RESPONSE = 5 , BUCKLING = 6 , COMPLEX_EIGENVALUE_SECOND_ORDER = 7 ,
  STATIC_NON_LINEAR = 9 , CRAIG_BAMPTON_CONSTRAINT_MODES = 10 , EQUIVALENT_ATTACHMENT_MODES = 11 , EFFECTIVE_MASS_MODES = 12 ,
  EFFECTIVE_MASS_MATRIX = 13 , EFFECTIVE_MASS_MATRIX_COPY = 14 , DISTRIBUTED_LOAD_LOAD_DISTRIBUTION = 15 , DISTRIBUTED_LOAD_ATTACHMENT_MODES = 16
}
 
enum class  DataCharacteristics {
  UNKNOWN = 0 , SCALAR = 1 , D3_DOF_GLOBAL_TRANSLATION_VECTOR = 2 , D3_DOF_GLOBAL_TRANSLATION_ROTATION_VECTOR = 3 ,
  SYMMETRIC_GLOBAL_TENSOR = 4 , STRESS_RESULTANTS = 6
}
 
enum class  DataType {
  INTEGER = 1 , SINGLE_PRECISION_FLOATING_POINT = 2 , DOUBLE_PRECISION_FLOATING_POINT = 4 , SINGLE_PRECISION_COMPLEX = 5 ,
  DOUBLE_PRECISION_COMPLEX = 6
}
 

Public Member Functions

 KRATOS_CLASS_POINTER_DEFINITION (UnvOutput)
 
template<typename Enumeration >
auto as_integer (Enumeration const value) -> typename std::underlying_type< Enumeration >::type
 
 UnvOutput (Kratos::ModelPart &modelPart, const std::string &outFileWithoutExtension)
 
void InitializeOutputFile ()
 
void WriteMesh ()
 Writes 'mrOutputModelPart' associated mesh. More...
 
void WriteNodes ()
 Writes 'mrOutputModelPart' associated nodes. More...
 
void WriteElements ()
 Writes 'mrOutputModelPart' associated conditions. More...
 
void WriteNodalResults (const Variable< bool > &rVariable, const double timeStep)
 Writes a result dataset containing the rVariable value for a given timestep. More...
 
void WriteNodalResults (const Variable< int > &rVariable, const double timeStep)
 
void WriteNodalResults (const Variable< double > &rVariable, const double timeStep)
 
void WriteNodalResults (const Variable< array_1d< double, 3 >> &rVariable, const double timeStep)
 
void WriteNodalResults (const Variable< Vector > &rVariable, const double timeStep)
 
void WriteNodalResults (const Variable< Matrix > &rVariable, const double timeStep)
 
UnvOutput::DataCharacteristics GetDataType (const Variable< bool > &)
 Returns the type of unv data associated to a Kratos Variable. More...
 
UnvOutput::DataCharacteristics GetDataType (const Variable< int > &)
 
UnvOutput::DataCharacteristics GetDataType (const Variable< double > &)
 
UnvOutput::DataCharacteristics GetDataType (const Variable< array_1d< double, 3 >> &)
 
UnvOutput::DataCharacteristics GetDataType (const Variable< Vector > &)
 
UnvOutput::DataCharacteristics GetDataType (const Variable< Matrix > &)
 
void WriteNodalResultValues (std::ofstream &outputFile, const Node &node, const Variable< bool > &rVariable)
 Writes the variable value for a node. More...
 
void WriteNodalResultValues (std::ofstream &outputFile, const Node &node, const Variable< int > &rVariable)
 
void WriteNodalResultValues (std::ofstream &outputFile, const Node &node, const Variable< double > &rVariable)
 
void WriteNodalResultValues (std::ofstream &outputFile, const Node &node, const Variable< array_1d< double, 3 >> &rVariable)
 
void WriteNodalResultValues (std::ofstream &outputFile, const Node &node, const Variable< Vector > &rVariable)
 
void WriteNodalResultValues (std::ofstream &outputFile, const Node &node, const Variable< Matrix > &rVariable)
 
template<class TVariablebleType >
int GetUnvVariableName (const TVariablebleType &rVariable)
 Get the id of the UNV variable name corresponding to rVariable. 1000+ if none found. More...
 
template<class TVariablebleType >
void WriteNodalResultRecords (const TVariablebleType &rVariable, const int numComponents, const double timeStep)
 Writes a result dataset using the results in node mode. More...
 

Detailed Description

Provides a tool to write UNV files.

Currently 3 datasets are supported: 2411 - Node Dataset 2412 - Element Dataset 2414 - Result Dataset

Member Enumeration Documentation

◆ AnalysisType

Enumerator
UNKNOWN 
STATIC 
NORMAL_MODE 
COMPLEX_EIGENVALUE_FIRST_ORDER 
TRANSIENT 
FREQUENCY_RESPONSE 
BUCKLING 
COMPLEX_EIGENVALUE_SECOND_ORDER 
STATIC_NON_LINEAR 
CRAIG_BAMPTON_CONSTRAINT_MODES 
EQUIVALENT_ATTACHMENT_MODES 
EFFECTIVE_MASS_MODES 
EFFECTIVE_MASS_MATRIX 
EFFECTIVE_MASS_MATRIX_COPY 
DISTRIBUTED_LOAD_LOAD_DISTRIBUTION 
DISTRIBUTED_LOAD_ATTACHMENT_MODES 

◆ DataCharacteristics

Enumerator
UNKNOWN 
SCALAR 
D3_DOF_GLOBAL_TRANSLATION_VECTOR 
D3_DOF_GLOBAL_TRANSLATION_ROTATION_VECTOR 
SYMMETRIC_GLOBAL_TENSOR 
STRESS_RESULTANTS 

◆ DatasetID

Enumerator
NODES_DATASET 
ELEMENTS_DATASET 
RESULTS_DATASET 

◆ DatasetLocation

Enumerator
DATA_AT_NODES 
DATA_AT_ELEMENTS 
DATA_AT_NODES_ON_ELEMENTS 
DATA_AT_POINTS 
DATA_ON_ELEMENTS_AT_NODES 

◆ DataType

Enumerator
INTEGER 
SINGLE_PRECISION_FLOATING_POINT 
DOUBLE_PRECISION_FLOATING_POINT 
SINGLE_PRECISION_COMPLEX 
DOUBLE_PRECISION_COMPLEX 

◆ ModelType

Enumerator
UNKNOWN 
STRUCTURAL 
HEAT_TRANSFER 
FLUID_FLOW 

Constructor & Destructor Documentation

◆ UnvOutput()

Kratos::UnvOutput::UnvOutput ( Kratos::ModelPart modelPart,
const std::string &  outFileWithoutExtension 
)

Member Function Documentation

◆ as_integer()

template<typename Enumeration >
auto Kratos::UnvOutput::as_integer ( Enumeration const  value) -> typename std::underlying_type<Enumeration>::type
inline

◆ GetDataType() [1/6]

UnvOutput::DataCharacteristics Kratos::UnvOutput::GetDataType ( const Variable< array_1d< double, 3 >> &  rVariable)

◆ GetDataType() [2/6]

UnvOutput::DataCharacteristics Kratos::UnvOutput::GetDataType ( const Variable< bool > &  rVariable)

Returns the type of unv data associated to a Kratos Variable.

Vectors and Matrices are not supported at this time.

Returns
UnvOutput::DataCharacteristics If of the unv data type

◆ GetDataType() [3/6]

UnvOutput::DataCharacteristics Kratos::UnvOutput::GetDataType ( const Variable< double > &  rVariable)

◆ GetDataType() [4/6]

UnvOutput::DataCharacteristics Kratos::UnvOutput::GetDataType ( const Variable< int > &  rVariable)

◆ GetDataType() [5/6]

UnvOutput::DataCharacteristics Kratos::UnvOutput::GetDataType ( const Variable< Matrix > &  rVariable)

◆ GetDataType() [6/6]

UnvOutput::DataCharacteristics Kratos::UnvOutput::GetDataType ( const Variable< Vector > &  rVariable)

◆ GetUnvVariableName()

template<class TVariablebleType >
int Kratos::UnvOutput::GetUnvVariableName ( const TVariablebleType &  rVariable)
inline

Get the id of the UNV variable name corresponding to rVariable. 1000+ if none found.

Parameters
rVariableKratos Variable
Returns
int Id of the unv variable corresponding to rVariable

◆ InitializeOutputFile()

void Kratos::UnvOutput::InitializeOutputFile ( )

◆ KRATOS_CLASS_POINTER_DEFINITION()

Kratos::UnvOutput::KRATOS_CLASS_POINTER_DEFINITION ( UnvOutput  )

◆ WriteElements()

void Kratos::UnvOutput::WriteElements ( )

Writes 'mrOutputModelPart' associated conditions.

◆ WriteMesh()

void Kratos::UnvOutput::WriteMesh ( )

Writes 'mrOutputModelPart' associated mesh.

◆ WriteNodalResultRecords()

template<class TVariablebleType >
void Kratos::UnvOutput::WriteNodalResultRecords ( const TVariablebleType &  rVariable,
const int  numComponents,
const double  timeStep 
)
inline

Writes a result dataset using the results in node mode.

Fromat: Partially extracted from: http://users.ices.utexas.edu R. 1: unique number of dataset (dataset_label) R. 2: text describing content (dataset_name) R. 3: data belongs to: nodes, elements,... (dataset_location) R. 4: user-specified text (id_lines_1_to_5[0]) R. 5: user-specified text (id_lines_1_to_5[1]) R. 6: user-specified text (id_lines_1_to_5[2]) R. 7: user-specified text (id_lines_1_to_5[3]) R. 8: user-specified text (id_lines_1_to_5[4]) R. 9: (model_type) (analysis_type) (data_characteristic) (result_type) (data_type) (nvaldc) R. 10: (design_set_id) (iteration_number) (solution_set_id) (boundary_condition) (load_set) (mode_number) (time_stamp_number) (frequency_number) R. 11: (creation_option) (Unknown)*7 R. 12: (time) (frequency) (eigenvalue) (nodal_mass) (viscous_damping_ratio) (hysteretic_damping_ratio) R. 13: (eigenvalue_re) (eigenvalue_im) (modalA_re) (modalA_im) (modalB_re) (modalB_im)

For nodes (Repeat for every node):

R. 14: (node_id) R. 15: (result)*nvaldc

Parameters
rVariableVariable to be printed
numComponentsNumber of components of the variable
timeStepCurrent TimeStep

◆ WriteNodalResults() [1/6]

void Kratos::UnvOutput::WriteNodalResults ( const Variable< array_1d< double, 3 >> &  rVariable,
const double  timeStep 
)

◆ WriteNodalResults() [2/6]

void Kratos::UnvOutput::WriteNodalResults ( const Variable< bool > &  rVariable,
const double  timeStep 
)

Writes a result dataset containing the rVariable value for a given timestep.

Parameters
rVariableKratos Variable to be printed
timeStepTimeStep.

◆ WriteNodalResults() [3/6]

void Kratos::UnvOutput::WriteNodalResults ( const Variable< double > &  rVariable,
const double  timeStep 
)

◆ WriteNodalResults() [4/6]

void Kratos::UnvOutput::WriteNodalResults ( const Variable< int > &  rVariable,
const double  timeStep 
)

◆ WriteNodalResults() [5/6]

void Kratos::UnvOutput::WriteNodalResults ( const Variable< Matrix > &  rVariable,
const double  timeStep 
)

◆ WriteNodalResults() [6/6]

void Kratos::UnvOutput::WriteNodalResults ( const Variable< Vector > &  rVariable,
const double  timeStep 
)

◆ WriteNodalResultValues() [1/6]

void Kratos::UnvOutput::WriteNodalResultValues ( std::ofstream &  outputFile,
const Node node,
const Variable< array_1d< double, 3 >> &  rVariable 
)

◆ WriteNodalResultValues() [2/6]

void Kratos::UnvOutput::WriteNodalResultValues ( std::ofstream &  outputFile,
const Node node,
const Variable< bool > &  rVariable 
)

Writes the variable value for a node.

Vectors and Matrices are not supported at this time.

Parameters
outputFileOutput file
nodeInput node
rVariableVariable to print

◆ WriteNodalResultValues() [3/6]

void Kratos::UnvOutput::WriteNodalResultValues ( std::ofstream &  outputFile,
const Node node,
const Variable< double > &  rVariable 
)

◆ WriteNodalResultValues() [4/6]

void Kratos::UnvOutput::WriteNodalResultValues ( std::ofstream &  outputFile,
const Node node,
const Variable< int > &  rVariable 
)

◆ WriteNodalResultValues() [5/6]

void Kratos::UnvOutput::WriteNodalResultValues ( std::ofstream &  outputFile,
const Node node,
const Variable< Matrix > &  rVariable 
)

◆ WriteNodalResultValues() [6/6]

void Kratos::UnvOutput::WriteNodalResultValues ( std::ofstream &  outputFile,
const Node node,
const Variable< Vector > &  rVariable 
)

◆ WriteNodes()

void Kratos::UnvOutput::WriteNodes ( )

Writes 'mrOutputModelPart' associated nodes.


The documentation for this class was generated from the following files: