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.
bdf_method.hpp
Go to the documentation of this file.
1 //
2 // Project Name: KratosSolidMechanicsApplication $
3 // Created by: $Author: JMCarbonell $
4 // Last modified by: $Co-Author: $
5 // Date: $Date: April 2018 $
6 // Revision: $Revision: 0.0 $
7 //
8 //
9 
10 #if !defined(KRATOS_BDF_METHOD_H_INCLUDED)
11 #define KRATOS_BDF_METHOD_H_INCLUDED
12 
13 // System includes
14 
15 // External includes
16 
17 // Project includes
19 
20 namespace Kratos
21 {
24 
27 
31 
35 
39 
43 
44 
46 
49  template<class TVariableType, class TValueType>
50  class BdfMethod : public TimeIntegrationMethod<TVariableType,TValueType>
51  {
52  public:
53 
56 
59 
61  typedef typename BaseType::Pointer BasePointerType;
62 
64  typedef typename BaseType::NodeType NodeType;
65 
68 
70 
74 
75 
78 
80  BdfMethod(const TVariableType& rVariable) : BaseType(rVariable) {}
81 
83  BdfMethod(const TVariableType& rVariable, const TVariableType& rFirstDerivative, const TVariableType& rSecondDerivative) : BaseType(rVariable,rFirstDerivative,rSecondDerivative) {}
84 
86  BdfMethod(const TVariableType& rVariable, const TVariableType& rFirstDerivative, const TVariableType& rSecondDerivative, const TVariableType& rPrimaryVariable) : BaseType(rVariable,rFirstDerivative,rSecondDerivative,rPrimaryVariable) {}
87 
90  :BaseType(rOther)
91  ,mOrder(rOther.mOrder)
92  ,mDeltaTime(rOther.mDeltaTime)
93  ,mBDF(rOther.mBDF)
94  {
95  }
96 
99  {
100  return BasePointerType( new BdfMethod(*this) );
101  }
102 
104  ~BdfMethod() override{}
105 
109 
113 
114  //calculate parameters (to call it once with the original input parameters)
115  void CalculateParameters(ProcessInfo& rCurrentProcessInfo) override
116  {
117  KRATOS_TRY
118 
119  const double& delta_time = rCurrentProcessInfo[DELTA_TIME];
120 
121  if (delta_time < 1.0e-24)
122  {
123  KRATOS_ERROR << " ERROR: detected delta_time = 0 in the Solution Method DELTA_TIME. PLEASE : check if the time step is created correctly for the current model part " << std::endl;
124  }
125 
126  unsigned int order = 1;
127  if (rCurrentProcessInfo.Has(TIME_INTEGRATION_ORDER))
128  {
129  order = rCurrentProcessInfo[TIME_INTEGRATION_ORDER];
130  }
131 
132  if (rCurrentProcessInfo.Has(BDF_COEFFICIENTS))
133  {
134  mBDF = rCurrentProcessInfo[BDF_COEFFICIENTS];
135  if( mBDF.size() > 1 && (order + 1) != mBDF.size() )
136  order = mBDF.size()-1;
137  }
138 
139  if (mBDF.size() == 0 ){
140 
141  //if (mBDF.size() != (order + 1))
142  mBDF.resize(order + 1,false);
143 
144  // Compute the BDF coefficients from order
145  switch(order) {
146  case 1 :
147  mBDF[0] = 1.0/delta_time; //coefficient for step n+1 (1/Dt if Dt is constant)
148  mBDF[1] = -1.0/delta_time; //coefficient for step n (-1/Dt if Dt is constant)
149  break;
150  case 2 :
151  mBDF[0] = 3.0/( 2.0 * delta_time ); //coefficient for step n+1 (3/2Dt if Dt is constant)
152  mBDF[1] = -2.0/( delta_time ); //coefficient for step n (-4/2Dt if Dt is constant)
153  mBDF[2] = 1.0/( 2.0 * delta_time ); //coefficient for step n-1 (1/2Dt if Dt is constant)
154  break;
155  case 3 :
156  mBDF[0] = 11.0/(6.0 * delta_time); //coefficient for step n+1 (11/6Dt if Dt is constant)
157  mBDF[1] = -18.0/(6.0 * delta_time); //coefficient for step n (-18/6Dt if Dt is constant)
158  mBDF[2] = 9.0/(6.0 * delta_time); //coefficient for step n-1 (9/6Dt if Dt is constant)
159  mBDF[3] = -2.0/(6.0 * delta_time); //coefficient for step n-2 (2/6Dt if Dt is constant)
160  break;
161  case 4 :
162  mBDF[0] = 25.0/(12.0 * delta_time); //coefficient for step n+1 (25/12Dt if Dt is constant)
163  mBDF[1] = -48.0/(12.0 * delta_time); //coefficient for step n (-48/12Dt if Dt is constant)
164  mBDF[2] = 36.0/(12.0 * delta_time); //coefficient for step n-1 (36/12Dt if Dt is constant)
165  mBDF[3] = -16.0/(12.0 * delta_time); //coefficient for step n-2 (16/12Dt if Dt is constant)
166  mBDF[4] = 3.0/(12.0 * delta_time); //coefficient for step n-3 (3/12Dt if Dt is constant)
167  break;
168  case 5 :
169  mBDF[0] = 137.0/(60.0 * delta_time); //coefficient for step n+1 (137/60Dt if Dt is constant)
170  mBDF[1] = -300.0/(60.0 * delta_time); //coefficient for step n (-300/60Dt if Dt is constant)
171  mBDF[2] = 300.0/(60.0 * delta_time); //coefficient for step n-1 (300/60Dt if Dt is constant)
172  mBDF[3] = -200.0/(60.0 * delta_time); //coefficient for step n-2 (-200/60Dt if Dt is constant)
173  mBDF[4] = 75.0/(60.0 * delta_time); //coefficient for step n-3 (75/60Dt if Dt is constant)
174  mBDF[5] = -12.0/(60.0 * delta_time); //coefficient for step n-4 (-12/60Dt if Dt is constant)
175  break;
176  case 6 :
177  mBDF[0] = 147.0/(60.0 * delta_time); //coefficient for step n+1 (147/60Dt if Dt is constant)
178  mBDF[1] = -360.0/(60.0 * delta_time); //coefficient for step n (-360/60Dt if Dt is constant)
179  mBDF[2] = 450.0/(60.0 * delta_time); //coefficient for step n-1 (450/60Dt if Dt is constant)
180  mBDF[3] = -400.0/(60.0 * delta_time); //coefficient for step n-2 (-400/60Dt if Dt is constant)
181  mBDF[4] = 225.0/(60.0 * delta_time); //coefficient for step n-3 (225/60Dt if Dt is constant)
182  mBDF[5] = -72.0/(60.0 * delta_time); //coefficient for step n-4 (-72/60Dt if Dt is constant)
183  mBDF[6] = 10.0/(60.0 * delta_time); //coefficient for step n-5 (10/60Dt if Dt is constant)
184  break;
185  default :
186  KRATOS_ERROR << "Methods with order > 6 are not zero-stable so they cannot be used" << std::endl;
187  }
188 
189  }
190 
191  rCurrentProcessInfo[TIME_INTEGRATION_ORDER] = order;
192  rCurrentProcessInfo[BDF_COEFFICIENTS] = mBDF;
193 
194  this->SetParameters(rCurrentProcessInfo);
195 
196  KRATOS_CATCH( "" )
197  }
198 
199  // set parameters (do not calculate parameters here, only read them)
200  void SetParameters(const ProcessInfo& rCurrentProcessInfo) override
201  {
202  KRATOS_TRY
203 
204  const double& delta_time = rCurrentProcessInfo[DELTA_TIME];
205 
206  mOrder = 1;
207  if (rCurrentProcessInfo.Has(TIME_INTEGRATION_ORDER))
208  {
209  mOrder = rCurrentProcessInfo[TIME_INTEGRATION_ORDER];
210  }
211 
212  if (rCurrentProcessInfo.Has(BDF_COEFFICIENTS))
213  {
214  mBDF = rCurrentProcessInfo[BDF_COEFFICIENTS];
215  if( mBDF.size() > 1 && (mOrder + 1) != mBDF.size() )
216  mOrder = mBDF.size()-1;
217  }
218 
220 
221  KRATOS_CATCH( "" )
222  }
223 
224  // set parameters to process info
225  void SetProcessInfoParameters(ProcessInfo& rCurrentProcessInfo) override
226  {
227  KRATOS_TRY
228 
229  rCurrentProcessInfo[BDF_COEFFICIENTS] = mBDF;
230 
231  KRATOS_CATCH( "" )
232  }
233 
234 
235 
240  int Check( const ProcessInfo& rCurrentProcessInfo ) override
241  {
242  KRATOS_TRY
243 
244 
245  // Perform base integration method checks
246  int ErrorCode = 0;
247  ErrorCode = BaseType::Check(rCurrentProcessInfo);
248 
249  // Check that all required variables have been registered
250  if( this->mpFirstDerivative == nullptr ){
251  KRATOS_ERROR << " time integration method FirstDerivative not set " <<std::endl;
252  }
253 
254  if( this->mpSecondDerivative == nullptr ){
255  KRATOS_ERROR << " time integration method SecondDerivative not set " <<std::endl;
256  }
257 
258  return ErrorCode;
259 
260  KRATOS_CATCH("")
261  }
262 
263 
267 
271 
275 
276 
278  std::string Info() const override
279  {
280  std::stringstream buffer;
281  buffer << "BdfMethod";
282  return buffer.str();
283  }
284 
286  void PrintInfo(std::ostream& rOStream) const override
287  {
288  rOStream << "BdfMethod";
289  }
290 
292  void PrintData(std::ostream& rOStream) const override
293  {
294  rOStream << "BdfMethod Data";
295  }
296 
297 
301 
302 
304 
305  protected:
306 
309 
313 
314  unsigned int mOrder;
315  double mDeltaTime;
317 
321 
322  void AssignFromVariable(NodeType& rNode) override
323  {
324  KRATOS_TRY
325 
326  // predict variable from variable
327  TValueType& CurrentFirstDerivative = rNode.FastGetSolutionStepValue(*this->mpFirstDerivative, 0);
328  TValueType& CurrentSecondDerivative = rNode.FastGetSolutionStepValue(*this->mpSecondDerivative, 0);
329 
330  // TValueType& CurrentVariable = rNode.FastGetSolutionStepValue(*this->mpVariable, 0);
331  // const TValueType& PreviousVariable = rNode.FastGetSolutionStepValue(*this->mpVariable, 1);
332  // const TValueType& PreviousFirstDerivative = rNode.FastGetSolutionStepValue(*this->mpFirstDerivative, 1);
333  // const TValueType& PreviousSecondDerivative = rNode.FastGetSolutionStepValue(*this->mpSecondDerivative, 1);
334  // CurrentVariable = PreviousVariable + mDeltaTime * PreviousFirstDerivetive + 0.5 * mDeltaTime * mDeltaTime * PreviousSecondDerivative;
335 
336  CurrentFirstDerivative -= CurrentFirstDerivative;
337  CurrentSecondDerivative -= CurrentSecondDerivative;
338 
339 
340  KRATOS_CATCH( "" )
341  }
342 
343  void AssignFromFirstDerivative(NodeType& rNode) override
344  {
345  KRATOS_TRY
346 
347  // predict variable from first derivative
348  TValueType& CurrentVariable = rNode.FastGetSolutionStepValue(*this->mpVariable, 0);
349  const TValueType& PreviousVariable = rNode.FastGetSolutionStepValue(*this->mpVariable, 1);
350 
351  TValueType& CurrentFirstDerivative = rNode.FastGetSolutionStepValue(*this->mpFirstDerivative, 0);
352  const TValueType& PreviousFirstDerivative = rNode.FastGetSolutionStepValue(*this->mpFirstDerivative, 1);
353 
354  CurrentVariable = (CurrentFirstDerivative - mBDF[1] * PreviousVariable)/mBDF[0];
355 
356  TValueType& CurrentSecondDerivative = rNode.FastGetSolutionStepValue(*this->mpSecondDerivative, 0);
357 
358  CurrentFirstDerivative = PreviousFirstDerivative;
359  CurrentSecondDerivative -= CurrentSecondDerivative;
360 
361  KRATOS_CATCH( "" )
362  }
363 
364  void AssignFromSecondDerivative(NodeType& rNode) override
365  {
366  KRATOS_TRY
367 
368  // predict variable from second derivative
369  TValueType& CurrentVariable = rNode.FastGetSolutionStepValue(*this->mpVariable, 0);
370  const TValueType& PreviousVariable = rNode.FastGetSolutionStepValue(*this->mpVariable, 1);
371 
372  const TValueType& CurrentSecondDerivative = rNode.FastGetSolutionStepValue(*this->mpSecondDerivative, 0);
373 
374  TValueType& CurrentFirstDerivative = rNode.FastGetSolutionStepValue(*this->mpFirstDerivative, 1);
375  const TValueType& PreviousFirstDerivative = rNode.FastGetSolutionStepValue(*this->mpFirstDerivative, 1);
376 
377  CurrentFirstDerivative = (CurrentSecondDerivative - mBDF[1] * PreviousFirstDerivative)/mBDF[0];
378  CurrentVariable = (CurrentFirstDerivative - mBDF[1] * PreviousVariable)/mBDF[0];
379 
380  KRATOS_CATCH( "" )
381  }
382 
383  void PredictFromVariable(NodeType& rNode) override
384  {
385  KRATOS_TRY
386 
387  //if(this->Is(TimeIntegrationLocalFlags::NOT_PREDICT_PRIMARY_VARIABLE))
388  this->PredictVariable(rNode);
389  this->PredictFirstDerivative(rNode);
390  this->PredictSecondDerivative(rNode);
391 
392  KRATOS_CATCH( "" )
393  }
394 
395  void PredictFromFirstDerivative(NodeType& rNode) override
396  {
397  KRATOS_TRY
398 
399  this->PredictVariable(rNode);
400  //if(this->Is(TimeIntegrationLocalFlags::NOT_PREDICT_PRIMARY_VARIABLE))
401  //this->PredictFirstDerivative(rNode);
402  this->PredictSecondDerivative(rNode);
403 
404  KRATOS_CATCH( "" )
405  }
406 
407 
408  void PredictVariable(NodeType& rNode) override
409  {
410  KRATOS_TRY
411 
412  TValueType& CurrentVariable = rNode.FastGetSolutionStepValue(*this->mpVariable, 0);
413  const TValueType& PreviousVariable = rNode.FastGetSolutionStepValue(*this->mpVariable, 1);
414  const TValueType& PreviousFirstDerivative = rNode.FastGetSolutionStepValue(*this->mpFirstDerivative, 1);
415  const TValueType& PreviousSecondDerivative = rNode.FastGetSolutionStepValue(*this->mpSecondDerivative, 1);
416 
417  CurrentVariable = PreviousVariable + mDeltaTime * PreviousFirstDerivative + 0.5 * mDeltaTime * mDeltaTime * PreviousSecondDerivative;
418 
419  KRATOS_CATCH( "" )
420  }
421 
422  void PredictFirstDerivative(NodeType& rNode) override
423  {
424  KRATOS_TRY
425 
426  TValueType& CurrentVariable = rNode.FastGetSolutionStepValue(*this->mpVariable, 0);
427  const TValueType& PreviousVariable = rNode.FastGetSolutionStepValue(*this->mpVariable, 1);
428  TValueType& CurrentFirstDerivative = rNode.FastGetSolutionStepValue(*this->mpFirstDerivative, 0);
429 
430  CurrentFirstDerivative = mBDF[0] * CurrentVariable + mBDF[1] * PreviousVariable;
431 
432  KRATOS_CATCH( "" )
433  }
434 
435  void PredictSecondDerivative(NodeType& rNode) override
436  {
437  KRATOS_TRY
438 
439  TValueType& CurrentSecondDerivative = rNode.FastGetSolutionStepValue(*this->mpSecondDerivative, 0);
440 
441  const TValueType& CurrentFirstDerivative = rNode.FastGetSolutionStepValue(*this->mpFirstDerivative, 1);
442  const TValueType& PreviousFirstDerivative = rNode.FastGetSolutionStepValue(*this->mpFirstDerivative, 1);
443 
444  CurrentSecondDerivative = mBDF[0] * CurrentFirstDerivative + mBDF[1] * PreviousFirstDerivative;
445 
446  KRATOS_CATCH( "" )
447  }
448 
449 
450  void UpdateFromVariable(NodeType& rNode) override
451  {
452  KRATOS_TRY
453 
454  TValueType& CurrentFirstDerivative = rNode.FastGetSolutionStepValue(*this->mpFirstDerivative, 0);
455  CurrentFirstDerivative = mBDF[0] * rNode.FastGetSolutionStepValue(*this->mpVariable, 0);
456  for(unsigned int i= 1; i<=mOrder; ++i)
457  CurrentFirstDerivative += mBDF[i] * rNode.FastGetSolutionStepValue(*this->mpVariable, i);
458 
459  TValueType& CurrentSecondDerivative = rNode.FastGetSolutionStepValue(*this->mpSecondDerivative, 0);
460  CurrentSecondDerivative = mBDF[0] * rNode.FastGetSolutionStepValue(*this->mpFirstDerivative, 0);
461  for(unsigned int i= 1; i<=mOrder; ++i)
462  CurrentSecondDerivative += mBDF[i] * rNode.FastGetSolutionStepValue(*this->mpFirstDerivative, i);
463 
464  KRATOS_CATCH( "" )
465  }
466 
467 
468  void UpdateFromFirstDerivative(NodeType& rNode) override
469  {
470  KRATOS_TRY
471 
472  TValueType& CurrentVariable = rNode.FastGetSolutionStepValue(*this->mpVariable, 0);
473  CurrentVariable = rNode.FastGetSolutionStepValue(*this->mpFirstDerivative, 0);
474  for(unsigned int i= 1; i<=mOrder; ++i)
475  CurrentVariable -= mBDF[i] * rNode.FastGetSolutionStepValue(*this->mpVariable, i);
476  CurrentVariable /= mBDF[0];
477 
478  TValueType& CurrentSecondDerivative = rNode.FastGetSolutionStepValue(*this->mpSecondDerivative, 0);
479  CurrentSecondDerivative = mBDF[0] * rNode.FastGetSolutionStepValue(*this->mpFirstDerivative, 0);
480  for(unsigned int i= 1; i<=mOrder; ++i)
481  CurrentSecondDerivative += mBDF[i] * rNode.FastGetSolutionStepValue(*this->mpFirstDerivative, i);
482 
483 
484  KRATOS_CATCH( "" )
485  }
486 
487  void UpdateFromSecondDerivative(NodeType& rNode) override
488  {
489  KRATOS_TRY
490 
491  TValueType& CurrentFirstDerivative = rNode.FastGetSolutionStepValue(*this->mpFirstDerivative, 0);
492  CurrentFirstDerivative = rNode.FastGetSolutionStepValue(*this->mpSecondDerivative, 0);
493  for(unsigned int i= 1; i<=mOrder; ++i)
494  CurrentFirstDerivative -= mBDF[i] * rNode.FastGetSolutionStepValue(*this->mpFirstDerivative, i);
495  CurrentFirstDerivative /= mBDF[0];
496 
497  TValueType& CurrentVariable = rNode.FastGetSolutionStepValue(*this->mpVariable, 0);
498  CurrentVariable = rNode.FastGetSolutionStepValue(*this->mpFirstDerivative, 0);
499  for(unsigned int i= 1; i<=mOrder; ++i)
500  CurrentVariable -= mBDF[i] * rNode.FastGetSolutionStepValue(*this->mpVariable, i);
501  CurrentVariable /= mBDF[0];
502 
503  KRATOS_CATCH( "" )
504  }
505 
506  void UpdateVariable(NodeType& rNode) override
507  {
508  KRATOS_TRY
509 
510  KRATOS_CATCH( "" )
511  }
512 
513 
514  void UpdateFirstDerivative(NodeType& rNode) override
515  {
516  KRATOS_TRY
517 
518  TValueType& CurrentFirstDerivative = rNode.FastGetSolutionStepValue(*this->mpFirstDerivative, 0);
519  CurrentFirstDerivative = mBDF[0] * rNode.FastGetSolutionStepValue(*this->mpVariable, 0);
520  for(unsigned int i= 1; i<=mOrder; ++i)
521  CurrentFirstDerivative += mBDF[i] * rNode.FastGetSolutionStepValue(*this->mpVariable, i);
522 
523  KRATOS_CATCH( "" )
524  }
525 
526  void UpdateSecondDerivative(NodeType& rNode) override
527  {
528  KRATOS_TRY
529 
530  TValueType& CurrentSecondDerivative = rNode.FastGetSolutionStepValue(*this->mpSecondDerivative, 0);
531  CurrentSecondDerivative = mBDF[0] * rNode.FastGetSolutionStepValue(*this->mpFirstDerivative, 0);
532  for(unsigned int i= 1; i<=mOrder; ++i)
533  CurrentSecondDerivative += mBDF[i] * rNode.FastGetSolutionStepValue(*this->mpFirstDerivative, i);
534 
535  KRATOS_CATCH( "" )
536  }
537 
541 
545 
546  // get parameters
547  double& GetFirstDerivativeInertialParameter(double& rParameter) override
548  {
549  rParameter = mBDF[0];
550  return rParameter;
551  }
552 
553  double& GetSecondDerivativeInertialParameter(double& rParameter) override
554  {
555  rParameter = mBDF[0]*mBDF[0];
556  return rParameter;
557  }
558 
562 
566 
568 
569  private:
570 
573 
577 
581 
585 
589 
593  friend class Serializer;
594 
595  void save(Serializer& rSerializer) const override
596  {
598  rSerializer.save("Order", mOrder);
599  rSerializer.save("DeltaTime", mDeltaTime);
600  rSerializer.save("BDF", mBDF);
601  };
602 
603  void load(Serializer& rSerializer) override
604  {
606  rSerializer.load("Order", mOrder);
607  rSerializer.load("DeltaTime", mDeltaTime);
608  rSerializer.load("BDF", mBDF);
609  };
610 
614 
618 
620 
621  }; // Class BdfMethod
622 
624 
627 
628 
632 
633  template<class TVariableType, class TValueType>
634  inline std::istream & operator >> (std::istream & rIStream, BdfMethod<TVariableType,TValueType>& rThis)
635  {
636  return rIStream;
637  }
638 
639  template<class TVariableType, class TValueType>
640  inline std::ostream & operator << (std::ostream & rOStream, const BdfMethod<TVariableType,TValueType>& rThis)
641  {
642  return rOStream << rThis.Info();
643  }
644 
646 
648 
649 } // namespace Kratos.
650 
651 #endif // KRATOS_BDF_METHOD_H_INCLUDED defined
Short class definition.
Definition: bdf_method.hpp:51
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: bdf_method.hpp:286
BdfMethod(BdfMethod &rOther)
Copy Constructor.
Definition: bdf_method.hpp:89
void UpdateFromFirstDerivative(NodeType &rNode) override
Definition: bdf_method.hpp:468
void SetParameters(const ProcessInfo &rCurrentProcessInfo) override
Definition: bdf_method.hpp:200
void UpdateVariable(NodeType &rNode) override
Definition: bdf_method.hpp:506
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: bdf_method.hpp:292
std::string Info() const override
Turn back information as a string.
Definition: bdf_method.hpp:278
~BdfMethod() override
Destructor.
Definition: bdf_method.hpp:104
BaseType::NodeType NodeType
NodeType.
Definition: bdf_method.hpp:64
BaseType::VariablePointer VariablePointer
KratosVariable or KratosVariableComponent.
Definition: bdf_method.hpp:67
void PredictFromFirstDerivative(NodeType &rNode) override
Definition: bdf_method.hpp:395
void UpdateFromVariable(NodeType &rNode) override
Definition: bdf_method.hpp:450
void AssignFromSecondDerivative(NodeType &rNode) override
Definition: bdf_method.hpp:364
void PredictSecondDerivative(NodeType &rNode) override
Definition: bdf_method.hpp:435
void UpdateFromSecondDerivative(NodeType &rNode) override
Definition: bdf_method.hpp:487
double & GetFirstDerivativeInertialParameter(double &rParameter) override
Definition: bdf_method.hpp:547
double mDeltaTime
Definition: bdf_method.hpp:315
BdfMethod()
Default Constructor.
Definition: bdf_method.hpp:77
void PredictFromVariable(NodeType &rNode) override
Definition: bdf_method.hpp:383
double & GetSecondDerivativeInertialParameter(double &rParameter) override
Definition: bdf_method.hpp:553
void UpdateFirstDerivative(NodeType &rNode) override
Definition: bdf_method.hpp:514
unsigned int mOrder
Definition: bdf_method.hpp:314
void CalculateParameters(ProcessInfo &rCurrentProcessInfo) override
Definition: bdf_method.hpp:115
int Check(const ProcessInfo &rCurrentProcessInfo) override
This function is designed to be called once to perform all the checks needed.
Definition: bdf_method.hpp:240
BaseType::Pointer BasePointerType
BasePointerType.
Definition: bdf_method.hpp:61
void PredictFirstDerivative(NodeType &rNode) override
Definition: bdf_method.hpp:422
void AssignFromFirstDerivative(NodeType &rNode) override
Definition: bdf_method.hpp:343
void SetProcessInfoParameters(ProcessInfo &rCurrentProcessInfo) override
Definition: bdf_method.hpp:225
Vector mBDF
Definition: bdf_method.hpp:316
void PredictVariable(NodeType &rNode) override
Definition: bdf_method.hpp:408
TimeIntegrationMethod< TVariableType, TValueType > BaseType
BaseType.
Definition: bdf_method.hpp:58
KRATOS_CLASS_POINTER_DEFINITION(BdfMethod)
BdfMethod(const TVariableType &rVariable, const TVariableType &rFirstDerivative, const TVariableType &rSecondDerivative, const TVariableType &rPrimaryVariable)
Constructor.
Definition: bdf_method.hpp:86
BdfMethod(const TVariableType &rVariable, const TVariableType &rFirstDerivative, const TVariableType &rSecondDerivative)
Constructor.
Definition: bdf_method.hpp:83
BdfMethod(const TVariableType &rVariable)
Constructor.
Definition: bdf_method.hpp:80
void UpdateSecondDerivative(NodeType &rNode) override
Definition: bdf_method.hpp:526
void AssignFromVariable(NodeType &rNode) override
Definition: bdf_method.hpp:322
BasePointerType Clone() override
Clone.
Definition: bdf_method.hpp:98
bool Has(const Variable< TDataType > &rThisVariable) const
Checks if the data container has a value associated with a given variable.
Definition: data_value_container.h:382
void resize(std::size_t NewSize1, std::size_t NewSize2, bool preserve=0)
Definition: amatrix_interface.h:224
This class defines the node.
Definition: node.h:65
TVariableType::Type & FastGetSolutionStepValue(const TVariableType &rThisVariable)
Definition: node.h:435
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
void load(std::string const &rTag, TDataType &rObject)
Definition: serializer.h:207
void save(std::string const &rTag, std::array< TDataType, TDataSize > const &rObject)
Definition: serializer.h:545
Short class definition.
Definition: time_integration_method.hpp:55
VariablePointer mpVariable
Definition: time_integration_method.hpp:405
virtual int Check(const ProcessInfo &rCurrentProcessInfo)
This function is designed to be called once to perform all the checks needed.
Definition: time_integration_method.hpp:272
const TVariableType * VariablePointer
KratosVariable or KratosVariableComponent.
Definition: time_integration_method.hpp:65
VariablePointer mpFirstDerivative
Definition: time_integration_method.hpp:407
VariablePointer mpSecondDerivative
Definition: time_integration_method.hpp:409
#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
#define KRATOS_ERROR
Definition: exception.h:161
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
delta_time
Definition: generate_frictional_mortar_condition.py:130
default
Definition: generate_gid_list_file.py:35
def load(f)
Definition: ode_solve.py:307
integer i
Definition: TensorModule.f:17