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.
read_materials_utility.h
Go to the documentation of this file.
1 // | / |
2 // ' / __| _` | __| _ \ __|
3 // . \ | ( | | ( |\__ `
4 // _|\_\_| \__,_|\__|\___/ ____/
5 // Multi-Physics
6 //
7 // License: BSD License
8 // Kratos default license: kratos/license.txt
9 //
10 // Main authors: Marcelo Raschi
11 // Vicente Mataix Ferrandiz
12 //
13 
14 # pragma once
15 
16 // System includes
17 
18 // External includes
19 
20 // Project includes
21 #include "containers/model.h"
23 
24 namespace Kratos {
25 
28 
32 
36 
40 
44 
55 class KRATOS_API(KRATOS_CORE) ReadMaterialsUtility
56 {
57  public:
58 
61 
63  using IndexType = std::size_t;
64 
66  using SizeType = std::size_t;
67 
70 
73 
77 
82  ReadMaterialsUtility(Model &rModel) : mrModel(rModel){};
83 
90  Parameters Params,
91  Model &rModel);
92 
98  ReadMaterialsUtility(const std::string &rParametersName, Model &rModel);
99 
102 
106 
110 
115  void ReadMaterials(Parameters MaterialData);
116 
122  virtual void AssignMaterialToProperty(
123  const Parameters MaterialData,
124  Properties &rProperty);
125 
131  virtual void AssignConstitutiveLawToProperty(
132  const Parameters MaterialData,
133  Properties &rProperty);
134 
140  virtual void AssignVariablesToProperty(
141  const Parameters MaterialData,
142  Properties &rProperty);
143 
149  virtual void AssignTablesToProperty(
150  const Parameters MaterialData,
151  Properties &rProperty);
152 
158  void AssignAccessorsToProperty(
159  const Parameters MaterialData,
160  Properties &rProperty);
161 
165 
169 
173 
175  std::string Info() const
176  {
177  return "ReadMaterialsUtility";
178  }
179 
181  void PrintInfo(std::ostream& rOStream) const {
182  rOStream << "ReadMaterialsUtility";
183  }
184 
186  void PrintData(std::ostream& rOStream) const {
187  }
188 
192 
194 
195  protected:
196 
199 
203 
207 
211 
218  virtual Parameters FilterVariables(
219  const Parameters VariablesParameters,
220  const IndexType PropertyId = 0
221  );
222 
231  void TrimComponentName(std::string& rLine);
232 
236 
240 
244 
246 
247  private:
248 
251 
255 
256  Model& mrModel;
257 
261 
265 
272  void CreateSubProperties(
273  ModelPart& rModelPart,
274  const Parameters SubPropertiesData,
275  Properties& rProperty
276  );
277 
282  void AssignPropertyBlock(Parameters Data);
283 
288  void GetPropertyBlock(Parameters Materials);
289 
294  void CheckUniqueMaterialAssignment(Parameters Materials);
295 
300  void CheckModelPartIsNotRepeated(std::vector<std::string>);
301 
302 
306 
310 
314 
315 
317 
318 }; // Class ReadMaterialsUtility
319 
321 
324 
328 
330 
331 } // namespace Kratos.
This class aims to manage different model parts across multi-physics simulations.
Definition: model.h:60
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
Properties encapsulates data shared by different Elements or Conditions. It can store any type of dat...
Definition: properties.h:69
Process to read constitutive law and material properties from a json file.
Definition: read_materials_utility.h:56
virtual ~ReadMaterialsUtility()
Destructor.
Definition: read_materials_utility.h:101
ReadMaterialsUtility(Model &rModel)
Default constructor.
Definition: read_materials_utility.h:82
std::size_t IndexType
Definition of the index type.
Definition: read_materials_utility.h:63
KRATOS_CLASS_POINTER_DEFINITION(ReadMaterialsUtility)
Pointer definition of ReadMaterialProcess.
void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: read_materials_utility.h:181
std::string Info() const
Turn back information as a string.
Definition: read_materials_utility.h:175
void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: read_materials_utility.h:186
std::size_t SizeType
Definition of the size type.
Definition: read_materials_utility.h:66
std::size_t IndexType
The definition of the index type.
Definition: key_hash.h:35
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21