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.
Pw_normal_flux_condition.hpp
Go to the documentation of this file.
1 // KRATOS___
2 // // ) )
3 // // ___ ___
4 // // ____ //___) ) // ) )
5 // // / / // // / /
6 // ((____/ / ((____ ((___/ / MECHANICS
7 //
8 // License: geo_mechanics_application/license.txt
9 //
10 //
11 // Main authors: Ignasi de Pouplana,
12 // Vahid Galavi,
13 // Aron Noordam
14 //
15 
16 
17 #if !defined(KRATOS_GEO_PW_NORMAL_FLUX_CONDITION_H_INCLUDED )
18 #define KRATOS_GEO_PW_NORMAL_FLUX_CONDITION_H_INCLUDED
19 
20 // Project includes
21 #include "includes/serializer.h"
22 
23 // Application includes
25 #include "custom_utilities/element_utilities.hpp"
28 
29 namespace Kratos
30 {
31 
32 template< unsigned int TDim, unsigned int TNumNodes >
33 class KRATOS_API(GEO_MECHANICS_APPLICATION) PwNormalFluxCondition : public PwCondition<TDim,TNumNodes>
34 {
35 
36 public:
37 
39 
40  using IndexType = std::size_t;
42  using NodeType = Node;
45  using VectorType = Vector;
46  using MatrixType = Matrix;
47 
48 //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
49 
50  // Default constructor
51  PwNormalFluxCondition() : PwCondition<TDim,TNumNodes>() {}
52 
53  // Constructor 1
54  PwNormalFluxCondition( IndexType NewId, GeometryType::Pointer pGeometry ) : PwCondition<TDim,TNumNodes>(NewId, pGeometry) {}
55 
56  // Constructor 2
57  PwNormalFluxCondition( IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties ) : PwCondition<TDim,TNumNodes>(NewId, pGeometry, pProperties) {}
58 
59 //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
60 
61  Condition::Pointer Create(IndexType NewId,NodesArrayType const& ThisNodes,PropertiesType::Pointer pProperties ) const override;
62 
63 //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
64 
65 protected:
66 
68  {
69  double NormalFlux;
73  };
74 
75  // Member Variables
76 
77 //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
78 
79  void CalculateRHS(VectorType& rRightHandSideVector,
80  const ProcessInfo& CurrentProcessInfo) override;
81 
82  void CalculateAndAddRHS(VectorType& rRightHandSideVector, NormalFluxVariables& rVariables);
83 
84  virtual double CalculateIntegrationCoefficient(const Matrix& Jacobian, const double& Weight);
85 
86 //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
87 
88 private:
89 
90  // Member Variables
91 
92 //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
93 
94  // Serialization
95 
96  friend class Serializer;
97 
98  void save(Serializer& rSerializer) const override
99  {
101  }
102 
103  void load(Serializer& rSerializer) override
104  {
106  }
107 
108 }; // class PwNormalFluxCondition.
109 
110 } // namespace Kratos.
111 
112 #endif // KRATOS_GEO_PW_NORMAL_FLUX_CONDITION_H_INCLUDED defined
Base class for all Conditions.
Definition: condition.h:59
std::size_t IndexType
Definition: flags.h:74
Geometry base class.
Definition: geometry.h:71
PointerVector< TPointType > PointsArrayType
Definition: geometry.h:118
This class defines the node.
Definition: node.h:65
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
Properties encapsulates data shared by different Elements or Conditions. It can store any type of dat...
Definition: properties.h:69
Definition: Pw_condition.hpp:38
Definition: Pw_normal_flux_condition.hpp:34
PwNormalFluxCondition()
Definition: Pw_normal_flux_condition.hpp:51
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(PwNormalFluxCondition)
virtual double CalculateIntegrationCoefficient(const Matrix &Jacobian, const double &Weight)
PwNormalFluxCondition(IndexType NewId, GeometryType::Pointer pGeometry)
Definition: Pw_normal_flux_condition.hpp:54
PwNormalFluxCondition(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Definition: Pw_normal_flux_condition.hpp:57
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
std::size_t IndexType
The definition of the index type.
Definition: key_hash.h:35
Modeler::Pointer Create(const std::string &ModelerName, Model &rModel, const Parameters ModelParameters)
Checks if the modeler is registered.
Definition: modeler_factory.cpp:30
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
Internals::Matrix< double, AMatrix::dynamic, 1 > Vector
Definition: amatrix_interface.h:472
Internals::Matrix< double, AMatrix::dynamic, AMatrix::dynamic > Matrix
Definition: amatrix_interface.h:470
ModelPart::NodesContainerType NodesArrayType
Definition: gid_gauss_point_container.h:42
def load(f)
Definition: ode_solve.py:307
Definition: Pw_normal_flux_condition.hpp:68
array_1d< double, TNumNodes > PVector
Definition: Pw_normal_flux_condition.hpp:72
double IntegrationCoefficient
Definition: Pw_normal_flux_condition.hpp:70
array_1d< double, TNumNodes > Np
Definition: Pw_normal_flux_condition.hpp:71
double NormalFlux
Definition: Pw_normal_flux_condition.hpp:69