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.
optimization_utils.h
Go to the documentation of this file.
1 // | / |
2 // ' / __| _` | __| _ \ __|
3 // . \ | ( | | ( |\__ `
4 // _|\_\_| \__,_|\__|\___/ ____/
5 // Multi-Physics
6 //
7 // License: BSD License
8 // license: OptimizationApplication/license.txt
9 //
10 // Main author: Suneth Warnakulasuriya
11 //
12 
13 #pragma once
14 
15 // System includes
16 
17 // Project includes
18 #include "includes/define.h"
19 #include "includes/model_part.h"
21 
22 // Application includes
23 
24 namespace Kratos
25 {
26 
29 
30 class KRATOS_API(OPTIMIZATION_APPLICATION) OptimizationUtils
31 {
32 public:
35 
36  using IndexType = std::size_t;
37 
41 
42  template<class TContainerType>
43  static GeometryData::KratosGeometryType GetContainerEntityGeometryType(
44  const TContainerType& rContainer,
45  const DataCommunicator& rDataCommunicator);
46 
47  template<class TContainerType, class TDataType>
48  static bool IsVariableExistsInAllContainerProperties(
49  const TContainerType& rContainer,
50  const Variable<TDataType>& rVariable,
51  const DataCommunicator& rDataCommunicator);
52 
53  template<class TContainerType, class TDataType>
54  static bool IsVariableExistsInAtLeastOneContainerProperties(
55  const TContainerType& rContainer,
56  const Variable<TDataType>& rVariable,
57  const DataCommunicator& rDataCommunicator);
58 
59  template<class TContainerType>
60  static void CreateEntitySpecificPropertiesForContainer(
61  ModelPart& rModelPart,
62  TContainerType& rContainer);
63 
64  template<class TDataType>
66  const Variable<TDataType>& rVariable,
67  const IndexType DomainSize);
68 
69  static void CopySolutionStepVariablesList(
70  ModelPart& rDestinationModelPart,
71  const ModelPart& rOriginModelPart);
72 
74 };
75 
77 }
Serial (do-nothing) version of a wrapper class for MPI communication.
Definition: data_communicator.h:318
KratosGeometryType
Definition: geometry_data.h:110
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
Definition: optimization_utils.h:31
std::size_t IndexType
Definition: optimization_utils.h:36
static IndexType GetVariableDimension(const Variable< TDataType > &rVariable, const IndexType DomainSize)
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21