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.
fluid_adjoint_test_utilities.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: Suneth Warnakulasuriya
11 //
12 
13 #pragma once
14 
15 // System includes
16 #include <functional>
17 #include <vector>
18 
19 // External includes
20 
21 // Project includes
22 #include "containers/model.h"
23 #include "includes/model_part.h"
24 #include "processes/process.h"
25 
26 // Application includes
27 
28 namespace Kratos
29 {
32 
33 class KRATOS_API(FLUID_DYNAMICS_APPLICATION) FluidAdjointTestUtilities
34 {
35 public:
38 
39  using IndexType = std::size_t;
40 
42 
44 
46 
50 
51  template<class TDataType>
52  static TDataType CalculateRelaxedVariableRate(
53  const double BossakAlpha,
54  const Variable<TDataType>& rVariable,
55  const NodeType& rNode);
56 
57  template<class TDataType>
59  ModelPart& rPrimalModelPart,
60  ModelPart& rAdjointModelPart,
61  const std::function<void(ModelPart&)>& rUpdateModelPart,
62  const Variable<TDataType>& rVariable,
63  const std::function<void(Matrix&, ConditionType&, const ProcessInfo&)>& rCalculateElementResidualDerivatives,
64  const IndexType EquationOffset,
65  const IndexType DerivativeOffset,
66  const double Delta,
67  const double Tolerance);
68 
69  template<class TDataType>
71  ModelPart& rPrimalModelPart,
72  ModelPart& rAdjointModelPart,
73  const std::function<void(ModelPart&)>& rUpdateModelPart,
74  const Variable<TDataType>& rVariable,
75  const std::function<void(Matrix&, ElementType&, const ProcessInfo&)>& rCalculateElementResidualDerivatives,
76  const IndexType EquationOffset,
77  const IndexType DerivativeOffset,
78  const double Delta,
79  const double Tolerance);
80 
82 };
83 
85 
86 } // namespace Kratos
Base class for all Conditions.
Definition: condition.h:59
Base class for all Elements.
Definition: element.h:60
Definition: fluid_adjoint_test_utilities.h:34
std::size_t IndexType
Definition: fluid_adjoint_test_utilities.h:39
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
Element ElementType
Definition: model_part.h:120
Node NodeType
Definition: model_part.h:117
Condition ConditionType
Definition: model_part.h:121
This class defines the node.
Definition: node.h:65
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
void RunAdjointEntityDerivativesTest(ModelPart &rPrimalModelPart, ModelPart &rAdjointModelPart, const std::function< void(ModelPart &)> &rUpdateModelPart, const Variable< TDataType > &rVariable, const std::function< void(Matrix &, typename TContainerType::data_type &, const ProcessInfo &)> &rCalculateElementResidualDerivatives, const IndexType EquationOffset, const IndexType DerivativeOffset, const double Delta, const double Tolerance)
Definition: fluid_adjoint_test_utilities.cpp:191
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21