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.
fractional_step.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: Jordi Cotela
11 //
12 
13 #if !defined(KRATOS_FRACTIONAL_STEP_H_INCLUDED )
14 #define KRATOS_FRACTIONAL_STEP_H_INCLUDED
15 
16 // System includes
17 #include <string>
18 #include <iostream>
19 
20 
21 // External includes
22 
23 
24 // Project includes
25 #include "containers/array_1d.h"
26 #include "includes/define.h"
27 #include "includes/element.h"
28 #include "includes/serializer.h"
29 #include "geometries/geometry.h"
30 #include "utilities/math_utils.h"
31 
32 // Application includes
34 
35 namespace Kratos
36 {
37 
40 
43 
47 
51 
55 
59 
61 
63  template< unsigned int TDim >
64  class FractionalStep : public Element
65  {
66  public:
69 
72 
74  typedef Node NodeType;
75 
78 
81 
83  typedef Vector VectorType;
84 
86  typedef Matrix MatrixType;
87 
88  typedef std::size_t IndexType;
89 
90  typedef std::size_t SizeType;
91 
92  typedef std::vector<std::size_t> EquationIdVectorType;
93 
94  typedef std::vector< Dof<double>::Pointer > DofsVectorType;
95 
97 
100 
103 
106 
110 
111  //Constructors.
112 
114 
118  Element(NewId)
119  {}
120 
122 
126  FractionalStep(IndexType NewId, const NodesArrayType& ThisNodes) :
127  Element(NewId, ThisNodes)
128  {}
129 
131 
135  FractionalStep(IndexType NewId, GeometryType::Pointer pGeometry) :
136  Element(NewId, pGeometry)
137  {}
138 
140 
145  FractionalStep(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties) :
146  Element(NewId, pGeometry, pProperties)
147  {}
148 
150  ~FractionalStep() override
151  {}
152 
153 
157 
158 
162 
164 
171  Element::Pointer Create(IndexType NewId, NodesArrayType const& ThisNodes,
172  Element::PropertiesType::Pointer pProperties) const override
173  {
174  return Kratos::make_intrusive< FractionalStep<TDim> >(NewId, this->GetGeometry().Create(ThisNodes), pProperties);
175  }
176 
185  Element::Pointer Create(IndexType NewId, Element::GeometryType::Pointer pGeom, Element::PropertiesType::Pointer pProperties) const override
186  {
187  return Kratos::make_intrusive< FractionalStep<TDim> >(NewId, pGeom, pProperties);
188  }
189 
198  Element::Pointer Clone(IndexType NewId, NodesArrayType const& rThisNodes) const override
199  {
200  Element::Pointer pNewElement = Create(NewId, GetGeometry().Create( rThisNodes ), pGetProperties() );
201 
202  pNewElement->SetData(this->GetData());
203  pNewElement->SetFlags(this->GetFlags());
204 
205  return pNewElement;
206  }
207 
208  void Initialize(const ProcessInfo &rCurrentProcessInfo) override;
209 
211  void InitializeSolutionStep(const ProcessInfo &rCurrentProcessInfo) override;
212 
213 
214  void InitializeNonLinearIteration(const ProcessInfo &rCurrentProcessInfo) override;
215 
217  void CalculateLocalSystem(MatrixType& rLeftHandSideMatrix,
218  VectorType& rRightHandSideVector,
219  const ProcessInfo& rCurrentProcessInfo) override;
220 
221 
222  void CalculateLeftHandSide(MatrixType& rLeftHandSideMatrix,
223  const ProcessInfo& rCurrentProcessInfo) override
224  {
225  KRATOS_TRY;
226  KRATOS_THROW_ERROR(std::logic_error,"FractionalStep::CalculateLeftHandSide not implemented","");
227  KRATOS_CATCH("");
228  }
229 
230  void CalculateRightHandSide(VectorType& rRightHandSideVector,
231  const ProcessInfo& rCurrentProcessInfo) override
232  {
233  KRATOS_TRY;
234  KRATOS_THROW_ERROR(std::logic_error,"FractionalStep::CalculateRightHandSide not implemented","");
235  KRATOS_CATCH("");
236  }
237 
243  void Calculate(const Variable<double>& rVariable,
244  double& rOutput,
245  const ProcessInfo& rCurrentProcessInfo) override;
246 
247 
253  void Calculate(const Variable<array_1d<double, 3 > >& rVariable,
254  array_1d<double, 3 > & rOutput,
255  const ProcessInfo& rCurrentProcessInfo) override;
256 
257 
258  // The following methods have different implementations depending on TDim
260 
267  const ProcessInfo& rCurrentProcessInfo) const override;
268 
270 
274  void GetDofList(DofsVectorType& rElementalDofList,
275  const ProcessInfo& rCurrentProcessInfo) const override;
276 
277 
279 
281 
287  const Variable<array_1d<double, 3 > >& rVariable,
288  std::vector<array_1d<double, 3 > >& rValues,
289  const ProcessInfo& rCurrentProcessInfo) override;
290 
292 
298  const Variable<double>& rVariable,
299  std::vector<double>& rValues,
300  const ProcessInfo& rCurrentProcessInfo) override;
301 
303 
309  const Variable<array_1d<double, 6 > >& rVariable,
310  std::vector<array_1d<double, 6 > >& rValues,
311  const ProcessInfo& rCurrentProcessInfo) override
312  {
313  this->GetElementalValueForOutput< array_1d<double,6> >(rVariable,rValues);
314  }
315 
317 
323  const Variable<Vector>& rVariable,
324  std::vector<Vector>& rValues,
325  const ProcessInfo& rCurrentProcessInfo) override
326  {
327  this->GetElementalValueForOutput< Vector >(rVariable,rValues);
328  }
329 
331 
337  const Variable<Matrix>& rVariable,
338  std::vector<Matrix>& rValues,
339  const ProcessInfo& rCurrentProcessInfo) override
340  {
341  this->GetElementalValueForOutput< Matrix >(rVariable,rValues);
342  }
343 
347 
351 
353 
361  int Check(const ProcessInfo& rCurrentProcessInfo) const override;
362 
366 
367 
371 
372  const Parameters GetSpecifications() const override;
373 
375  std::string Info() const override
376  {
377  std::stringstream buffer;
378  buffer << "FractionalStep #" << Id();
379  return buffer.str();
380  }
381 
383  void PrintInfo(std::ostream& rOStream) const override
384  {
385  rOStream << "FractionalStep" << TDim << "D";
386  }
387 
388 // /// Print object's data.
389 // virtual void PrintData(std::ostream& rOStream) const;
390 
394 
395 
397 
398  protected:
401 
402 
406 
407 
411 
412 
416 
418  MatrixType& rLeftHandSideMatrix,
419  VectorType& rRightHandSideVector,
420  const ProcessInfo& rCurrentProcessInfo);
421 
422  virtual void CalculateLocalPressureSystem(MatrixType& rLeftHandSideMatrix,
423  VectorType& rRightHandSideVector,
424  const ProcessInfo& rCurrentProcessInfo);
425 
426  void CalculateEndOfStepSystem(MatrixType& rLeftHandSideMatrix,
427  VectorType& rRightHandSideVector,
428  const ProcessInfo& rCurrentProcessInfo);
429 
431  const ProcessInfo& rCurrentProcessInfo) const ;
432 
434  const ProcessInfo& rCurrentProcessInfo) const ;
435 
436  void GetVelocityDofList(DofsVectorType& rElementalDofList,
437  const ProcessInfo& rCurrentProcessInfo) const ;
438 
439  void GetPressureDofList(DofsVectorType& rElementalDofList,
440  const ProcessInfo& rCurrentProcessInfo) const ;
441 
442  void GetPressureValues(Vector& rValues,
443  const int Step = 0) const ;
444 
445  void GetVelocityValues(Vector& rValues,
446  const int Step = 0) const ;
447 
450  Matrix& rNContainer,
451  Vector& rGaussWeights);
452 
453  double ElementSize(/*ShapeFunctionDerivativesType& rDN_DX*/);
454 
455 
471  virtual double EffectiveViscosity(double Density,
472  const ShapeFunctionsType &rN,
473  const ShapeFunctionDerivativesType &rDN_DX,
474  double ElemSize,
475  const ProcessInfo &rProcessInfo);
476 
486  double EquivalentStrainRate(const ShapeFunctionDerivativesType &rDN_DX) const;
487 
488 
490 
496  void AddMomentumMassTerm(Matrix& rMassMatrix,
497  const ShapeFunctionsType& rN,
498  const double Weight);
499 
500  virtual void AddMomentumSystemTerms(Matrix& rLHSMatrix,
501  Vector& rRHSVector,
502  const double Density,
503  const Vector& rConvOperator,
504  const array_1d<double,3>& rBodyForce,
505  const double OldPressure,
506  const double TauOne,
507  const double TauTwo,
508  const array_1d<double,3>& rMomentumProjection,
509  const double MassProjection,
510  const ShapeFunctionsType& rN,
511  const ShapeFunctionDerivativesType& rDN_DX,
512  const double Weight);
513 
514  void AddViscousTerm(MatrixType& rDampingMatrix,
515  const ShapeFunctionDerivativesType& rShapeDeriv,
516  const double Weight);
517 
518 
519 // virtual void CalculateTau(double& TauOne,
520 // double& TauTwo,
521 // double ElemSize,
522 // const ProcessInfo& rCurrentProcessInfo);
523 
525 
538  virtual void CalculateTau(double& TauOne,
539  double& TauTwo,
540  double ElemSize,
541  const array_1d< double, 3 > & rAdvVel,
542  const double Density,
543  const double Viscosity,
544  const ProcessInfo& rCurrentProcessInfo);
545 
546  virtual void CalculateProjectionRHS(VectorType& rMomentumRHS,
547  VectorType& rMassRHS,
548  const ShapeFunctionsType& rN,
549  const ShapeFunctionDerivativesType& rDN_DX,
550  const double Weight);
551 
552  virtual void CalculateProjectionRHS(VectorType& rConvTerm,
553  VectorType& rPresTerm,
554  VectorType& rDivTerm,
555  const ShapeFunctionsType& rN,
556  const ShapeFunctionDerivativesType& rDN_DX,
557  const double Weight);
558 
559 
560  void ModulatedGradientDiffusion(MatrixType& rDampingMatrix,
561  const ShapeFunctionDerivativesType& rDN_DX,
562  const double Weight);
563 
564 
566 
573  void ConvectionOperator(Vector& rResult,
574  const array_1d<double,3>& rConvVel,
575  const ShapeFunctionDerivativesType& DN_DX);
576 
578 
582  virtual void EvaluateConvVelocity(array_1d<double,3>& rConvVel,
583  const ShapeFunctionsType& N);
584 
586 
594  template< class TVariableType >
595  void EvaluateInPoint(TVariableType& rResult,
597  const ShapeFunctionsType& rShapeFunc)
598  {
599  GeometryType& rGeom = this->GetGeometry();
600  const SizeType NumNodes = rGeom.PointsNumber();
601 
602  rResult = rShapeFunc[0] * rGeom[0].FastGetSolutionStepValue(Var);
603 
604  for(SizeType i = 1; i < NumNodes; i++)
605  {
606  rResult += rShapeFunc[i] * rGeom[i].FastGetSolutionStepValue(Var);
607  }
608  }
609 
611 
620  template< class TVariableType >
621  void EvaluateInPoint(TVariableType& rResult,
623  const ShapeFunctionsType& rShapeFunc,
624  const IndexType Step)
625  {
626  GeometryType& rGeom = this->GetGeometry();
627  const SizeType NumNodes = rGeom.PointsNumber();
628 
629  rResult = rShapeFunc[0] * rGeom[0].FastGetSolutionStepValue(Var,Step);
630 
631  for(SizeType i = 1; i < NumNodes; i++)
632  {
633  rResult += rShapeFunc[i] * rGeom[i].FastGetSolutionStepValue(Var,Step);
634  }
635  }
636 
638  const Kratos::Variable<double>& Var,
639  const ShapeFunctionDerivativesType& rDN_DX)
640  {
641  GeometryType& rGeom = this->GetGeometry();
642  const SizeType NumNodes = rGeom.PointsNumber();
643 
644  const double& var = rGeom[0].FastGetSolutionStepValue(Var);
645  for (SizeType d = 0; d < TDim; ++d)
646  rResult[d] = rDN_DX(0,d) * var;
647 
648  for(SizeType i = 1; i < NumNodes; i++)
649  {
650  const double& var = rGeom[i].FastGetSolutionStepValue(Var);
651  for (SizeType d = 0; d < TDim; ++d)
652  rResult[d] += rDN_DX(i,d) * var;
653 
654  }
655  }
656 
657  void EvaluateDivergenceInPoint(double& rResult,
658  const Kratos::Variable< array_1d<double,3> >& Var,
659  const ShapeFunctionDerivativesType& rDN_DX)
660  {
661  GeometryType& rGeom = this->GetGeometry();
662  const SizeType NumNodes = rGeom.PointsNumber();
663 
664  rResult = 0.0;
665  for(SizeType i = 0; i < NumNodes; i++)
666  {
667  const array_1d<double,3>& var = rGeom[i].FastGetSolutionStepValue(Var);
668  for (SizeType d = 0; d < TDim; ++d)
669  {
670  rResult += rDN_DX(i,d) * var[d];
671  }
672  }
673  }
674 
676 
680  template<class TValueType>
682  std::vector<TValueType>& rOutput)
683  {
685  rOutput.resize(NumValues);
686  /*
687  The cast is done to avoid modification of the element's data. Data modification
688  would happen if rVariable is not stored now (would initialize a pointer to &rVariable
689  with associated value of 0.0). This is catastrophic if the variable referenced
690  goes out of scope.
691  */
692  const FractionalStep<TDim>* const_this = static_cast<const FractionalStep<TDim>*> (this);
693  const TValueType& Val = const_this->GetValue(rVariable);
694 
695  for (unsigned int i = 0; i < NumValues; i++)
696  rOutput[i] = Val;
697  }
698 
702 
703 
707 
708 
712 
713 
715 
716  private:
719 
723 
727 
728  friend class Serializer;
729 
730  void save(Serializer& rSerializer) const override
731  {
733  }
734 
735  void load(Serializer& rSerializer) override
736  {
738  }
739 
743 
744 
748 
749 
753 
754 
758 
759 
763 
765  FractionalStep & operator=(FractionalStep const& rOther);
766 
768  FractionalStep(FractionalStep const& rOther);
769 
771 
772  }; // Class FractionalStep
773 
775 
778 
779 
783 
784 
786  template< unsigned int TDim >
787  inline std::istream& operator >>(std::istream& rIStream,
788  FractionalStep<TDim>& rThis)
789  {
790  return rIStream;
791  }
792 
794  template< unsigned int TDim >
795  inline std::ostream& operator <<(std::ostream& rOStream,
796  const FractionalStep<TDim>& rThis)
797  {
798  rThis.PrintInfo(rOStream);
799  rOStream << std::endl;
800  rThis.PrintData(rOStream);
801 
802  return rOStream;
803  }
805 
807 
808 } // namespace Kratos.
809 
810 #endif // KRATOS_FRACTIONAL_STEP_H_INCLUDED defined
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Base class for all Elements.
Definition: element.h:60
std::size_t SizeType
Definition: element.h:94
std::vector< DofType::Pointer > DofsVectorType
Definition: element.h:100
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: element.h:1135
std::vector< std::size_t > EquationIdVectorType
Definition: element.h:98
PropertiesType::Pointer pGetProperties()
returns the pointer to the property of the element. Does not throw an error, to allow copying of elem...
Definition: element.h:1014
std::size_t IndexType
Definition: flags.h:74
A stabilized element for the incompressible Navier-Stokes equations.
Definition: fractional_step.h:65
void CalculateEndOfStepSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo)
Definition: fractional_step.cpp:723
Vector VectorType
Vector type for local contributions to the linear system.
Definition: fractional_step.h:83
std::vector< std::size_t > EquationIdVectorType
Definition: fractional_step.h:92
double EquivalentStrainRate(const ShapeFunctionDerivativesType &rDN_DX) const
EquivalentStrainRate Calculate the second invariant of the strain rate tensor GammaDot = (2SijSij)^0....
Definition: fractional_step.cpp:1167
void InitializeNonLinearIteration(const ProcessInfo &rCurrentProcessInfo) override
Definition: fractional_step.cpp:24
void CalculateOnIntegrationPoints(const Variable< array_1d< double, 3 > > &rVariable, std::vector< array_1d< double, 3 > > &rValues, const ProcessInfo &rCurrentProcessInfo) override
Obtain an array_1d<double,3> elemental variable, evaluated on gauss points.
Definition: fractional_step.cpp:300
int Check(const ProcessInfo &rCurrentProcessInfo) const override
Checks the input and that all required Kratos variables have been registered.
Definition: fractional_step.cpp:796
virtual void CalculateLocalFractionalVelocitySystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo)
Definition: fractional_step.cpp:508
virtual double EffectiveViscosity(double Density, const ShapeFunctionsType &rN, const ShapeFunctionDerivativesType &rDN_DX, double ElemSize, const ProcessInfo &rProcessInfo)
EffectiveViscosity Calculate the viscosity at given integration point, using Smagorinsky if enabled.
Definition: fractional_step.cpp:1144
std::size_t SizeType
Definition: fractional_step.h:90
GeometryData::IntegrationMethod GetIntegrationMethod() const override
Definition: fractional_step.cpp:294
const Parameters GetSpecifications() const override
This method provides the specifications/requirements of the element.
Definition: fractional_step.cpp:843
PointerVectorSet< Dof< double >, IndexedObject > DofsArrayType
Definition: fractional_step.h:96
GeometryType::ShapeFunctionsGradientsType ShapeFunctionDerivativesArrayType
Type for an array of shape function gradient matrices.
Definition: fractional_step.h:105
void GetVelocityValues(Vector &rValues, const int Step=0) const
void InitializeSolutionStep(const ProcessInfo &rCurrentProcessInfo) override
Initializes the element and all geometric information required for the problem.
Definition: fractional_step.cpp:19
void VelocityEquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const
FractionalStep(IndexType NewId, const NodesArrayType &ThisNodes)
Constructor using an array of nodes.
Definition: fractional_step.h:126
void AddMomentumMassTerm(Matrix &rMassMatrix, const ShapeFunctionsType &rN, const double Weight)
Add integration point contribution to the mass matrix.
Definition: fractional_step.cpp:1194
void GetPressureDofList(DofsVectorType &rElementalDofList, const ProcessInfo &rCurrentProcessInfo) const
Definition: fractional_step.cpp:979
Kratos::Vector ShapeFunctionsType
Type for shape function values container.
Definition: fractional_step.h:99
Geometry< NodeType >::PointsArrayType NodesArrayType
Definition of nodes container type, redefined from GeometryType.
Definition: fractional_step.h:80
void EvaluateGradientInPoint(array_1d< double, TDim > &rResult, const Kratos::Variable< double > &Var, const ShapeFunctionDerivativesType &rDN_DX)
Definition: fractional_step.h:637
FractionalStep(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Constuctor using geometry and properties.
Definition: fractional_step.h:145
void PressureEquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const
Definition: fractional_step.cpp:922
double ElementSize()
Definition: fractional_step.cpp:1099
void EvaluateInPoint(TVariableType &rResult, const Kratos::Variable< TVariableType > &Var, const ShapeFunctionsType &rShapeFunc)
Write the value of a variable at a point inside the element to a double.
Definition: fractional_step.h:595
void CalculateOnIntegrationPoints(const Variable< array_1d< double, 6 > > &rVariable, std::vector< array_1d< double, 6 > > &rValues, const ProcessInfo &rCurrentProcessInfo) override
Obtain an array_1d<double,6> elemental variable, evaluated on gauss points.
Definition: fractional_step.h:308
void CalculateOnIntegrationPoints(const Variable< Matrix > &rVariable, std::vector< Matrix > &rValues, const ProcessInfo &rCurrentProcessInfo) override
Obtain a Matrix elemental variable, evaluated on gauss points.
Definition: fractional_step.h:336
void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Calculate the element's local contribution to the system for the current step.
Definition: fractional_step.cpp:30
void GetDofList(DofsVectorType &rElementalDofList, const ProcessInfo &rCurrentProcessInfo) const override
Returns a list of the element's Dofs.
Definition: fractional_step.cpp:262
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: fractional_step.h:383
virtual void EvaluateConvVelocity(array_1d< double, 3 > &rConvVel, const ShapeFunctionsType &N)
Evaluate ALE convective velocity (velocity-mesh velocity) at a given point.
Definition: fractional_step.cpp:1591
Node NodeType
Node type (default is: Node)
Definition: fractional_step.h:74
Element::Pointer Clone(IndexType NewId, NodesArrayType const &rThisNodes) const override
Definition: fractional_step.h:198
virtual void CalculateGeometryData(ShapeFunctionDerivativesArrayType &rDN_DX, Matrix &rNContainer, Vector &rGaussWeights)
Determine integration point weights and shape funcition derivatives from the element's geometry.
Definition: fractional_step.cpp:1054
void CalculateLeftHandSide(MatrixType &rLeftHandSideMatrix, const ProcessInfo &rCurrentProcessInfo) override
Definition: fractional_step.h:222
virtual void CalculateLocalPressureSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo)
Definition: fractional_step.cpp:609
void AddViscousTerm(MatrixType &rDampingMatrix, const ShapeFunctionDerivativesType &rShapeDeriv, const double Weight)
std::string Info() const override
Turn back information as a string.
Definition: fractional_step.h:375
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(FractionalStep)
Pointer definition of FractionalStep.
void Initialize(const ProcessInfo &rCurrentProcessInfo) override
Definition: fractional_step.cpp:14
void Calculate(const Variable< double > &rVariable, double &rOutput, const ProcessInfo &rCurrentProcessInfo) override
Definition: fractional_step.cpp:65
void CalculateOnIntegrationPoints(const Variable< Vector > &rVariable, std::vector< Vector > &rValues, const ProcessInfo &rCurrentProcessInfo) override
Obtain a Vector elemental variable, evaluated on gauss points.
Definition: fractional_step.h:322
Element::Pointer Create(IndexType NewId, Element::GeometryType::Pointer pGeom, Element::PropertiesType::Pointer pProperties) const override
Definition: fractional_step.h:185
virtual void CalculateProjectionRHS(VectorType &rMomentumRHS, VectorType &rMassRHS, const ShapeFunctionsType &rN, const ShapeFunctionDerivativesType &rDN_DX, const double Weight)
Definition: fractional_step.cpp:1382
void CalculateRightHandSide(VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Definition: fractional_step.h:230
virtual void CalculateTau(double &TauOne, double &TauTwo, double ElemSize, const array_1d< double, 3 > &rAdvVel, const double Density, const double Viscosity, const ProcessInfo &rCurrentProcessInfo)
Calculate Stabilization parameters.
Definition: fractional_step.cpp:1357
~FractionalStep() override
Destructor.
Definition: fractional_step.h:150
void EvaluateDivergenceInPoint(double &rResult, const Kratos::Variable< array_1d< double, 3 > > &Var, const ShapeFunctionDerivativesType &rDN_DX)
Definition: fractional_step.h:657
void GetPressureValues(Vector &rValues, const int Step=0) const
Definition: fractional_step.cpp:997
void GetVelocityDofList(DofsVectorType &rElementalDofList, const ProcessInfo &rCurrentProcessInfo) const
FractionalStep(IndexType NewId=0)
Default constuctor.
Definition: fractional_step.h:117
void EquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const override
Provides the global indices for each one of this element's local rows.
Definition: fractional_step.cpp:230
std::size_t IndexType
Definition: fractional_step.h:88
void ConvectionOperator(Vector &rResult, const array_1d< double, 3 > &rConvVel, const ShapeFunctionDerivativesType &DN_DX)
Write the convective operator evaluated at this point (for each nodal funciton) to an array.
Definition: fractional_step.cpp:1574
void EvaluateInPoint(TVariableType &rResult, const Kratos::Variable< TVariableType > &Var, const ShapeFunctionsType &rShapeFunc, const IndexType Step)
Write the value of a variable at a point inside the element to a double.
Definition: fractional_step.h:621
std::vector< Dof< double >::Pointer > DofsVectorType
Definition: fractional_step.h:94
void GetElementalValueForOutput(const Kratos::Variable< TValueType > &rVariable, std::vector< TValueType > &rOutput)
Helper function to print results on gauss points.
Definition: fractional_step.h:681
Kratos::Matrix ShapeFunctionDerivativesType
Type for a matrix containing the shape function gradients.
Definition: fractional_step.h:102
Matrix MatrixType
Matrix type for local contributions to the linear system.
Definition: fractional_step.h:86
Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, Element::PropertiesType::Pointer pProperties) const override
Create a new element of this type.
Definition: fractional_step.h:171
void ModulatedGradientDiffusion(MatrixType &rDampingMatrix, const ShapeFunctionDerivativesType &rDN_DX, const double Weight)
Definition: fractional_step.cpp:1476
virtual void AddMomentumSystemTerms(Matrix &rLHSMatrix, Vector &rRHSVector, const double Density, const Vector &rConvOperator, const array_1d< double, 3 > &rBodyForce, const double OldPressure, const double TauOne, const double TauTwo, const array_1d< double, 3 > &rMomentumProjection, const double MassProjection, const ShapeFunctionsType &rN, const ShapeFunctionDerivativesType &rDN_DX, const double Weight)
Definition: fractional_step.cpp:1218
Geometry< NodeType > GeometryType
Geometry type (using with given NodeType)
Definition: fractional_step.h:77
FractionalStep(IndexType NewId, GeometryType::Pointer pGeometry)
Constructor using a geometry object.
Definition: fractional_step.h:135
TVariableType::Type & GetValue(const TVariableType &rThisVariable)
Definition: geometrical_object.h:248
Flags & GetFlags()
Returns the flags of the object.
Definition: geometrical_object.h:176
GeometryType & GetGeometry()
Returns the reference of the geometry.
Definition: geometrical_object.h:158
DataValueContainer & GetData()
Definition: geometrical_object.h:212
IntegrationMethod
Definition: geometry_data.h:76
Geometry base class.
Definition: geometry.h:71
SizeType PointsNumber() const
Definition: geometry.h:528
virtual Pointer Create(PointsArrayType const &rThisPoints) const
Creates a new geometry pointer.
Definition: geometry.h:813
SizeType IntegrationPointsNumber() const
Definition: geometry.h:2257
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
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
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
#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
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
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
int d
Definition: ode_solve.py:397
N
Definition: sensitivityMatrix.py:29
integer i
Definition: TensorModule.f:17