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.
updated_lagrangian_V_implicit_solid_element.h
Go to the documentation of this file.
1 //
2 // Project Name: KratosFluidDynamicsApplication $
3 // Last modified by: $Author: AFranci $
4 // Date: $Date: February 2016 $
5 // Revision: $Revision: 0.0 $
6 //
7 //
8 
9 #if !defined(KRATOS_UPDATED_LAGRANGIAN_V_IMPLICIT_SOLID_ELEMENT_H_INCLUDED)
10 #define KRATOS_UPDATED_LAGRANGIAN_V_IMPLICIT_SOLID_ELEMENT_H_INCLUDED
11 
12 // System includes
13 #include <string>
14 #include <iostream>
15 
16 // External includes
17 
19 
20 namespace Kratos
21 {
22 
25 
28 
32 
36 
40 
44 
46 
48  /* class UpdatedLagrangianVImplicitSolidElement : public Element */
49  template <unsigned int TDim>
50  /* class UpdatedLagrangianVImplicitSolidElement : public TwoStepUpdatedLagrangianVPElement<TDim> */
52  {
53 
54  public:
57 
60 
63 
65  typedef Node NodeType;
66 
69 
72 
74  typedef Vector VectorType;
75 
77  typedef Matrix MatrixType;
78 
79  typedef std::size_t IndexType;
80 
81  typedef std::size_t SizeType;
82 
83  typedef std::vector<std::size_t> EquationIdVectorType;
84 
85  typedef std::vector<Dof<double>::Pointer> DofsVectorType;
86 
88 
91 
94 
97 
99 
100  typedef typename BaseType::PropertiesType::Pointer pPropertiesType;
101 
103 
106 
108  typedef ConstitutiveLawType::Pointer ConstitutiveLawPointerType;
109 
113 
114  //Constructors.
115 
117 
121  {
122  }
123 
125 
129  UpdatedLagrangianVImplicitSolidElement(IndexType NewId, const NodesArrayType &ThisNodes) : BaseType(NewId, ThisNodes)
130  {
131  }
132 
134 
138  UpdatedLagrangianVImplicitSolidElement(IndexType NewId, GeometryType::Pointer pGeometry) : BaseType(NewId, pGeometry)
139  {
140  }
141 
143 
148  UpdatedLagrangianVImplicitSolidElement(IndexType NewId, GeometryType::Pointer pGeometry, pPropertiesType pProperties) : BaseType(NewId, pGeometry, pProperties)
149  {
150  }
151 
153 
155  {
156  }
157 
160  {
161  }
162 
166 
170 
172 
179  Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes,
180  pPropertiesType pProperties) const override
181  {
182  return Element::Pointer(new UpdatedLagrangianVImplicitSolidElement(NewId, BaseType::GetGeometry().Create(ThisNodes), pProperties));
183  }
184 
185  Element::Pointer Clone(IndexType NewId, NodesArrayType const &ThisNodes) const override;
186 
187  /* virtual void Initialize(); */
188 
189  void CalculateLeftHandSide(MatrixType &rLeftHandSideMatrix,
190  const ProcessInfo &rCurrentProcessInfo) override
191  {
192  KRATOS_TRY;
193  KRATOS_THROW_ERROR(std::logic_error, "UpdatedLagrangianVImplicitSolidElement::CalculateLeftHandSide not implemented", "");
194  KRATOS_CATCH("");
195  }
196 
197  void CalculateRightHandSide(VectorType &rRightHandSideVector,
198  const ProcessInfo &rCurrentProcessInfo) override
199  {
200  KRATOS_TRY;
201  KRATOS_THROW_ERROR(std::logic_error, "UpdatedLagrangianVImplicitSolidElement::CalculateRightHandSide not implemented", "");
202  KRATOS_CATCH("");
203  }
204 
205  // The following methods have different implementations depending on TDim
207 
215 
223 
227 
229 
241 
245 
247  std::string Info() const override
248  {
249  std::stringstream buffer;
250  buffer << "UpdatedLagrangianVImplicitSolidElement #" << BaseType::Id();
251  return buffer.str();
252  }
253 
255  void PrintInfo(std::ostream &rOStream) const override
256  {
257  rOStream << "UpdatedLagrangianVImplicitSolidElement" << TDim << "D";
258  }
259 
260  // /// Print object's data.
261  // virtual void PrintData(std::ostream& rOStream) const;
262 
266 
268 
269  protected:
272 
276 
277  ConstitutiveLaw::Pointer mpConstitutiveLaw = nullptr;
278 
282 
286 
288 
296  ElementalVariables &rElementalVariables,
297  const unsigned int g,
298  const Vector& rN,
299  const ProcessInfo &rCurrentProcessInfo,
300  double &Density,
301  double &DeviatoricCoeff,
302  double &VolumetricCoeff) override;
303 
304  double GetThetaMomentum() override { return 1.0; };
305 
306  double GetThetaContinuity() override { return 1.0; };
307 
311 
315 
319 
321 
322  private:
325 
329 
333 
334  friend class Serializer;
335 
336  void save(Serializer &rSerializer) const override
337  {
339  }
340 
341  void load(Serializer &rSerializer) override
342  {
344  }
345 
349 
353 
357 
361 
365 
368 
369  /* /// Copy constructor. */
370  /* UpdatedLagrangianVImplicitSolidElement(UpdatedLagrangianVImplicitSolidElement const& rOther); */
371 
373 
374  }; // Class UpdatedLagrangianVImplicitSolidElement
375 
377 
380 
384 
386  template <unsigned int TDim>
387  inline std::istream &operator>>(std::istream &rIStream,
389  {
390  return rIStream;
391  }
392 
394  template <unsigned int TDim>
395  inline std::ostream &operator<<(std::ostream &rOStream,
397  {
398  rThis.PrintInfo(rOStream);
399  rOStream << std::endl;
400  rThis.PrintData(rOStream);
401 
402  return rOStream;
403  }
404 
405 } // namespace Kratos.
406 
407 #endif // KRATOS_TWO_STEP_UPDATED_LAGRANGIAN_V_SOLID_ELEMENT defined
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Definition: constitutive_law.h:47
Base class for all Elements.
Definition: element.h:60
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
Geometry base class.
Definition: geometry.h:71
This object defines an indexed object.
Definition: indexed_object.h:54
IndexType Id() const
Definition: indexed_object.h:107
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
A sorted associative container similar to an STL set, but uses a vector to store pointers to its data...
Definition: pointer_vector_set.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
A stabilized element for the incompressible Navier-Stokes equations.
Definition: two_step_updated_lagrangian_V_P_implicit_solid_element.h:51
A stabilized element for the incompressible Navier-Stokes equations.
Definition: updated_lagrangian_V_implicit_solid_element.h:52
#define KRATOS_THROW_ERROR(ExceptionType, ErrorMessage, MoreInfo)
Definition: define.h:77
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
ConstitutiveLaw::Pointer mpConstitutiveLaw
Definition: updated_lagrangian_V_implicit_solid_element.h:277
double GetThetaMomentum() override
Definition: updated_lagrangian_V_implicit_solid_element.h:304
TwoStepUpdatedLagrangianVPImplicitSolidElement< TDim > BaseType
base type:
Definition: updated_lagrangian_V_implicit_solid_element.h:62
std::vector< std::size_t > EquationIdVectorType
Definition: updated_lagrangian_V_implicit_solid_element.h:83
BaseType::PropertiesType::Pointer pPropertiesType
Definition: two_step_updated_lagrangian_element.h:116
Matrix MatrixType
Matrix type for local contributions to the linear system.
Definition: updated_lagrangian_V_implicit_solid_element.h:77
BaseType::ElementalVariables ElementalVariables
Definition: updated_lagrangian_V_implicit_solid_element.h:102
BaseType::PropertiesType::Pointer pPropertiesType
Definition: updated_lagrangian_V_implicit_solid_element.h:100
Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, pPropertiesType pProperties) const override
Create a new element of this type.
Definition: updated_lagrangian_V_implicit_solid_element.h:179
GeometryType::ShapeFunctionsGradientsType ShapeFunctionDerivativesArrayType
Type for an array of shape function gradient matrices.
Definition: updated_lagrangian_V_implicit_solid_element.h:96
BaseType::ElementalVariables ElementalVariables
Definition: two_step_updated_lagrangian_V_P_implicit_solid_element.h:101
void CalculateRightHandSide(VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Definition: updated_lagrangian_V_implicit_solid_element.h:197
Element::Pointer Clone(IndexType NewId, NodesArrayType const &ThisNodes) const override
It creates a new element pointer and clones the previous element data.
Definition: updated_lagrangian_V_implicit_solid_element.cpp:25
UpdatedLagrangianVImplicitSolidElement(UpdatedLagrangianVImplicitSolidElement const &rOther)
copy constructor
Definition: updated_lagrangian_V_implicit_solid_element.h:154
void CalcElasticPlasticCauchySplitted(ElementalVariables &rElementalVariables, const unsigned int g, const Vector &rN, const ProcessInfo &rCurrentProcessInfo, double &Density, double &DeviatoricCoeff, double &VolumetricCoeff) override
Add integration point contribution to the mass matrix.
UpdatedLagrangianVImplicitSolidElement(IndexType NewId, GeometryType::Pointer pGeometry, pPropertiesType pProperties)
Constuctor using geometry and properties.
Definition: updated_lagrangian_V_implicit_solid_element.h:148
std::size_t SizeType
Definition: updated_lagrangian_V_implicit_solid_element.h:81
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(UpdatedLagrangianVImplicitSolidElement)
Pointer definition of UpdatedLagrangianVImplicitSolidElement.
Kratos::Vector ShapeFunctionsType
Type for shape function values container.
Definition: updated_lagrangian_V_implicit_solid_element.h:90
Node NodeType
Node type (default is: Node)
Definition: updated_lagrangian_V_implicit_solid_element.h:65
Geometry< NodeType > GeometryType
Geometry type (using with given NodeType)
Definition: updated_lagrangian_V_implicit_solid_element.h:68
std::string Info() const override
Turn back information as a string.
Definition: updated_lagrangian_V_implicit_solid_element.h:247
UpdatedLagrangianVImplicitSolidElement(IndexType NewId, const NodesArrayType &ThisNodes)
Constructor using an array of nodes.
Definition: updated_lagrangian_V_implicit_solid_element.h:129
PointerVectorSet< Dof< double >, IndexedObject > DofsArrayType
Definition: updated_lagrangian_V_implicit_solid_element.h:87
virtual ~UpdatedLagrangianVImplicitSolidElement()
Destructor.
Definition: updated_lagrangian_V_implicit_solid_element.h:159
ConstitutiveLaw ConstitutiveLawType
Reference type definition for constitutive laws.
Definition: updated_lagrangian_V_implicit_solid_element.h:105
Kratos::Matrix ShapeFunctionDerivativesType
Type for a matrix containing the shape function gradients.
Definition: updated_lagrangian_V_implicit_solid_element.h:93
UpdatedLagrangianVImplicitSolidElement(IndexType NewId=0)
Default constuctor.
Definition: updated_lagrangian_V_implicit_solid_element.h:120
std::vector< Dof< double >::Pointer > DofsVectorType
Definition: updated_lagrangian_V_implicit_solid_element.h:85
Vector VectorType
Vector type for local contributions to the linear system.
Definition: updated_lagrangian_V_implicit_solid_element.h:74
double GetThetaContinuity() override
Definition: updated_lagrangian_V_implicit_solid_element.h:306
std::size_t IndexType
Definition: updated_lagrangian_V_implicit_solid_element.h:79
BaseType::PropertiesType PropertiesType
Definition: two_step_updated_lagrangian_V_P_implicit_solid_element.h:97
BaseType::PropertiesType PropertiesType
Definition: updated_lagrangian_V_implicit_solid_element.h:98
UpdatedLagrangianVImplicitSolidElement(IndexType NewId, GeometryType::Pointer pGeometry)
Constructor using a geometry object.
Definition: updated_lagrangian_V_implicit_solid_element.h:138
Geometry< NodeType >::PointsArrayType NodesArrayType
Definition of nodes container type, redefined from GeometryType.
Definition: updated_lagrangian_V_implicit_solid_element.h:71
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: updated_lagrangian_element.hpp:177
ConstitutiveLawType::Pointer ConstitutiveLawPointerType
Pointer type for constitutive laws.
Definition: updated_lagrangian_V_implicit_solid_element.h:108
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: updated_lagrangian_V_implicit_solid_element.h:255
void CalculateLeftHandSide(MatrixType &rLeftHandSideMatrix, const ProcessInfo &rCurrentProcessInfo) override
Definition: updated_lagrangian_V_implicit_solid_element.h:189
std::size_t IndexType
The definition of the index type.
Definition: key_hash.h:35
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
ModelPart::NodesContainerType NodesArrayType
Definition: gid_gauss_point_container.h:42
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
def load(f)
Definition: ode_solve.py:307
Definition: updated_lagrangian_element.h:74