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.
eigensolver_nitsche_stabilization_scheme.hpp
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 #if !defined(KRATOS_EIGENSOLVER_NITSCHE_STABILIZATION_SCHEME )
11 #define KRATOS_EIGENSOLVER_NITSCHE_STABILIZATION_SCHEME
12 
13 // System includes
14 
15 // External includes
16 
17 // Project includes
18 #include "includes/define.h"
19 #include "includes/element.h"
20 #include "includes/condition.h"
21 #include "includes/process_info.h"
24 
25 // Application includes
27 
28 namespace Kratos
29 {
30 
33 
37 
41 
45 
49 
51 template<class TSparseSpace,
52  class TDenseSpace
53  >
54 class EigensolverNitscheStabilizationScheme : public Scheme<TSparseSpace,TDenseSpace>
55 {
56 public:
59 
61 
63 
65 
67 
71 
73  EigensolverNitscheStabilizationScheme() : Scheme<TSparseSpace,TDenseSpace>() {}
74 
77 
81 
87  Element& rCurrentElement,
88  LocalSystemMatrixType& LHS_Contribution,
89  LocalSystemVectorType& RHS_Contribution,
91  const ProcessInfo& CurrentProcessInfo
92  ) override
93  {
95 
96  if (CurrentProcessInfo[BUILD_LEVEL] == 1)
97  {
98  rCurrentElement.CalculateLocalSystem(LHS_Contribution,RHS_Contribution,CurrentProcessInfo);
99  }
100 
101  rCurrentElement.EquationIdVector(EquationId,CurrentProcessInfo);
102 
103  KRATOS_CATCH("")
104  }
105 
111  Condition& rCurrentCondition,
112  LocalSystemMatrixType& LHS_Contribution,
113  LocalSystemVectorType& RHS_Contribution,
115  const ProcessInfo& CurrentProcessInfo) override
116  {
117  KRATOS_TRY
118 
119  if (CurrentProcessInfo[BUILD_LEVEL] == 2)
120  {
121  rCurrentCondition.CalculateLocalSystem(LHS_Contribution,RHS_Contribution,CurrentProcessInfo);
122  }
123 
124  rCurrentCondition.EquationIdVector(EquationId,CurrentProcessInfo);
125 
126  KRATOS_CATCH("")
127  }
128 
130 
131 }; /* Class Scheme */
132 
134 
137 
139 
140 } /* namespace Kratos.*/
141 
142 #endif /* KRATOS_EIGENSOLVER_NITSCHE_STABILIZATION_SCHEME defined */
143 
144 
Base class for all Conditions.
Definition: condition.h:59
std::vector< std::size_t > EquationIdVectorType
Definition: condition.h:98
virtual void EquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const
Definition: condition.h:260
virtual void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo)
Definition: condition.h:408
An adapter scheme for obtaining stiffness and stabilization matrices for Nitsche eigenvalue problems.
Definition: eigensolver_nitsche_stabilization_scheme.hpp:55
EigensolverNitscheStabilizationScheme()
Constructor.
Definition: eigensolver_nitsche_stabilization_scheme.hpp:73
void CalculateSystemContributions(Condition &rCurrentCondition, LocalSystemMatrixType &LHS_Contribution, LocalSystemVectorType &RHS_Contribution, Condition::EquationIdVectorType &EquationId, const ProcessInfo &CurrentProcessInfo) override
Definition: eigensolver_nitsche_stabilization_scheme.hpp:110
~EigensolverNitscheStabilizationScheme() override
Destructor.
Definition: eigensolver_nitsche_stabilization_scheme.hpp:76
KRATOS_CLASS_POINTER_DEFINITION(EigensolverNitscheStabilizationScheme)
BaseType::LocalSystemVectorType LocalSystemVectorType
Definition: eigensolver_nitsche_stabilization_scheme.hpp:64
void CalculateSystemContributions(Element &rCurrentElement, LocalSystemMatrixType &LHS_Contribution, LocalSystemVectorType &RHS_Contribution, Element::EquationIdVectorType &EquationId, const ProcessInfo &CurrentProcessInfo) override
Definition: eigensolver_nitsche_stabilization_scheme.hpp:86
Scheme< TSparseSpace, TDenseSpace > BaseType
Definition: eigensolver_nitsche_stabilization_scheme.hpp:62
BaseType::LocalSystemMatrixType LocalSystemMatrixType
Definition: eigensolver_nitsche_stabilization_scheme.hpp:66
Base class for all Elements.
Definition: element.h:60
virtual void EquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const
Definition: element.h:258
virtual void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo)
Definition: element.h:405
std::vector< std::size_t > EquationIdVectorType
Definition: element.h:98
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
This class provides the implementation of the basic tasks that are needed by the solution strategy.
Definition: scheme.h:56
virtual void EquationId(const Element &rElement, Element::EquationIdVectorType &rEquationId, const ProcessInfo &rCurrentProcessInfo)
This method gets the eqaution id corresponding to the current element.
Definition: scheme.h:636
typename TDenseSpace::VectorType LocalSystemVectorType
Local system vector type definition.
Definition: scheme.h:80
typename TDenseSpace::MatrixType LocalSystemMatrixType
Local system matrix type definition.
Definition: scheme.h:77
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21