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.
List of all members
Kratos::ReadMaterialsUtility Class Reference

Process to read constitutive law and material properties from a json file. More...

#include <read_materials_utility.h>

Collaboration diagram for Kratos::ReadMaterialsUtility:

Public Types

Type Definitions
using IndexType = std::size_t
 Definition of the index type. More...
 
using SizeType = std::size_t
 Definition of the size type. More...
 

Public Member Functions

Pointer Definitions
 KRATOS_CLASS_POINTER_DEFINITION (ReadMaterialsUtility)
 Pointer definition of ReadMaterialProcess. More...
 
Life Cycle
 ReadMaterialsUtility (Model &rModel)
 Default constructor. More...
 
 ReadMaterialsUtility (Parameters Params, Model &rModel)
 Constructor reading directly from file, via parameters. More...
 
 ReadMaterialsUtility (const std::string &rParametersName, Model &rModel)
 Constructor reading directly from file, via text. More...
 
virtual ~ReadMaterialsUtility ()
 Destructor. More...
 
Operations
void ReadMaterials (Parameters MaterialData)
 This reads the properties from parameters. More...
 
virtual void AssignMaterialToProperty (const Parameters MaterialData, Properties &rProperty)
 This method assigns the material parameters to a property from configuration parameters. More...
 
virtual void AssignConstitutiveLawToProperty (const Parameters MaterialData, Properties &rProperty)
 This method assigns the constitutive law to a property from configuration parameters. More...
 
virtual void AssignVariablesToProperty (const Parameters MaterialData, Properties &rProperty)
 This method assigns the variables to a property from configuration parameters. More...
 
virtual void AssignTablesToProperty (const Parameters MaterialData, Properties &rProperty)
 This method assigns the tables to a property from configuration parameters. More...
 
void AssignAccessorsToProperty (const Parameters MaterialData, Properties &rProperty)
 This method assigns the accessors to a property from configuration parameters. More...
 
Input and output
std::string Info () const
 Turn back information as a string. More...
 
void PrintInfo (std::ostream &rOStream) const
 Print information about this object. More...
 
void PrintData (std::ostream &rOStream) const
 Print object's data. More...
 

Protected Member Functions

Protected Operations
virtual Parameters FilterVariables (const Parameters VariablesParameters, const IndexType PropertyId=0)
 This method creates an auxiliar Parameters when reading properties in order to avoid error, so these non-registered properties can be processed later. More...
 
void TrimComponentName (std::string &rLine)
 Trims out a component name, separating by '.". More...
 

Detailed Description

Process to read constitutive law and material properties from a json file.

This process reads constitutive law and material properties from a json file and assign them to elements and conditions. The definition includes the creation of subproperties

Author
Marcelo Raschi
Vicente Mataix Ferrandiz

Member Typedef Documentation

◆ IndexType

Definition of the index type.

◆ SizeType

Definition of the size type.

Constructor & Destructor Documentation

◆ ReadMaterialsUtility() [1/3]

Kratos::ReadMaterialsUtility::ReadMaterialsUtility ( Model rModel)
inline

Default constructor.

Parameters
rModelThe model containing the problem to solve

◆ ReadMaterialsUtility() [2/3]

Kratos::ReadMaterialsUtility::ReadMaterialsUtility ( Parameters  Params,
Model rModel 
)

Constructor reading directly from file, via parameters.

Parameters
ParamsThe configuration parameters telling where the configuration file can be found
rModelThe model containing the problem to solve

◆ ReadMaterialsUtility() [3/3]

Kratos::ReadMaterialsUtility::ReadMaterialsUtility ( const std::string &  rParametersName,
Model rModel 
)

Constructor reading directly from file, via text.

Parameters
ParamsThe string telling where the configuration file can be found
rModelThe model containing the problem to solve

◆ ~ReadMaterialsUtility()

virtual Kratos::ReadMaterialsUtility::~ReadMaterialsUtility ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ AssignAccessorsToProperty()

void Kratos::ReadMaterialsUtility::AssignAccessorsToProperty ( const Parameters  MaterialData,
Properties rProperty 
)

This method assigns the accessors to a property from configuration parameters.

Parameters
MaterialDataThe parameters containing all the configurations of the materials
rPropertyThe reference to the property for which the materials are to be assigned

◆ AssignConstitutiveLawToProperty()

void Kratos::ReadMaterialsUtility::AssignConstitutiveLawToProperty ( const Parameters  MaterialData,
Properties rProperty 
)
virtual

This method assigns the constitutive law to a property from configuration parameters.

Parameters
MaterialDataThe parameters containing all the configurations of the materials
rPropertyThe reference to the property for which the materials are to be assigned

◆ AssignMaterialToProperty()

void Kratos::ReadMaterialsUtility::AssignMaterialToProperty ( const Parameters  MaterialData,
Properties rProperty 
)
virtual

This method assigns the material parameters to a property from configuration parameters.

Parameters
MaterialDataThe parameters containing all the configurations of the materials
rPropertyThe reference to the property for which the materials are to be assigned

◆ AssignTablesToProperty()

void Kratos::ReadMaterialsUtility::AssignTablesToProperty ( const Parameters  MaterialData,
Properties rProperty 
)
virtual

This method assigns the tables to a property from configuration parameters.

Parameters
MaterialDataThe parameters containing all the configurations of the materials
rPropertyThe reference to the property for which the materials are to be assigned

◆ AssignVariablesToProperty()

void Kratos::ReadMaterialsUtility::AssignVariablesToProperty ( const Parameters  MaterialData,
Properties rProperty 
)
virtual

This method assigns the variables to a property from configuration parameters.

Parameters
MaterialDataThe parameters containing all the configurations of the materials
rPropertyThe reference to the property for which the materials are to be assigned

◆ FilterVariables()

Parameters Kratos::ReadMaterialsUtility::FilterVariables ( const Parameters  VariablesParameters,
const IndexType  PropertyId = 0 
)
protectedvirtual

This method creates an auxiliar Parameters when reading properties in order to avoid error, so these non-registered properties can be processed later.

Parameters
VariablesParametersThe original variable parameters
PropertyIdThe current property Id (for a warning)
Returns
The variables filtered if required

◆ Info()

std::string Kratos::ReadMaterialsUtility::Info ( ) const
inline

Turn back information as a string.

◆ KRATOS_CLASS_POINTER_DEFINITION()

Kratos::ReadMaterialsUtility::KRATOS_CLASS_POINTER_DEFINITION ( ReadMaterialsUtility  )

Pointer definition of ReadMaterialProcess.

◆ PrintData()

void Kratos::ReadMaterialsUtility::PrintData ( std::ostream &  rOStream) const
inline

Print object's data.

◆ PrintInfo()

void Kratos::ReadMaterialsUtility::PrintInfo ( std::ostream &  rOStream) const
inline

Print information about this object.

◆ ReadMaterials()

void Kratos::ReadMaterialsUtility::ReadMaterials ( Parameters  MaterialData)

This reads the properties from parameters.

Parameters
MaterialDataThe configuration parameters defining the properties

◆ TrimComponentName()

void Kratos::ReadMaterialsUtility::TrimComponentName ( std::string &  rLine)
protected

Trims out a component name, separating by '.".

Trims out a component name, removing unnecessary module information. For backward compatibility. Ex: KratosMultiphysics.YOUNG_MODULUS -> YOUNG_MODULUS Ex: KratosMultiphysics.StructuralMechanicsApplication.LinearElastic3D -> LinearElastic3D

Parameters
rLineComponent name in materials json file

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