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.
residual_based_adams_moulton_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 
14 #ifndef KRATOS_RESIDUAL_BASED_ADAMS_MOULTON_SCHEME_H_INCLUDED
15 #define KRATOS_RESIDUAL_BASED_ADAMS_MOULTON_SCHEME_H_INCLUDED
16 
17 // System includes
18 
19 // External includes
20 
21 // Project includes
24 
25 namespace Kratos
26 {
27 
30 
40 template<class TSparseSpace, class TDenseSpace >
42  : public Scheme<TSparseSpace,TDenseSpace>
43 {
44 public:
47 
49 
51 
53 
55 
57 
59 
61 
65 
67 
71 
76  {
77  // Allocate auxiliary memory
78  const std::size_t num_threads = ParallelUtilities::GetNumThreads();
79  mM.resize(num_threads);
80  mU0.resize(num_threads);
81  mU1.resize(num_threads);
82  mDU.resize(num_threads);
83  }
84 
90  : BaseType(ThisParameters)
91  {
92  // Allocate auxiliary memory
93  const std::size_t num_threads = ParallelUtilities::GetNumThreads();
94  mM.resize(num_threads);
95  mU0.resize(num_threads);
96  mU1.resize(num_threads);
97  mDU.resize(num_threads);
98  }
99 
104  : BaseType(rOther)
105  , mM(rOther.mM)
106  , mU0(rOther.mU0)
107  , mU1(rOther.mU1)
108  , mDU(rOther.mDU)
109  {
110  }
111 
115  typename BaseType::Pointer Clone() override
116  {
117  return Kratos::make_shared<ResidualBasedAdamsMoultonScheme>(*this);
118  }
119 
124 
128 
132 
138  void Initialize(ModelPart& rModelPart) override
139  {
140  BaseType::Initialize(rModelPart);
142  }
143 
152  void Predict(
153  ModelPart& rModelPart,
154  DofsArrayType& rDofSet,
155  TSystemMatrixType& rA,
156  TSystemVectorType& rDx,
158  ) override
159  {
160  KRATOS_TRY;
161 
162  const ProcessInfo& r_process_info = rModelPart.GetProcessInfo();
163  const double delta_time = r_process_info[DELTA_TIME];
164  KRATOS_ERROR_IF(delta_time < 1.0e-24) << "ERROR:: Detected delta_time near to zero" << std::endl;
165 
166  // Prediction of the derivatives
167  PredictDerivatives(rModelPart, rDofSet, rA, rDx, rb);
168 
169  // Recover the laplacian
170  InitializeNonLinIteration(rModelPart, rA, rDx, rb);
171 
172  // Setting to zero the the prediction
173  block_for_each(rModelPart.Nodes(), [&](NodeType& rNode){
174  rNode.FastGetSolutionStepValue(RHS) = ZeroVector(3);
175  });
176 
177  // Calculate the prediction
178  block_for_each(rModelPart.Elements(), [&](Element& rElement){
179  rElement.AddExplicitContribution(r_process_info);
180  });
181 
182  // Apply the prediction
183  block_for_each(rModelPart.Nodes(), [&](NodeType& rNode){
184  array_1d<double,3>& velocity = rNode.FastGetSolutionStepValue(VELOCITY);
185  double& height = rNode.FastGetSolutionStepValue(HEIGHT);
186  const array_1d<double,3>& prediction = rNode.FastGetSolutionStepValue(RHS);
187  const double inv_mass = 1.0 / rNode.FastGetSolutionStepValue(NODAL_AREA);
188  if (rNode.IsFixed(VELOCITY_X) == false) {
189  velocity[0] += delta_time * inv_mass * prediction[0];
190  }
191  if (rNode.IsFixed(VELOCITY_Y) == false) {
192  velocity[1] += delta_time * inv_mass * prediction[1];
193  }
194  if (rNode.IsFixed(HEIGHT) == false) {
195  height += delta_time * inv_mass * prediction[2];
196  }
197  });
198 
199  KRATOS_CATCH("ResidualBasedAdamsMoultonScheme.Predict");
200  }
201 
210  ModelPart& rModelPart,
211  TSystemMatrixType& rA,
212  TSystemVectorType& rDx,
214  ) override
215  {
216  BaseType::InitializeSolutionStep(rModelPart, rA, rDx, rb);
217 
218  ProcessInfo& r_process_info = rModelPart.GetProcessInfo();
219  const double dt_0 = r_process_info[DELTA_TIME];
220  const double dt_1 = r_process_info.GetPreviousTimeStepInfo(1)[DELTA_TIME];
221  KRATOS_ERROR_IF(std::abs(dt_0 - dt_1) > 1e-10*(dt_0 + dt_1))
222  << "ResidualBasedAdamsMoultonScheme. The time step must be constant.\nPrevious time step : " << dt_1 << "\nCurrent time step : " << dt_0 << std::endl;
223  }
224 
233  ModelPart& rModelPart,
234  TSystemMatrixType& rA,
235  TSystemVectorType& rDx,
237  ) override
238  {
239  const ProcessInfo& r_process_info = rModelPart.GetProcessInfo();
240  block_for_each(rModelPart.Nodes(), [](NodeType& rNode){
241  rNode.FastGetSolutionStepValue(DISPERSION_H) = ZeroVector(3);
242  rNode.FastGetSolutionStepValue(DISPERSION_V) = ZeroVector(3);
243  });
244  block_for_each(rModelPart.Elements(), [&](Element& rElement){
245  rElement.InitializeNonLinearIteration(r_process_info);
246  });
247  block_for_each(rModelPart.Conditions(), [&](Condition& rCondition){
248  rCondition.InitializeNonLinearIteration(r_process_info);
249  });
250  block_for_each(rModelPart.Nodes(), [](NodeType& rNode){
251  const double nodal_area = rNode.FastGetSolutionStepValue(NODAL_AREA);
252  rNode.FastGetSolutionStepValue(DISPERSION_H) /= nodal_area;
253  rNode.FastGetSolutionStepValue(DISPERSION_V) /= nodal_area;
254  });
255  ApplyLaplacianBoundaryConditions(rModelPart);
256  }
257 
266  void Update(
267  ModelPart& rModelPart,
268  DofsArrayType& rDofSet,
269  TSystemMatrixType& rA,
270  TSystemVectorType& rDx,
272  ) override
273  {
274  KRATOS_TRY;
275 
276  mpDofUpdater->UpdateDofs(rDofSet, rDx);
277 
278  UpdateDerivatives(rModelPart, rDofSet, rA, rDx, rb);
279 
280  KRATOS_CATCH("ResidualBasedAdamsMoultonScheme.Update");
281  }
282 
293  Element& rCurrentElement,
294  LocalSystemMatrixType& rLHSContribution,
295  LocalSystemVectorType& rRHSContribution,
296  Element::EquationIdVectorType& rEquationId,
297  const ProcessInfo& rCurrentProcessInfo
298  ) override
299  {
300  TCalculateSystemContributions(rCurrentElement, rLHSContribution, rRHSContribution, rEquationId, rCurrentProcessInfo);
301  }
302 
311  Element& rCurrentElement,
312  LocalSystemVectorType& rRHSContribution,
313  Element::EquationIdVectorType& rEquationId,
314  const ProcessInfo& rCurrentProcessInfo
315  ) override
316  {
317  TCalculateRHSContribution(rCurrentElement, rRHSContribution, rEquationId, rCurrentProcessInfo);
318  }
319 
329  Condition& rCurrentCondition,
330  LocalSystemMatrixType& rLHSContribution,
331  LocalSystemVectorType& rRHSContribution,
332  Element::EquationIdVectorType& rEquationId,
333  const ProcessInfo& rCurrentProcessInfo
334  ) override
335  {
336  TCalculateSystemContributions(rCurrentCondition, rLHSContribution, rRHSContribution, rEquationId, rCurrentProcessInfo);
337  }
338 
347  Condition& rCurrentCondition,
348  LocalSystemVectorType& rRHSContribution,
349  Element::EquationIdVectorType& rEquationId,
350  const ProcessInfo& rCurrentProcessInfo
351  ) override
352  {
353  KRATOS_TRY;
354 
355  TCalculateRHSContribution(rCurrentCondition, rRHSContribution, rEquationId, rCurrentProcessInfo);
356 
357  KRATOS_CATCH("ResidualBasedAdamsMoultonScheme.CalculateRHSContribution");
358  }
359 
363  void Clear() override
364  {
365  this->mpDofUpdater->Clear();
366  }
367 
371 
377  {
378  Parameters default_parameters = Parameters(R"(
379  {
380  "name" : "residual_based_adams_moulton_scheme"
381  })");
382 
383  // Getting base class default parameters
384  const Parameters base_default_parameters = BaseType::GetDefaultParameters();
385  default_parameters.RecursivelyAddMissingParameters(base_default_parameters);
386  return default_parameters;
387  }
388 
392 
396 
400  std::string Info() const override
401  {
402  return "ResidualBasedAdamsMoultonScheme";
403  }
404 
408 
410 
411 protected:
412 
415 
419 
420  std::vector< Matrix > mM;
421  std::vector< Vector > mU0;
422  std::vector< Vector > mU1;
423  std::vector< Vector > mDU;
424 
428 
432 
441  inline void PredictDerivatives(
442  ModelPart& rModelPart,
443  DofsArrayType& rDofSet,
444  TSystemMatrixType& rA,
445  TSystemVectorType& rDx,
447  )
448  {
449  const double dt_inv = 1.0 / rModelPart.GetProcessInfo()[DELTA_TIME];
450  block_for_each(rModelPart.Nodes(), [&](NodeType& rNode){
451  PredictDerivative(rNode, VELOCITY, ACCELERATION, dt_inv);
452  PredictDerivative(rNode, HEIGHT, VERTICAL_VELOCITY, dt_inv);
453  });
454  }
455 
463  template<class TDataType>
464  inline void PredictDerivative(
465  NodeType& rNode,
466  const Variable<TDataType>& rPrimitiveVariable,
467  const Variable<TDataType>& rDerivativeVariable,
468  const double DtInverse)
469  {
470  const TDataType& f1 = rNode.FastGetSolutionStepValue(rPrimitiveVariable, 1);
471  const TDataType& f2 = rNode.FastGetSolutionStepValue(rPrimitiveVariable, 2);
472  const TDataType& f3 = rNode.FastGetSolutionStepValue(rPrimitiveVariable, 3);
473 
474  TDataType& d1 = rNode.FastGetSolutionStepValue(rDerivativeVariable, 1);
475  TDataType& d2 = rNode.FastGetSolutionStepValue(rDerivativeVariable, 2);
476  TDataType& d3 = rNode.FastGetSolutionStepValue(rDerivativeVariable, 3);
477 
478  d1 = DtInverse * 0.5 * (3*f1 - 4*f2 + f3);
479  d2 = DtInverse * 0.5 * ( f1 - f3);
480  d3 = DtInverse * 0.5 * ( -f1 + 4*f2 -3*f3);
481  }
482 
491  inline void UpdateDerivatives(
492  ModelPart& rModelPart,
493  DofsArrayType& rDofSet,
494  TSystemMatrixType& rA,
495  TSystemVectorType& rDx,
497  )
498  {
499  const double dt_inv = 1.0 / rModelPart.GetProcessInfo()[DELTA_TIME];
500  block_for_each(rModelPart.Nodes(), [&](NodeType& rNode){
501  UpdateDerivative(rNode, VELOCITY, ACCELERATION, dt_inv);
502  UpdateDerivative(rNode, HEIGHT, VERTICAL_VELOCITY, dt_inv);
503  });
504  }
505 
513  template<class TDataType>
514  inline void UpdateDerivative(
515  NodeType& rNode,
516  const Variable<TDataType>& rPrimitiveVariable,
517  const Variable<TDataType>& rDerivativeVariable,
518  const double DtInverse)
519  {
520  const TDataType& f0 = rNode.FastGetSolutionStepValue(rPrimitiveVariable, 0);
521  const TDataType& f1 = rNode.FastGetSolutionStepValue(rPrimitiveVariable, 1);
522  const TDataType& f2 = rNode.FastGetSolutionStepValue(rPrimitiveVariable, 2);
523  const TDataType& f3 = rNode.FastGetSolutionStepValue(rPrimitiveVariable, 3);
524 
525  TDataType& d0 = rNode.FastGetSolutionStepValue(rDerivativeVariable, 0);
526  TDataType& d1 = rNode.FastGetSolutionStepValue(rDerivativeVariable, 1);
527  TDataType& d2 = rNode.FastGetSolutionStepValue(rDerivativeVariable, 2);
528  TDataType& d3 = rNode.FastGetSolutionStepValue(rDerivativeVariable, 3);
529 
530  d0 = DtInverse * (11*f0 - 18*f1 + 9*f2 - 2*f3) / 6.0;
531  d1 = DtInverse * ( 2*f0 + 3*f1 - 6*f2 + f3) / 6.0;
532  d2 = DtInverse * ( -f0 + 6*f1 - 3*f2 - 2*f3) / 6.0;
533  d3 = DtInverse * ( 2*f0 - 9*f1 + 18*f2 - 11*f3) / 6.0;
534  }
535 
544  LocalSystemMatrixType& rLHSContribution,
546  const ProcessInfo& rCurrentProcessInfo
547  )
548  {
549  const double delta_time = rCurrentProcessInfo[DELTA_TIME];
550 
551  // Adding inertia contribution
552  if (rM.size1() != 0) {
553  rLHSContribution = 1.0 / delta_time * rM;
554  }
555  }
556 
566  Element& rCurrentElement,
567  LocalSystemVectorType& rRHSContribution,
569  const ProcessInfo& rCurrentProcessInfo
570  )
571  {
572  const std::size_t this_thread = OpenMPUtils::ThisThread();
573  const double delta_time = rCurrentProcessInfo[DELTA_TIME];
574 
575  // Adding inertia contribution
576  if (rM.size1() != 0) {
577  rCurrentElement.GetValuesVector(mU0[this_thread], 0);
578  rCurrentElement.GetValuesVector(mU1[this_thread], 1);
579  mDU[this_thread] = mU0[this_thread] - mU1[this_thread];
580  noalias(rRHSContribution) -= 1.0 / delta_time * prod(rM, mDU[this_thread]);
581  }
582  }
583 
593  Condition& rCurrentCondition,
594  LocalSystemVectorType& rRHSContribution,
596  const ProcessInfo& rCurrentProcessInfo
597  )
598  {
599  }
600 
604 
608 
613 
614 private:
615 
618 
622 
624  typename TSparseSpace::DofUpdaterPointerType mpDofUpdater = TSparseSpace::CreateDofUpdater();
625 
629 
633 
642  template <class TObjectType>
643  void TCalculateSystemContributions(
644  TObjectType& rObject,
645  LocalSystemMatrixType& rLHSContribution,
646  LocalSystemVectorType& rRHSContribution,
647  Element::EquationIdVectorType& EquationId,
648  const ProcessInfo& rCurrentProcessInfo
649  )
650  {
651  KRATOS_TRY;
652 
653  const auto this_thread = OpenMPUtils::ThisThread();
654 
655  rObject.CalculateRightHandSide(rRHSContribution, rCurrentProcessInfo);
656 
657  rObject.CalculateMassMatrix(mM[this_thread], rCurrentProcessInfo);
658 
659  rObject.EquationIdVector(EquationId, rCurrentProcessInfo);
660 
661  AddDynamicsToLHS(rLHSContribution, mM[this_thread], rCurrentProcessInfo);
662 
663  AddDynamicsToRHS(rObject, rRHSContribution, mM[this_thread], rCurrentProcessInfo);
664 
665  KRATOS_CATCH("ResidualBasedAdamsMoultonScheme.TCalculateSystemContributions");
666  }
667 
675  template <class TObjectType>
676  void TCalculateRHSContribution(
677  TObjectType& rObject,
678  LocalSystemVectorType& rRHSContribution,
679  Element::EquationIdVectorType& rEquationId,
680  const ProcessInfo& rCurrentProcessInfo
681  )
682  {
683  KRATOS_TRY;
684 
685  const auto this_thread = OpenMPUtils::ThisThread();
686 
687  rObject.CalculateRightHandSide(rRHSContribution, rCurrentProcessInfo);
688 
689  rObject.CalculateMassMatrix(mM[this_thread], rCurrentProcessInfo);
690 
691  rObject.EquationIdVector(rEquationId,rCurrentProcessInfo);
692 
693  AddDynamicsToRHS(rObject, rRHSContribution, mM[this_thread], rCurrentProcessInfo);
694 
695  KRATOS_CATCH("ResidualBasedAdamsMoultonScheme.TCalculateRHSContribution");
696  }
697 
702  void ApplyLaplacianBoundaryConditions(ModelPart& rModelPart)
703  {
704  block_for_each(rModelPart.Nodes(), [](NodeType& rNode){
705  if (rNode.IsFixed(VELOCITY_X)) {
706  rNode.FastGetSolutionStepValue(DISPERSION_H_X) = 0.0;
707  rNode.FastGetSolutionStepValue(DISPERSION_V_X) = 0.0;
708  }
709  if (rNode.IsFixed(VELOCITY_Y)) {
710  rNode.FastGetSolutionStepValue(DISPERSION_H_Y) = 0.0;
711  rNode.FastGetSolutionStepValue(DISPERSION_V_Y) = 0.0;
712  }
713  });
714  }
715 
719 
723 
725 
726 }; // Class ResidualBasedAdamsMoultonScheme
727 
731 
733 
734 } // namespace Kratos.
735 
736 #endif // KRATOS_RESIDUAL_BASED_ADAMS_MOULTON_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
Base class for all Elements.
Definition: element.h:60
virtual void GetValuesVector(Vector &values, int Step=0) const
Definition: element.h:300
std::vector< std::size_t > EquationIdVectorType
Definition: element.h:98
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
NodesContainerType & Nodes(IndexType ThisIndex=0)
Definition: model_part.h:507
This class defines the node.
Definition: node.h:65
TVariableType::Type & FastGetSolutionStepValue(const TVariableType &rThisVariable)
Definition: node.h:435
bool IsFixed(const VariableData &rDofVariable) const
Definition: node.h:897
static int ThisThread()
Wrapper for omp_get_thread_num().
Definition: openmp_utils.h:108
static int GetNumThreads()
Returns the current number of threads.
Definition: parallel_utilities.cpp:34
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
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
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
ProcessInfo & GetPreviousTimeStepInfo(IndexType StepsBefore=1)
Definition: process_info.h:187
Predictor-corrector semi imlicit scheme for the Boussinesq element.
Definition: residual_based_adams_moulton_scheme.h:43
ResidualBasedAdamsMoultonScheme(ResidualBasedAdamsMoultonScheme &rOther)
Copy Constructor.
Definition: residual_based_adams_moulton_scheme.h:103
std::vector< Vector > mU1
Values vector at the current time step.
Definition: residual_based_adams_moulton_scheme.h:422
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_adams_moulton_scheme.h:310
Parameters GetDefaultParameters() const override
This method provides the defaults parameters to avoid conflicts between the different constructors.
Definition: residual_based_adams_moulton_scheme.h:376
void PredictDerivatives(ModelPart &rModelPart, DofsArrayType &rDofSet, TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb)
Performing the prediction of the derivatives.
Definition: residual_based_adams_moulton_scheme.h:441
void Predict(ModelPart &rModelPart, DofsArrayType &rDofSet, TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb) override
Perform the prediction using the explicit Adams-Bashforth scheme.
Definition: residual_based_adams_moulton_scheme.h:152
KRATOS_CLASS_POINTER_DEFINITION(ResidualBasedAdamsMoultonScheme)
std::vector< Vector > mDU
Values vector at the previous time step.
Definition: residual_based_adams_moulton_scheme.h:423
~ResidualBasedAdamsMoultonScheme() override
Destructor.
Definition: residual_based_adams_moulton_scheme.h:123
std::vector< Matrix > mM
Definition: residual_based_adams_moulton_scheme.h:420
void AddDynamicsToRHS(Element &rCurrentElement, LocalSystemVectorType &rRHSContribution, LocalSystemMatrixType &rM, const ProcessInfo &rCurrentProcessInfo)
It adds the dynamic RHS contribution of the elements b - M*a - D*v.
Definition: residual_based_adams_moulton_scheme.h:565
void AddDynamicsToLHS(LocalSystemMatrixType &rLHSContribution, LocalSystemMatrixType &rM, const ProcessInfo &rCurrentProcessInfo)
It adds the dynamic LHS contribution of the elements LHS = 24/dt*M.
Definition: residual_based_adams_moulton_scheme.h:543
BaseType::LocalSystemVectorType LocalSystemVectorType
Definition: residual_based_adams_moulton_scheme.h:56
std::string Info() const override
Turn back information as a string.
Definition: residual_based_adams_moulton_scheme.h:400
void CalculateRHSContribution(Condition &rCurrentCondition, LocalSystemVectorType &rRHSContribution, Element::EquationIdVectorType &rEquationId, const ProcessInfo &rCurrentProcessInfo) override
Functions that calculates the RHS of a "condition" object.
Definition: residual_based_adams_moulton_scheme.h:346
void Clear() override
Free memory allocated by this class.
Definition: residual_based_adams_moulton_scheme.h:363
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_adams_moulton_scheme.h:292
void AddDynamicsToRHS(Condition &rCurrentCondition, LocalSystemVectorType &rRHSContribution, LocalSystemMatrixType &rM, const ProcessInfo &rCurrentProcessInfo)
It adds the dynamic RHS contribution of the condition RHS = fext - M*an0 - D*vn0 - K*dn0.
Definition: residual_based_adams_moulton_scheme.h:592
BaseType::DofsArrayType DofsArrayType
Definition: residual_based_adams_moulton_scheme.h:50
void UpdateDerivative(NodeType &rNode, const Variable< TDataType > &rPrimitiveVariable, const Variable< TDataType > &rDerivativeVariable, const double DtInverse)
Performing the prediction of the derivative.
Definition: residual_based_adams_moulton_scheme.h:514
void Update(ModelPart &rModelPart, DofsArrayType &rDofSet, TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb) override
Performing the update of the solution.
Definition: residual_based_adams_moulton_scheme.h:266
void InitializeSolutionStep(ModelPart &rModelPart, TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb) override
It initializes time step solution. Only for reasons if the time step solution is restarted.
Definition: residual_based_adams_moulton_scheme.h:209
BaseType::Pointer Clone() override
Clone.
Definition: residual_based_adams_moulton_scheme.h:115
std::vector< Vector > mU0
First derivative matrix (usually mass matrix)
Definition: residual_based_adams_moulton_scheme.h:421
void PredictDerivative(NodeType &rNode, const Variable< TDataType > &rPrimitiveVariable, const Variable< TDataType > &rDerivativeVariable, const double DtInverse)
Performing the prediction of the derivative.
Definition: residual_based_adams_moulton_scheme.h:464
ModelPart::NodeType NodeType
Definition: residual_based_adams_moulton_scheme.h:60
ResidualBasedAdamsMoultonScheme(Parameters ThisParameters)
Constructor.
Definition: residual_based_adams_moulton_scheme.h:89
Scheme< TSparseSpace, TDenseSpace > BaseType
Definition: residual_based_adams_moulton_scheme.h:48
void InitializeNonLinIteration(ModelPart &rModelPart, TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb) override
Calculate the global projection of the auxiliary fields.
Definition: residual_based_adams_moulton_scheme.h:232
BaseType::TSystemMatrixType TSystemMatrixType
Definition: residual_based_adams_moulton_scheme.h:52
ResidualBasedAdamsMoultonScheme()
Constructor.
Definition: residual_based_adams_moulton_scheme.h:75
BaseType::LocalSystemMatrixType LocalSystemMatrixType
Definition: residual_based_adams_moulton_scheme.h:58
void UpdateDerivatives(ModelPart &rModelPart, DofsArrayType &rDofSet, TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb)
Performing the update of the derivatives.
Definition: residual_based_adams_moulton_scheme.h:491
void CalculateSystemContributions(Condition &rCurrentCondition, LocalSystemMatrixType &rLHSContribution, LocalSystemVectorType &rRHSContribution, Element::EquationIdVectorType &rEquationId, const ProcessInfo &rCurrentProcessInfo) override
Functions totally analogous to the precedent but applied to the "condition" objects.
Definition: residual_based_adams_moulton_scheme.h:328
void Initialize(ModelPart &rModelPart) override
Initialize the nodal area and the derivatives recovery.
Definition: residual_based_adams_moulton_scheme.h:138
BaseType::TSystemVectorType TSystemVectorType
Definition: residual_based_adams_moulton_scheme.h:54
This class provides the implementation of the basic tasks that are needed by the solution strategy.
Definition: scheme.h:56
typename TSparseSpace::MatrixType TSystemMatrixType
Matrix type definition.
Definition: scheme.h:71
typename TSparseSpace::VectorType TSystemVectorType
Vector type definition.
Definition: scheme.h:74
typename TDenseSpace::VectorType LocalSystemVectorType
Local system vector type definition.
Definition: scheme.h:80
virtual void Initialize(ModelPart &rModelPart)
This is the place to initialize the Scheme.
Definition: scheme.h:168
typename TSparseSpace::DataType TDataType
Data type definition.
Definition: scheme.h:68
typename TDenseSpace::MatrixType LocalSystemMatrixType
Local system matrix type definition.
Definition: scheme.h:77
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
#define KRATOS_ERROR_IF(conditional)
Definition: exception.h:162
void InitializeSolutionStep(ConstructionUtility &rThisUtil, std::string ThermalSubModelPartName, std::string MechanicalSubModelPartName, std::string HeatFluxSubModelPartName, std::string HydraulicPressureSubModelPartName, bool thermal_conditions, bool mechanical_conditions, int phase)
Definition: add_custom_utilities_to_python.cpp:45
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
def num_threads
Definition: script.py:75
subroutine d1(DSTRAN, D, dtime, NDI, NSHR, NTENS)
Definition: TensorModule.f:594
subroutine f1(T, Fm)
Definition: TensorModule.f:305
e
Definition: run_cpp_mpi_tests.py:31