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.
shallow_water_residual_based_bdf_scheme.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: Miguel Maso Sotomayor
11 //
12 
13 #ifndef KRATOS_SHALLOW_WATER_RESIDUAL_BASED_BDF_SCHEME_H_INCLUDED
14 #define KRATOS_SHALLOW_WATER_RESIDUAL_BASED_BDF_SCHEME_H_INCLUDED
15 
16 // System includes
17 
18 // External includes
19 
20 // Project includes
25 
26 namespace Kratos
27 {
42 
54 template<class TSparseSpace, class TDenseSpace>
56  : public ResidualBasedBDFScheme<TSparseSpace, TDenseSpace>
57 {
58 public:
62 
64 
66 
68 
70 
72 
74 
76 
78 
79  typedef typename ModelPart::NodeType NodeType;
80 
82 
86 
87  // Constructor
88  explicit ShallowWaterResidualBasedBDFScheme(const std::size_t Order = 2, bool UpdateVelocities = false)
89  : BDFBaseType(Order)
90  , mRotationTool()
93  {
94  mVariables = {&MOMENTUM_X, &MOMENTUM_Y, &HEIGHT};
95  mDerivativeVariables = {&ACCELERATION_X, &ACCELERATION_Y, &VERTICAL_VELOCITY};
96  }
97 
98  // Constructor with parameters
100  : BDFBaseType(ThisParameters["integration_order"].GetDouble())
101  , mRotationTool()
102  {
103  ThisParameters = this->ValidateAndAssignParameters(ThisParameters, this->GetDefaultParameters());
104  this->AssignSettings(ThisParameters);
105  }
106 
107  // Copy Constructor
109  : BDFBaseType(rOther)
110  , mRotationTool()
113  , mVariables(rOther.mVariables)
115  {}
116 
120  typename BaseType::Pointer Clone() override
121  {
122  return typename BaseType::Pointer(new ShallowWaterResidualBasedBDFScheme(*this));
123  }
124 
125  // Destructor
127 
131 
135 
144  void Update(
145  ModelPart& rModelPart,
146  DofsArrayType& rDofSet,
147  TSystemMatrixType& rA,
148  TSystemVectorType& rDx,
150  ) override
151  {
152  KRATOS_TRY;
153 
154  mRotationTool.RotateVelocities(rModelPart);
155 
156  mpDofUpdater->UpdateDofs(rDofSet, rDx);
157 
158  mRotationTool.RecoverVelocities(rModelPart);
159 
160  BDFBaseType::UpdateDerivatives(rModelPart, rDofSet, rA, rDx, rb);
161 
162  if (mUpdateVelocities) UpdateVelocities(rModelPart);
163 
164  KRATOS_CATCH("ShallowWaterResidualBasedBDFScheme.Update");
165  }
166 
176  void Predict(
177  ModelPart& rModelPart,
178  DofsArrayType& rDofSet,
179  TSystemMatrixType& rA,
180  TSystemVectorType& rDx,
182  ) override
183  {
184  KRATOS_TRY;
185 
186  const double delta_time = rModelPart.GetProcessInfo()[DELTA_TIME];
187 
188  const int num_nodes = static_cast<int>( rModelPart.Nodes().size() );
189  const auto it_node_begin = rModelPart.Nodes().begin();
190 
191  IndexPartition<std::size_t>(num_nodes).for_each([&](std::size_t i){
192  auto it_node = it_node_begin + i;
193 
194  for (std::size_t j = 0; j < 3; ++j)
195  {
196  if (!it_node->IsFixed(*mVariables[j])) {
197  double& un0 = it_node->FastGetSolutionStepValue(*mVariables[j]);
198  double un1 = it_node->FastGetSolutionStepValue(*mVariables[j], 1);
199  double dot_un1 = it_node->FastGetSolutionStepValue(*mDerivativeVariables[j], 1);
200  un0 = un1 + delta_time * dot_un1;
201  }
202  }
203 
204  UpdateFirstDerivative(it_node);
205  });
206 
207  KRATOS_CATCH("ShallowWaterResidualBasedBDFScheme.Predict");
208  }
209 
219  Element& rCurrentElement,
220  LocalSystemMatrixType& rLHS_Contribution,
221  LocalSystemVectorType& rRHS_Contribution,
222  Element::EquationIdVectorType& rEquationId,
223  const ProcessInfo& rCurrentProcessInfo
224  ) override
225  {
227  rCurrentElement,
228  rLHS_Contribution,
229  rRHS_Contribution,
230  rEquationId,
231  rCurrentProcessInfo);
232 
233  mRotationTool.Rotate(rLHS_Contribution,rRHS_Contribution,rCurrentElement.GetGeometry());
234  mRotationTool.ApplySlipCondition(rLHS_Contribution,rRHS_Contribution,rCurrentElement.GetGeometry());
235  }
236 
245  Element& rCurrentElement,
246  LocalSystemVectorType& rRHS_Contribution,
247  Element::EquationIdVectorType& rEquationId,
248  const ProcessInfo& rCurrentProcessInfo
249  ) override
250  {
252  rCurrentElement,
253  rRHS_Contribution,
254  rEquationId,
255  rCurrentProcessInfo);
256 
257  mRotationTool.Rotate(rRHS_Contribution,rCurrentElement.GetGeometry());
258  mRotationTool.ApplySlipCondition(rRHS_Contribution,rCurrentElement.GetGeometry());
259  }
260 
270  Condition& rCurrentCondition,
271  LocalSystemMatrixType& rLHS_Contribution,
272  LocalSystemVectorType& rRHS_Contribution,
273  Element::EquationIdVectorType& rEquationId,
274  const ProcessInfo& rCurrentProcessInfo
275  ) override
276  {
278  rCurrentCondition,
279  rLHS_Contribution,
280  rRHS_Contribution,
281  rEquationId,
282  rCurrentProcessInfo);
283 
284  mRotationTool.Rotate(rLHS_Contribution,rRHS_Contribution,rCurrentCondition.GetGeometry());
285  mRotationTool.ApplySlipCondition(rLHS_Contribution,rRHS_Contribution,rCurrentCondition.GetGeometry());
286  }
287 
296  Condition& rCurrentCondition,
297  LocalSystemVectorType& rRHS_Contribution,
298  Element::EquationIdVectorType& rEquationId,
299  const ProcessInfo& rCurrentProcessInfo
300  ) override
301  {
303  rCurrentCondition,
304  rRHS_Contribution,
305  rEquationId,
306  rCurrentProcessInfo);
307 
308  mRotationTool.Rotate(rRHS_Contribution,rCurrentCondition.GetGeometry());
309  mRotationTool.ApplySlipCondition(rRHS_Contribution,rCurrentCondition.GetGeometry());
310  }
311 
317  void Initialize(ModelPart& rModelPart) override
318  {
319  BaseType::Initialize(rModelPart);
322  }
323  }
324 
333  ModelPart& rModelPart,
334  TSystemMatrixType& rA,
335  TSystemVectorType& rDx,
337  ) override
338  {
340  const ProcessInfo& r_process_info = rModelPart.GetProcessInfo();
341  block_for_each(rModelPart.Nodes(), [](NodeType& rNode){
342  rNode.FastGetSolutionStepValue(DISPERSION_H) = ZeroVector(3);
343  rNode.FastGetSolutionStepValue(DISPERSION_V) = ZeroVector(3);
344  });
345  block_for_each(rModelPart.Elements(), [&](Element& rElement){
346  rElement.InitializeNonLinearIteration(r_process_info);
347  });
348  block_for_each(rModelPart.Conditions(), [&](Condition& rCondition){
349  rCondition.InitializeNonLinearIteration(r_process_info);
350  });
351  block_for_each(rModelPart.Nodes(), [](NodeType& rNode){
352  const double nodal_area = rNode.FastGetSolutionStepValue(NODAL_AREA);
353  rNode.FastGetSolutionStepValue(DISPERSION_H) /= nodal_area;
354  rNode.FastGetSolutionStepValue(DISPERSION_V) /= nodal_area;
355  });
357  }
358  }
359 
363  void Clear() override
364  {
365  this->mpDofUpdater->Clear();
366  }
367 
372  {
373  Parameters default_parameters = Parameters(R"(
374  {
375  "name" : "shallow_water_residual_based_bdf_scheme",
376  "integration_order" : 2,
377  "update_velocities" : false,
378  "project_dispersive_field" : false,
379  "solution_variables" : ["MOMENTUM","HEIGHT"]
380  })" );
381 
382  // Getting base class default parameters
383  const Parameters base_default_parameters = BDFBaseType::GetDefaultParameters();
384  default_parameters.RecursivelyAddMissingParameters(base_default_parameters);
385  return default_parameters;
386  }
387 
391 
395 
399 
401  std::string Info() const override
402  {
403  return "ShallowWaterResidualBasedBDFScheme";
404  }
405 
409 
410 protected:
411 
414 
422  Parameters ThisParameters,
423  const Parameters DefaultParameters
424  ) const override
425  {
426  ThisParameters.ValidateAndAssignDefaults(DefaultParameters);
427  return ThisParameters;
428  }
429 
434  void AssignSettings(const Parameters ThisParameters) override
435  {
436  mUpdateVelocities = ThisParameters["update_velocities"].GetBool();
437  mProjectDispersiveField = ThisParameters["project_dispersive_field"].GetBool();
438 
439  const auto variable_names = ThisParameters["solution_variables"].GetStringArray();
440  for (std::string variable_name : variable_names)
441  {
442  if (KratosComponents<Variable<double>>::Has(variable_name))
443  {
444  const auto& r_var = KratosComponents<Variable<double>>::Get(variable_name);
445  mVariables.push_back(&r_var);
446  }
447  else if (KratosComponents<Variable<array_1d<double,3>>>::Has(variable_name)) {
448  const auto& r_var_x = KratosComponents<Variable<double>>::Get(variable_name+"_X");
449  const auto& r_var_y = KratosComponents<Variable<double>>::Get(variable_name+"_Y");
450  mVariables.push_back(&r_var_x);
451  mVariables.push_back(&r_var_y);
452  }
453  else
454  {
455  KRATOS_ERROR << "Only double and component variables are allowed in the solution variables list." ;
456  }
457  }
458  mDerivativeVariables.push_back(&ACCELERATION_X);
459  mDerivativeVariables.push_back(&ACCELERATION_Y);
460  mDerivativeVariables.push_back(&VERTICAL_VELOCITY);
461  }
462 
466 
467  typename TSparseSpace::DofUpdaterPointerType mpDofUpdater = TSparseSpace::CreateDofUpdater();
468 
470 
473 
474  std::vector<const Variable<double>*> mVariables;
475  std::vector<const Variable<double>*> mDerivativeVariables;
476 
480 
484 
489  void UpdateFirstDerivative(NodesArrayType::iterator itNode) override
490  {
491  for (std::size_t i_var = 0; i_var < 3; ++i_var)
492  {
493  double& dot_un0 = itNode->FastGetSolutionStepValue(*mDerivativeVariables[i_var]);
494  dot_un0 = BDFBaseType::mBDF[0] * itNode->FastGetSolutionStepValue(*mVariables[i_var]);
495 
496  for (std::size_t i_order = 1; i_order < BDFBaseType::mOrder + 1; ++i_order)
497  {
498  dot_un0 += BDFBaseType::mBDF[i_order] * itNode->FastGetSolutionStepValue(*mVariables[i_var], i_order);
499  }
500  }
501  }
502 
507  void UpdateSecondDerivative(NodesArrayType::iterator itNode) override {}
508 
513  void UpdateVelocities(ModelPart& rModelPart)
514  {
515  block_for_each(rModelPart.Nodes(), [&](NodeType& r_node){
516  auto& vel = r_node.FastGetSolutionStepValue(VELOCITY);
517  const auto& q = r_node.FastGetSolutionStepValue(MOMENTUM);
518  const auto& h = r_node.FastGetSolutionStepValue(HEIGHT);
519  vel = q / h;
520  });
521  }
522 
531  LocalSystemMatrixType& rLHS_Contribution,
534  const ProcessInfo& rCurrentProcessInfo
535  ) override
536  {
537  // Adding mass contribution to the dynamic stiffness
538  if (rM.size1() != 0) { // if M matrix declared
539  noalias(rLHS_Contribution) += rM * BDFBaseType::mBDF[0];
540  }
541  }
542 
552  Element& rElement,
553  LocalSystemVectorType& rRHS_Contribution,
556  const ProcessInfo& rCurrentProcessInfo
557  ) override
558  {
559  const std::size_t this_thread = OpenMPUtils::ThisThread();
560 
561  // Adding inertia contribution
562  if (rM.size1() != 0) {
563  rElement.GetFirstDerivativesVector(BDFBaseType::mVector.dotun0[this_thread], 0);
564  noalias(rRHS_Contribution) -= prod(rM, BDFBaseType::mVector.dotun0[this_thread]);
565  }
566  }
567 
577  Condition& rCondition,
578  LocalSystemVectorType& rRHS_Contribution,
581  const ProcessInfo& rCurrentProcessInfo
582  ) override
583  {
584  const std::size_t this_thread = OpenMPUtils::ThisThread();
585 
586  // Adding inertia contribution
587  if (rM.size1() != 0) {
588  rCondition.GetFirstDerivativesVector(BDFBaseType::mVector.dotun0[this_thread], 0);
589  noalias(rRHS_Contribution) -= prod(rM, BDFBaseType::mVector.dotun0[this_thread]);
590  }
591  }
592 
593 
595  {
596  block_for_each(rModelPart.Nodes(), [](NodeType& rNode){
597  if (rNode.IsFixed(VELOCITY_X)) {
598  rNode.FastGetSolutionStepValue(DISPERSION_H_X) = 0.0;
599  rNode.FastGetSolutionStepValue(DISPERSION_V_X) = 0.0;
600  }
601  if (rNode.IsFixed(VELOCITY_Y)) {
602  rNode.FastGetSolutionStepValue(DISPERSION_H_Y) = 0.0;
603  rNode.FastGetSolutionStepValue(DISPERSION_V_Y) = 0.0;
604  }
605  });
606  }
607 
611 
615 
620 
621 }; // Class ShallowWaterResidualBasedBDFScheme
622 
626 
630 
632 
633 } // Namespace Kratos
634 
635 #endif // KRATOS_SHALLOW_WATER_RESIDUAL_BASED_BDF_SCHEME_H_INCLUDED defined
Computes NODAL_AREA.
Definition: calculate_nodal_area_process.h:67
void Execute() override
Execute method is used to execute the Process algorithms.
Definition: calculate_nodal_area_process.cpp:27
Base class for all Conditions.
Definition: condition.h:59
virtual void GetFirstDerivativesVector(Vector &values, int Step=0) const
Definition: condition.h:313
virtual void Rotate(TLocalMatrixType &rLocalMatrix, TLocalVectorType &rLocalVector, GeometryType &rGeometry) const
Rotate the local system contributions so that they are oriented with each node's normal.
Definition: coordinate_transformation_utilities.h:447
Base class for all Elements.
Definition: element.h:60
virtual void GetFirstDerivativesVector(Vector &values, int Step=0) const
Definition: element.h:310
std::vector< std::size_t > EquationIdVectorType
Definition: element.h:98
virtual void RotateVelocities(ModelPart &rModelPart) const override
Transform nodal velocities to the rotated coordinates (aligned with each node's normal)
Definition: flow_rate_slip_utility.h:170
virtual void ApplySlipCondition(TLocalMatrixType &rLocalMatrix, TLocalVectorType &rLocalVector, GeometryType &rGeometry) const override
Apply slip boundary conditions to the rotated local contributions. @detail This function takes the lo...
Definition: flow_rate_slip_utility.h:99
virtual void RecoverVelocities(ModelPart &rModelPart) const override
Definition: flow_rate_slip_utility.h:204
GeometryType & GetGeometry()
Returns the reference of the geometry.
Definition: geometrical_object.h:158
This class is useful for index iteration over containers.
Definition: parallel_utilities.h:451
void for_each(TUnaryFunction &&f)
Definition: parallel_utilities.h:514
KratosComponents class encapsulates a lookup table for a family of classes in a generic way.
Definition: kratos_components.h:49
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
ConditionsContainerType & Conditions(IndexType ThisIndex=0)
Definition: model_part.h:1381
ProcessInfo & GetProcessInfo()
Definition: model_part.h:1746
ElementsContainerType & Elements(IndexType ThisIndex=0)
Definition: model_part.h:1189
MeshType::NodesContainerType NodesContainerType
Nodes container. Which is a vector set of nodes with their Id's as key.
Definition: model_part.h:128
NodesContainerType & Nodes(IndexType ThisIndex=0)
Definition: model_part.h:507
This class defines the node.
Definition: node.h:65
bool IsFixed(const VariableData &rDofVariable) const
Definition: node.h:897
static int ThisThread()
Wrapper for omp_get_thread_num().
Definition: openmp_utils.h:108
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
std::vector< std::string > GetStringArray() const
This method returns the array of strings in the current Parameter.
Definition: kratos_parameters.cpp:693
void RecursivelyAddMissingParameters(const Parameters &rDefaultParameters)
This function is designed to verify that the parameters under testing contain at least all parameters...
Definition: kratos_parameters.cpp:1457
void ValidateAndAssignDefaults(const Parameters &rDefaultParameters)
This function is designed to verify that the parameters under testing match the form prescribed by th...
Definition: kratos_parameters.cpp:1306
bool GetBool() const
This method returns the boolean contained in the current Parameter.
Definition: kratos_parameters.cpp:675
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
BDF integration scheme (for dynamic problems)
Definition: residual_based_bdf_scheme.h:83
Parameters GetDefaultParameters() const override
This method provides the defaults parameters to avoid conflicts between the different constructors.
Definition: residual_based_bdf_scheme.h:304
GeneralVectors mVector
The BDF coefficients.
Definition: residual_based_bdf_scheme.h:357
ImplicitBaseType::LocalSystemVectorType LocalSystemVectorType
Definition: residual_based_bdf_scheme.h:105
ImplicitBaseType::TSystemVectorType TSystemVectorType
Definition: residual_based_bdf_scheme.h:103
Vector mBDF
The integration order.
Definition: residual_based_bdf_scheme.h:356
void UpdateDerivatives(ModelPart &rModelPart, DofsArrayType &rDofSet, TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb)
Performing the update of the derivatives.
Definition: residual_based_bdf_scheme.h:377
ImplicitBaseType::LocalSystemMatrixType LocalSystemMatrixType
Definition: residual_based_bdf_scheme.h:107
const std::size_t mOrder
Definition: residual_based_bdf_scheme.h:355
ImplicitBaseType::TSystemMatrixType TSystemMatrixType
Definition: residual_based_bdf_scheme.h:101
void CalculateRHSContribution(Element &rCurrentElement, LocalSystemVectorType &rRHSContribution, Element::EquationIdVectorType &rEquationId, const ProcessInfo &rCurrentProcessInfo) override
This function is designed to calculate just the RHS contribution.
Definition: residual_based_implicit_time_scheme.h:180
void CalculateSystemContributions(Element &rCurrentElement, LocalSystemMatrixType &rLHSContribution, LocalSystemVectorType &rRHSContribution, Element::EquationIdVectorType &rEquationId, const ProcessInfo &rCurrentProcessInfo) override
This function is designed to be called in the builder and solver to introduce the selected time integ...
Definition: residual_based_implicit_time_scheme.h:158
This class provides the implementation of the basic tasks that are needed by the solution strategy.
Definition: scheme.h:56
virtual void Initialize(ModelPart &rModelPart)
This is the place to initialize the Scheme.
Definition: scheme.h:168
BDF integration scheme (for dynamic problems)
Definition: shallow_water_residual_based_bdf_scheme.h:57
Parameters ValidateAndAssignParameters(Parameters ThisParameters, const Parameters DefaultParameters) const override
This method validate and assign default parameters.
Definition: shallow_water_residual_based_bdf_scheme.h:421
void Initialize(ModelPart &rModelPart) override
Initialize the nodal area and the derivatives recovery.
Definition: shallow_water_residual_based_bdf_scheme.h:317
ModelPart::NodesContainerType NodesArrayType
Definition: shallow_water_residual_based_bdf_scheme.h:77
BDFBaseType::LocalSystemMatrixType LocalSystemMatrixType
Definition: shallow_water_residual_based_bdf_scheme.h:75
FlowRateSlipUtility< LocalSystemMatrixType, LocalSystemVectorType, double > FlowRateSlipToolType
Definition: shallow_water_residual_based_bdf_scheme.h:81
void UpdateVelocities(ModelPart &rModelPart)
Updating the velocities.
Definition: shallow_water_residual_based_bdf_scheme.h:513
void AssignSettings(const Parameters ThisParameters) override
This method assigns settings to member variables.
Definition: shallow_water_residual_based_bdf_scheme.h:434
ShallowWaterResidualBasedBDFScheme(const std::size_t Order=2, bool UpdateVelocities=false)
Definition: shallow_water_residual_based_bdf_scheme.h:88
BDFBaseType::TSystemMatrixType TSystemMatrixType
Definition: shallow_water_residual_based_bdf_scheme.h:69
void UpdateSecondDerivative(NodesArrayType::iterator itNode) override
Updating second time derivative.
Definition: shallow_water_residual_based_bdf_scheme.h:507
BaseType::Pointer Clone() override
Definition: shallow_water_residual_based_bdf_scheme.h:120
FlowRateSlipToolType mRotationTool
Definition: shallow_water_residual_based_bdf_scheme.h:469
BDFBaseType::LocalSystemVectorType LocalSystemVectorType
Definition: shallow_water_residual_based_bdf_scheme.h:73
std::string Info() const override
Turn back information as a string.
Definition: shallow_water_residual_based_bdf_scheme.h:401
Parameters GetDefaultParameters() const override
This method provides the defaults parameters to avoid conflicts between the different constructors.
Definition: shallow_water_residual_based_bdf_scheme.h:371
void AddDynamicsToRHS(Condition &rCondition, LocalSystemVectorType &rRHS_Contribution, LocalSystemMatrixType &rD, LocalSystemMatrixType &rM, const ProcessInfo &rCurrentProcessInfo) override
It adds the dynamic RHS contribution of the condition.
Definition: shallow_water_residual_based_bdf_scheme.h:576
ShallowWaterResidualBasedBDFScheme(Parameters ThisParameters)
Definition: shallow_water_residual_based_bdf_scheme.h:99
void CalculateRHSContribution(Element &rCurrentElement, LocalSystemVectorType &rRHS_Contribution, Element::EquationIdVectorType &rEquationId, const ProcessInfo &rCurrentProcessInfo) override
This function is designed to calculate just the RHS contribution.
Definition: shallow_water_residual_based_bdf_scheme.h:244
bool mProjectDispersiveField
Definition: shallow_water_residual_based_bdf_scheme.h:472
~ShallowWaterResidualBasedBDFScheme() override
Definition: shallow_water_residual_based_bdf_scheme.h:126
void UpdateFirstDerivative(NodesArrayType::iterator itNode) override
Updating first time derivative.
Definition: shallow_water_residual_based_bdf_scheme.h:489
std::vector< const Variable< double > * > mVariables
Definition: shallow_water_residual_based_bdf_scheme.h:474
void Clear() override
Free memory allocated by this class.
Definition: shallow_water_residual_based_bdf_scheme.h:363
void AddDynamicsToLHS(LocalSystemMatrixType &rLHS_Contribution, LocalSystemMatrixType &rD, LocalSystemMatrixType &rM, const ProcessInfo &rCurrentProcessInfo) override
It adds the dynamic LHS contribution of the elements.
Definition: shallow_water_residual_based_bdf_scheme.h:530
void CalculateSystemContributions(Condition &rCurrentCondition, LocalSystemMatrixType &rLHS_Contribution, LocalSystemVectorType &rRHS_Contribution, Element::EquationIdVectorType &rEquationId, const ProcessInfo &rCurrentProcessInfo) override
This function is designed to be called in the builder and solver to introduce the selected time integ...
Definition: shallow_water_residual_based_bdf_scheme.h:269
void ApplyLaplacianBoundaryConditions(ModelPart &rModelPart)
Definition: shallow_water_residual_based_bdf_scheme.h:594
std::vector< const Variable< double > * > mDerivativeVariables
Definition: shallow_water_residual_based_bdf_scheme.h:475
ModelPart::NodeType NodeType
Definition: shallow_water_residual_based_bdf_scheme.h:79
BDFBaseType::TSystemVectorType TSystemVectorType
Definition: shallow_water_residual_based_bdf_scheme.h:71
BDFBaseType::DofsArrayType DofsArrayType
Definition: shallow_water_residual_based_bdf_scheme.h:67
void InitializeNonLinIteration(ModelPart &rModelPart, TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb) override
Calculate the global projection of the dispersive field.
Definition: shallow_water_residual_based_bdf_scheme.h:332
ResidualBasedBDFScheme< TSparseSpace, TDenseSpace > BDFBaseType
Definition: shallow_water_residual_based_bdf_scheme.h:65
TSparseSpace::DofUpdaterPointerType mpDofUpdater
Definition: shallow_water_residual_based_bdf_scheme.h:467
ShallowWaterResidualBasedBDFScheme(ShallowWaterResidualBasedBDFScheme &rOther)
Definition: shallow_water_residual_based_bdf_scheme.h:108
void CalculateSystemContributions(Element &rCurrentElement, LocalSystemMatrixType &rLHS_Contribution, LocalSystemVectorType &rRHS_Contribution, Element::EquationIdVectorType &rEquationId, const ProcessInfo &rCurrentProcessInfo) override
This function is designed to be called in the builder and solver to introduce the selected time integ...
Definition: shallow_water_residual_based_bdf_scheme.h:218
Scheme< TSparseSpace, TDenseSpace > BaseType
Definition: shallow_water_residual_based_bdf_scheme.h:63
bool mUpdateVelocities
Definition: shallow_water_residual_based_bdf_scheme.h:471
void CalculateRHSContribution(Condition &rCurrentCondition, LocalSystemVectorType &rRHS_Contribution, Element::EquationIdVectorType &rEquationId, const ProcessInfo &rCurrentProcessInfo) override
This function is designed to calculate just the RHS contribution.
Definition: shallow_water_residual_based_bdf_scheme.h:295
KRATOS_CLASS_POINTER_DEFINITION(ShallowWaterResidualBasedBDFScheme)
void Predict(ModelPart &rModelPart, DofsArrayType &rDofSet, TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb) override
Performing the prediction of the solution.
Definition: shallow_water_residual_based_bdf_scheme.h:176
void AddDynamicsToRHS(Element &rElement, LocalSystemVectorType &rRHS_Contribution, LocalSystemMatrixType &rD, LocalSystemMatrixType &rM, const ProcessInfo &rCurrentProcessInfo) override
It adds the dynamic RHS contribution of the elements.
Definition: shallow_water_residual_based_bdf_scheme.h:551
void Update(ModelPart &rModelPart, DofsArrayType &rDofSet, TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb) override
Performing the update of the solution within newton iteration.
Definition: shallow_water_residual_based_bdf_scheme.h:144
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
#define KRATOS_ERROR
Definition: exception.h:161
bool Has(const std::string &ModelerName)
Checks if the modeler is registered.
Definition: modeler_factory.cpp:24
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
void block_for_each(TIterator itBegin, TIterator itEnd, TFunction &&rFunction)
Execute a functor on all items of a range in parallel.
Definition: parallel_utilities.h:299
AMatrix::MatrixProductExpression< TExpression1Type, TExpression2Type > prod(AMatrix::MatrixExpression< TExpression1Type, TCategory1 > const &First, AMatrix::MatrixExpression< TExpression2Type, TCategory2 > const &Second)
Definition: amatrix_interface.h:568
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
delta_time
Definition: generate_frictional_mortar_condition.py:130
int j
Definition: quadrature.py:648
integer i
Definition: TensorModule.f:17