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.
adjoint_finite_difference_truss_element_linear_3D2N.h
Go to the documentation of this file.
1 // KRATOS ___| | | |
2 // \___ \ __| __| | | __| __| | | __| _` | |
3 // | | | | | ( | | | | ( | |
4 // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS
5 //
6 // License: BSD License
7 // license: StructuralMechanicsApplication/license.txt
8 //
9 // Main authors: Martin Fusseder, https://github.com/MFusseder
10 //
11 
12 
13 #pragma once
14 
16 
17 namespace Kratos
18 {
19 
26 template <typename TPrimalElement>
28  : public AdjointFiniteDifferenceTrussElement<TPrimalElement>
29 {
30 public:
31 
32  // redefine the typedefs because of templated base class
34  typedef typename BaseType::SizeType SizeType;
35  typedef typename BaseType::IndexType IndexType;
39  typedef typename BaseType::VectorType VectorType;
40  typedef typename BaseType::MatrixType MatrixType;
46 
48 
50  : BaseType(NewId)
51  {
52  }
53 
54  AdjointFiniteDifferenceTrussElementLinear(IndexType NewId, typename GeometryType::Pointer pGeometry)
55  : BaseType(NewId, pGeometry)
56  {
57  }
58 
60  typename GeometryType::Pointer pGeometry,
61  typename PropertiesType::Pointer pProperties)
62  : BaseType(NewId, pGeometry, pProperties)
63  {
64  }
65 
66  Element::Pointer Create(IndexType NewId,
67  NodesArrayType const& ThisNodes,
68  typename PropertiesType::Pointer pProperties) const override
69  {
70  return Kratos::make_intrusive<AdjointFiniteDifferenceTrussElementLinear<TPrimalElement>>(
71  NewId, this->GetGeometry().Create(ThisNodes), pProperties);
72  }
73 
74  Element::Pointer Create(IndexType NewId,
75  typename GeometryType::Pointer pGeometry,
76  typename PropertiesType::Pointer pProperties) const override
77  {
78  return Kratos::make_intrusive<AdjointFiniteDifferenceTrussElementLinear<TPrimalElement>>(
79  NewId, pGeometry, pProperties);
80  }
81 
83  std::vector< array_1d<double, 3 > >& rOutput,
84  const ProcessInfo& rCurrentProcessInfo) override;
85 
86  void CalculateStressDisplacementDerivative(const Variable<Vector>& rStressVariable,
87  Matrix& rOutput, const ProcessInfo& rCurrentProcessInfo) override;
88 
89 
90 private:
91  friend class Serializer;
92  void save(Serializer& rSerializer) const override;
93  void load(Serializer& rSerializer) override;
94 };
95 
96 
97 }
AdjointFiniteDifferencingBaseElement.
Definition: adjoint_finite_difference_truss_element_3D2N.h:29
BaseType::VectorType VectorType
Definition: adjoint_finite_difference_truss_element_3D2N.h:39
BaseType::GeometryDataType GeometryDataType
Definition: adjoint_finite_difference_truss_element_3D2N.h:45
BaseType::DofsVectorType DofsVectorType
Definition: adjoint_finite_difference_truss_element_3D2N.h:42
BaseType::IntegrationMethod IntegrationMethod
Definition: adjoint_finite_difference_truss_element_3D2N.h:44
BaseType::EquationIdVectorType EquationIdVectorType
Definition: adjoint_finite_difference_truss_element_3D2N.h:41
BaseType::SizeType SizeType
Definition: adjoint_finite_difference_truss_element_3D2N.h:34
BaseType::PropertiesType PropertiesType
Definition: adjoint_finite_difference_truss_element_3D2N.h:37
BaseType::DofsArrayType DofsArrayType
Definition: adjoint_finite_difference_truss_element_3D2N.h:43
BaseType::NodesArrayType NodesArrayType
Definition: adjoint_finite_difference_truss_element_3D2N.h:38
BaseType::MatrixType MatrixType
Definition: adjoint_finite_difference_truss_element_3D2N.h:40
AdjointFiniteDifferencingBaseElement.
Definition: adjoint_finite_difference_truss_element_linear_3D2N.h:29
Element::Pointer Create(IndexType NewId, typename GeometryType::Pointer pGeometry, typename PropertiesType::Pointer pProperties) const override
It creates a new element pointer.
Definition: adjoint_finite_difference_truss_element_linear_3D2N.h:74
BaseType::MatrixType MatrixType
Definition: adjoint_finite_difference_truss_element_linear_3D2N.h:40
BaseType::DofsArrayType DofsArrayType
Definition: adjoint_finite_difference_truss_element_linear_3D2N.h:43
AdjointFiniteDifferenceTrussElementLinear(IndexType NewId=0)
Definition: adjoint_finite_difference_truss_element_linear_3D2N.h:49
Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, typename PropertiesType::Pointer pProperties) const override
It creates a new element pointer.
Definition: adjoint_finite_difference_truss_element_linear_3D2N.h:66
BaseType::IndexType IndexType
Definition: adjoint_finite_difference_truss_element_linear_3D2N.h:35
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(AdjointFiniteDifferenceTrussElementLinear)
AdjointFiniteDifferenceTrussElement< TPrimalElement > BaseType
Definition: adjoint_finite_difference_truss_element_linear_3D2N.h:33
BaseType::IntegrationMethod IntegrationMethod
Definition: adjoint_finite_difference_truss_element_linear_3D2N.h:44
BaseType::EquationIdVectorType EquationIdVectorType
Definition: adjoint_finite_difference_truss_element_linear_3D2N.h:41
BaseType::NodesArrayType NodesArrayType
Definition: adjoint_finite_difference_truss_element_linear_3D2N.h:38
AdjointFiniteDifferenceTrussElementLinear(IndexType NewId, typename GeometryType::Pointer pGeometry)
Definition: adjoint_finite_difference_truss_element_linear_3D2N.h:54
void CalculateStressDisplacementDerivative(const Variable< Vector > &rStressVariable, Matrix &rOutput, const ProcessInfo &rCurrentProcessInfo) override
Definition: adjoint_finite_difference_truss_element_linear_3D2N.cpp:52
BaseType::SizeType SizeType
Definition: adjoint_finite_difference_truss_element_linear_3D2N.h:34
BaseType::DofsVectorType DofsVectorType
Definition: adjoint_finite_difference_truss_element_linear_3D2N.h:42
BaseType::VectorType VectorType
Definition: adjoint_finite_difference_truss_element_linear_3D2N.h:39
void CalculateOnIntegrationPoints(const Variable< array_1d< double, 3 > > &rVariable, std::vector< array_1d< double, 3 > > &rOutput, const ProcessInfo &rCurrentProcessInfo) override
Definition: adjoint_finite_difference_truss_element_linear_3D2N.cpp:23
BaseType::PropertiesType PropertiesType
Definition: adjoint_finite_difference_truss_element_linear_3D2N.h:37
BaseType::GeometryType GeometryType
Definition: adjoint_finite_difference_truss_element_linear_3D2N.h:36
AdjointFiniteDifferenceTrussElementLinear(IndexType NewId, typename GeometryType::Pointer pGeometry, typename PropertiesType::Pointer pProperties)
Definition: adjoint_finite_difference_truss_element_linear_3D2N.h:59
BaseType::GeometryDataType GeometryDataType
Definition: adjoint_finite_difference_truss_element_linear_3D2N.h:45
std::size_t IndexType
Definition: flags.h:74
This defines the geometrical object, base definition of the element and condition entities.
Definition: geometrical_object.h:58
GeometryType & GetGeometry()
Returns the reference of the geometry.
Definition: geometrical_object.h:158
std::size_t IndexType
Defines the index type.
Definition: geometrical_object.h:73
Geometry base class.
Definition: geometry.h:71
virtual Pointer Create(PointsArrayType const &rThisPoints) const
Creates a new geometry pointer.
Definition: geometry.h:813
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
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
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
def load(f)
Definition: ode_solve.py:307