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.
newmark_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: November 2017 $
6 // Revision: $Revision: 0.0 $
7 //
8 //
9 
10 #if !defined(KRATOS_NEWMARK_METHOD_H_INCLUDED)
11 #define KRATOS_NEWMARK_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 KRATOS_API(SOLID_MECHANICS_APPLICATION) NewmarkMethod : public TimeIntegrationMethod<TVariableType,TValueType>
51  {
52  protected:
53 
55  {
56  double beta;
57  double gamma;
58 
59  double delta_time;
60 
61  //system constants
62  double c0;
63  double c1;
64  double c2;
65  double c3;
66  double c4;
67  double c5;
68 
69  void SetParameters(const double& rbeta,
70  const double& rgamma,
71  const double& rdelta_time)
72  {
73  beta = rbeta;
74  gamma = rgamma;
75 
76  delta_time = rdelta_time;
77 
78  c0 = ( 1.0 / (beta * delta_time * delta_time) );
79  c1 = ( gamma / (beta * delta_time) );
80  c2 = ( 1.0 / (beta * delta_time) );
81  c3 = ( 0.5 / (beta) - 1.0 );
82  c4 = ( (gamma / beta) - 1.0 );
83  c5 = ( delta_time * 0.5 * ( ( gamma / beta ) - 2.0 ) );
84  }
85 
86 
87  private:
88 
89  friend class Serializer;
90 
91  void save(Serializer& rSerializer) const
92  {
93  rSerializer.save("beta", beta);
94  rSerializer.save("gamma", gamma);
95  rSerializer.save("delta_time", delta_time);
96  rSerializer.save("c0", c0);
97  rSerializer.save("c1", c1);
98  rSerializer.save("c2", c2);
99  rSerializer.save("c3", c3);
100  rSerializer.save("c4", c4);
101  rSerializer.save("c5", c5);
102  };
103 
104  void load(Serializer& rSerializer)
105  {
106  rSerializer.load("beta", beta);
107  rSerializer.load("gamma", gamma);
108  rSerializer.load("delta_time", delta_time);
109  rSerializer.load("c0", c0);
110  rSerializer.load("c1", c1);
111  rSerializer.load("c2", c2);
112  rSerializer.load("c3", c3);
113  rSerializer.load("c4", c4);
114  rSerializer.load("c5", c5);
115  };
116 
117  };
118 
119  public:
120 
123 
126 
128  typedef typename BaseType::Pointer BasePointerType;
129 
131  typedef typename BaseType::NodeType NodeType;
132 
135 
137 
141 
142 
145 
147  NewmarkMethod(const TVariableType& rVariable) : BaseType(rVariable) {}
148 
150  NewmarkMethod(const TVariableType& rVariable, const TVariableType& rFirstDerivative, const TVariableType& rSecondDerivative) : BaseType(rVariable,rFirstDerivative,rSecondDerivative) {}
151 
153  NewmarkMethod(const TVariableType& rVariable, const TVariableType& rFirstDerivative, const TVariableType& rSecondDerivative, const TVariableType& rPrimaryVariable) : BaseType(rVariable,rFirstDerivative,rSecondDerivative,rPrimaryVariable) {}
154 
157  :BaseType(rOther)
158  ,mNewmark(rOther.mNewmark)
159  {
160  }
161 
164  {
165  return BasePointerType( new NewmarkMethod(*this) );
166  }
167 
169  ~NewmarkMethod() override{}
170 
174 
178 
179  //calculate parameters (to call it once with the original input parameters)
180  void CalculateParameters(ProcessInfo& rCurrentProcessInfo) override
181  {
182  KRATOS_TRY
183 
184  double beta = 0.25;
185  if (rCurrentProcessInfo.Has(NEWMARK_BETA))
186  {
187  beta = rCurrentProcessInfo[NEWMARK_BETA];
188  }
189 
190  double gamma = 0.5;
191  if (rCurrentProcessInfo.Has(NEWMARK_GAMMA))
192  {
193  gamma = rCurrentProcessInfo[NEWMARK_GAMMA];
194  }
195 
196  rCurrentProcessInfo[NEWMARK_BETA] = beta;
197  rCurrentProcessInfo[NEWMARK_GAMMA] = gamma;
198 
199  this->SetParameters(rCurrentProcessInfo);
200 
201  KRATOS_CATCH( "" )
202  }
203 
204  // set parameters (do not calculate parameters here, only read them)
205  void SetParameters(const ProcessInfo& rCurrentProcessInfo) override
206  {
207  KRATOS_TRY
208 
209  double delta_time = rCurrentProcessInfo[DELTA_TIME];
210 
211  if (delta_time < 1.0e-24)
212  {
213  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;
214  }
215 
216  double beta = 0.25;
217  if (rCurrentProcessInfo.Has(NEWMARK_BETA))
218  {
219  beta = rCurrentProcessInfo[NEWMARK_BETA];
220  }
221  double gamma = 0.5;
222  if (rCurrentProcessInfo.Has(NEWMARK_GAMMA))
223  {
224  gamma = rCurrentProcessInfo[NEWMARK_GAMMA];
225  }
226 
227  mNewmark.SetParameters(beta,gamma,delta_time);
228 
229  KRATOS_CATCH( "" )
230  }
231 
232  // set parameters to process info
233  void SetProcessInfoParameters(ProcessInfo& rCurrentProcessInfo) override
234  {
235  KRATOS_TRY
236 
237  rCurrentProcessInfo[NEWMARK_BETA] = mNewmark.beta;
238  rCurrentProcessInfo[NEWMARK_GAMMA] = mNewmark.gamma;
239 
240  KRATOS_CATCH( "" )
241  }
242 
243 
248  int Check( const ProcessInfo& rCurrentProcessInfo ) override
249  {
250  KRATOS_TRY
251 
252  // Perform base integration method checks
253  int ErrorCode = 0;
254  ErrorCode = BaseType::Check(rCurrentProcessInfo);
255 
256  // Check that all required variables have been registered
257  if( this->mpFirstDerivative == nullptr ){
258  KRATOS_ERROR << " time integration method FirstDerivative not set " <<std::endl;
259  }
260 
261  if( this->mpSecondDerivative == nullptr ){
262  KRATOS_ERROR << " time integration method SecondDerivative not set " <<std::endl;
263  }
264 
265  return ErrorCode;
266 
267  KRATOS_CATCH("")
268  }
269 
273 
277 
281 
282 
284  std::string Info() const override
285  {
286  std::stringstream buffer;
287  buffer << "NewmarkMethod";
288  return buffer.str();
289  }
290 
292  void PrintInfo(std::ostream& rOStream) const override
293  {
294  rOStream << "NewmarkMethod";
295  }
296 
298  void PrintData(std::ostream& rOStream) const override
299  {
300  rOStream << "NewmarkMethod Data";
301  }
302 
303 
307 
308 
310 
311  protected:
312 
315 
319 
321 
325 
326  void AssignFromVariable(NodeType& rNode) override
327  {
328  KRATOS_TRY
329 
330  // predict variable from variable
331  TValueType& CurrentFirstDerivative = rNode.FastGetSolutionStepValue(*this->mpFirstDerivative, 0);
332  TValueType& CurrentSecondDerivative = rNode.FastGetSolutionStepValue(*this->mpSecondDerivative, 0);
333 
334  CurrentFirstDerivative -= CurrentFirstDerivative;
335  CurrentSecondDerivative -= CurrentSecondDerivative;
336 
337 
338  KRATOS_CATCH( "" )
339  }
340 
341  void AssignFromFirstDerivative(NodeType& rNode) override
342  {
343  KRATOS_TRY
344 
345  // predict variable from first derivative
346  TValueType& CurrentVariable = rNode.FastGetSolutionStepValue(*this->mpVariable, 0);
347  TValueType& CurrentFirstDerivative = rNode.FastGetSolutionStepValue(*this->mpFirstDerivative, 0);
348 
349  const TValueType& PreviousVariable = rNode.FastGetSolutionStepValue(*this->mpVariable, 1);
350  const TValueType& PreviousFirstDerivative = rNode.FastGetSolutionStepValue(*this->mpFirstDerivative, 1);
351  const TValueType& PreviousSecondDerivative = rNode.FastGetSolutionStepValue(*this->mpSecondDerivative, 1);
352 
353  // newmark consistent
354  CurrentVariable = PreviousVariable + this->mNewmark.delta_time * ( ( 1.0 - (this->mNewmark.beta/this->mNewmark.gamma) ) * PreviousFirstDerivative + (this->mNewmark.beta/this->mNewmark.gamma) * CurrentFirstDerivative + this->mNewmark.delta_time * 0.5 * ( 1.0 - 2.0 * (this->mNewmark.beta/this->mNewmark.gamma) ) * PreviousSecondDerivative );
355  // uniform accelerated movement
356  //CurrentVariable = PreviousVariable + 0.5 * mNewmark.delta_time * (PreviousFirstDerivative + CurrentFirstDerivative) + 0.5 * mNewmark.delta_time * mNewmark.delta_time * PreviousSecondDerivative;
357 
358  TValueType& CurrentSecondDerivative = rNode.FastGetSolutionStepValue(*this->mpSecondDerivative, 0);
359 
360  // variable prediction :: uniform accelerated movement **
361  CurrentVariable -= this->mNewmark.delta_time * PreviousFirstDerivative;
362 
363  //CurrentFirstDerivative = PreviousFirstDerivative;
364  CurrentSecondDerivative -= CurrentSecondDerivative;
365 
366  //std::cout<<*this->mpVariable<<" Assign Node["<<rNode.Id()<<"]"<<CurrentVariable<<" "<<CurrentFirstDerivative<<" "<<CurrentSecondDerivative<<std::endl;
367 
368  KRATOS_CATCH( "" )
369  }
370 
371  void AssignFromSecondDerivative(NodeType& rNode) override
372  {
373  KRATOS_TRY
374 
375  // predict variable from second derivative
376  TValueType& CurrentVariable = rNode.FastGetSolutionStepValue(*this->mpVariable, 0);
377  const TValueType& PreviousVariable = rNode.FastGetSolutionStepValue(*this->mpVariable, 1);
378 
379  TValueType& CurrentSecondDerivative = rNode.FastGetSolutionStepValue(*this->mpSecondDerivative, 0);
380 
381  const TValueType& PreviousFirstDerivative = rNode.FastGetSolutionStepValue(*this->mpFirstDerivative, 1);
382  const TValueType& PreviousSecondDerivative = rNode.FastGetSolutionStepValue(*this->mpSecondDerivative, 1);
383 
384  CurrentVariable = PreviousVariable + this->mNewmark.delta_time * PreviousFirstDerivative + this->mNewmark.delta_time * this->mNewmark.delta_time * ( 0.5 * ( 1.0 - 2.0 * this->mNewmark.beta ) * PreviousSecondDerivative + this->mNewmark.beta * CurrentSecondDerivative );
385 
386  // variable prediction :: uniform accelerated movement **
387  CurrentVariable -= this->mNewmark.delta_time * PreviousFirstDerivative + 0.5 * this->mNewmark.delta_time * this->mNewmark.delta_time * PreviousSecondDerivative;
388 
389  //CurrentSecondDerivative = PreviousSecondDerivative;
390 
391  KRATOS_CATCH( "" )
392  }
393 
394  void PredictFromVariable(NodeType& rNode) override
395  {
396  KRATOS_TRY
397 
398  //if(this->Is(TimeIntegrationLocalFlags::NOT_PREDICT_PRIMARY_VARIABLE))
399  this->PredictVariable(rNode);
400  this->PredictFirstDerivative(rNode);
401  this->PredictSecondDerivative(rNode);
402 
403  KRATOS_CATCH( "" )
404  }
405 
406 
407  void PredictFromFirstDerivative(NodeType& rNode) override
408  {
409  KRATOS_TRY
410 
411  //if(this->Is(TimeIntegrationLocalFlags::NOT_PREDICT_PRIMARY_VARIABLE))
412  //this->PredictFirstDerivative(rNode);
413  this->PredictSecondDerivative(rNode);
414  this->PredictVariable(rNode);
415 
416  KRATOS_CATCH( "" )
417  }
418 
419  void PredictVariable(NodeType& rNode) override
420  {
421  KRATOS_TRY
422 
423  TValueType& CurrentVariable = rNode.FastGetSolutionStepValue(*this->mpVariable, 0);
424  const TValueType& CurrentFirstDerivative = rNode.FastGetSolutionStepValue(*this->mpFirstDerivative, 0);
425  const TValueType& CurrentSecondDerivative = rNode.FastGetSolutionStepValue(*this->mpSecondDerivative, 0);
426 
427  // variable prediction :: uniform accelerated movement **
428  CurrentVariable += this->mNewmark.delta_time * CurrentFirstDerivative + 0.5 * this->mNewmark.delta_time * this->mNewmark.delta_time * CurrentSecondDerivative;
429 
430  KRATOS_CATCH( "" )
431  }
432 
433  void PredictFirstDerivative(NodeType& rNode) override
434  {
435  KRATOS_TRY
436 
437  const TValueType& CurrentVariable = rNode.FastGetSolutionStepValue(*this->mpVariable, 0);
438  TValueType& CurrentFirstDerivative = rNode.FastGetSolutionStepValue(*this->mpFirstDerivative, 0);
439  const TValueType& PreviousFirstDerivative = rNode.FastGetSolutionStepValue(*this->mpFirstDerivative, 1);
440  const TValueType& PreviousSecondDerivative = rNode.FastGetSolutionStepValue(*this->mpSecondDerivative, 1);
441 
442  const TValueType& PreviousVariable = rNode.FastGetSolutionStepValue(*this->mpVariable, 1);
443 
444  // consistent newmark
445  CurrentFirstDerivative = this->mNewmark.c1 * (CurrentVariable-PreviousVariable) - this->mNewmark.c4 * PreviousFirstDerivative - this->mNewmark.c5 * PreviousSecondDerivative;
446 
447  // uniform accelerated movement
448  // CurrentFirstDerivative = (2.0/this->mNewmark.delta_time) * (CurrentVariable-PreviousVariable) - this->mNewmark.delta_time * CurrentSecondDerivative - CurrentFirstDerivative;
449 
450 
451  KRATOS_CATCH( "" )
452  }
453 
454  void PredictSecondDerivative(NodeType& rNode) override
455  {
456  KRATOS_TRY
457 
458  const TValueType& CurrentFirstDerivative = rNode.FastGetSolutionStepValue(*this->mpFirstDerivative, 0);
459  TValueType& CurrentSecondDerivative = rNode.FastGetSolutionStepValue(*this->mpSecondDerivative, 0);
460  const TValueType& PreviousFirstDerivative = rNode.FastGetSolutionStepValue(*this->mpFirstDerivative, 1);
461  const TValueType& PreviousSecondDerivative = rNode.FastGetSolutionStepValue(*this->mpSecondDerivative, 1);
462 
463  CurrentSecondDerivative = ( 1.0 / (this->mNewmark.gamma * this->mNewmark.delta_time) ) * ( CurrentFirstDerivative - PreviousFirstDerivative - ( 1.0 - this->mNewmark.gamma ) * this->mNewmark.delta_time * PreviousSecondDerivative );
464 
465  KRATOS_CATCH( "" )
466  }
467 
468 
469  void UpdateFromVariable(NodeType& rNode) override
470  {
471  KRATOS_TRY
472 
473  this->UpdateVariable(rNode);
474  this->UpdateFirstDerivative(rNode);
475  this->UpdateSecondDerivative(rNode);
476 
477  KRATOS_CATCH( "" )
478  }
479 
480  void UpdateFromFirstDerivative(NodeType& rNode) override
481  {
482  KRATOS_TRY
483 
484  TValueType& CurrentVariable = rNode.FastGetSolutionStepValue(*this->mpVariable, 0);
485  TValueType& CurrentSecondDerivative = rNode.FastGetSolutionStepValue(*this->mpSecondDerivative, 0);
486  const TValueType& CurrentFirstDerivative = rNode.FastGetSolutionStepValue(*this->mpFirstDerivative, 0);
487 
488  const TValueType& PreviousVariable = rNode.FastGetSolutionStepValue(*this->mpVariable, 1);
489  const TValueType& PreviousFirstDerivative = rNode.FastGetSolutionStepValue(*this->mpFirstDerivative, 1);
490  const TValueType& PreviousSecondDerivative = rNode.FastGetSolutionStepValue(*this->mpSecondDerivative, 1);
491 
492  CurrentSecondDerivative = (this->mNewmark.c0/this->mNewmark.c1) * (CurrentFirstDerivative + this->mNewmark.c4 * PreviousFirstDerivative + this->mNewmark.c5 * PreviousSecondDerivative) - this->mNewmark.c2 * PreviousFirstDerivative - this->mNewmark.c3 * PreviousSecondDerivative;
493 
494  CurrentVariable = PreviousVariable + (1.0/this->mNewmark.c1) * (CurrentFirstDerivative + this->mNewmark.c4 * PreviousFirstDerivative + this->mNewmark.c5 * PreviousSecondDerivative);
495 
496  KRATOS_CATCH( "" )
497  }
498 
499 
500  void UpdateFromSecondDerivative(NodeType& rNode) override
501  {
502  KRATOS_TRY
503 
504  KRATOS_ERROR << " Calling UpdateFromSecondDerivative for Newmark time integration method : NOT IMPLEMENTED " <<std::endl;
505 
506  KRATOS_CATCH( "" )
507  }
508 
509  void UpdateVariable(NodeType& rNode) override
510  {
511  KRATOS_TRY
512 
513  KRATOS_CATCH( "" )
514  }
515 
516 
517  void UpdateFirstDerivative(NodeType& rNode) override
518  {
519  KRATOS_TRY
520 
521  const TValueType& CurrentVariable = rNode.FastGetSolutionStepValue(*this->mpVariable, 0);
522  TValueType& CurrentFirstDerivative = rNode.FastGetSolutionStepValue(*this->mpFirstDerivative, 0);
523 
524  const TValueType& PreviousVariable = rNode.FastGetSolutionStepValue(*this->mpVariable, 1);
525  const TValueType& PreviousFirstDerivative = rNode.FastGetSolutionStepValue(*this->mpFirstDerivative, 1);
526  const TValueType& PreviousSecondDerivative = rNode.FastGetSolutionStepValue(*this->mpSecondDerivative, 1);
527 
528  CurrentFirstDerivative = (this->mNewmark.c1 * (CurrentVariable-PreviousVariable) - this->mNewmark.c4 * PreviousFirstDerivative - this->mNewmark.c5 * PreviousSecondDerivative);
529 
530  KRATOS_CATCH( "" )
531  }
532 
533  void UpdateSecondDerivative(NodeType& rNode) override
534  {
535  KRATOS_TRY
536 
537  const TValueType& CurrentVariable = rNode.FastGetSolutionStepValue(*this->mpVariable, 0);
538  TValueType& CurrentSecondDerivative = rNode.FastGetSolutionStepValue(*this->mpSecondDerivative, 0);
539 
540  const TValueType& PreviousVariable = rNode.FastGetSolutionStepValue(*this->mpVariable, 1);
541  const TValueType& PreviousFirstDerivative = rNode.FastGetSolutionStepValue(*this->mpFirstDerivative, 1);
542  const TValueType& PreviousSecondDerivative = rNode.FastGetSolutionStepValue(*this->mpSecondDerivative, 1);
543 
544  CurrentSecondDerivative = (this->mNewmark.c0 * (CurrentVariable-PreviousVariable) - this->mNewmark.c2 * PreviousFirstDerivative - this->mNewmark.c3 * PreviousSecondDerivative);
545 
546  KRATOS_CATCH( "" )
547  }
548 
552 
556 
557  // get parameters
558  double& GetFirstDerivativeInertialParameter(double& rParameter) override
559  {
560  rParameter = mNewmark.c1;
561  return rParameter;
562  }
563 
564  double& GetSecondDerivativeInertialParameter(double& rParameter) override
565  {
566  rParameter = mNewmark.c0;
567  return rParameter;
568  }
569 
573 
577 
579 
580  private:
581 
584 
588 
592 
596 
600 
604  friend class Serializer;
605 
606  void save(Serializer& rSerializer) const override
607  {
609  rSerializer.save("NewmarkParameters", mNewmark);
610  };
611 
612  void load(Serializer& rSerializer) override
613  {
614  KRATOS_SERIALIZE_LOAD_BASE_CLASS( rSerializer, BaseType )
615  rSerializer.load("NewmarkParameters", mNewmark);
616  };
617 
621 
625 
627 
628  }; // Class NewmarkMethod
629 
631 
634 
635 
639 
640  template<class TVariableType, class TValueType>
641  inline std::istream & operator >> (std::istream & rIStream, NewmarkMethod<TVariableType,TValueType>& rThis)
642  {
643  return rIStream;
644  }
645 
646  template<class TVariableType, class TValueType>
647  inline std::ostream & operator << (std::ostream & rOStream, const NewmarkMethod<TVariableType,TValueType>& rThis)
648  {
649  return rOStream << rThis.Info();
650  }
651 
653 
655 
656 } // namespace Kratos.
657 
658 #endif // KRATOS_NEWMARK_METHOD_H_INCLUDED defined
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
Short class definition.
Definition: newmark_method.hpp:51
NewmarkMethod(NewmarkMethod &rOther)
Copy Constructor.
Definition: newmark_method.hpp:156
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: newmark_method.hpp:292
void UpdateFromSecondDerivative(NodeType &rNode) override
Definition: newmark_method.hpp:500
BaseType::Pointer BasePointerType
BasePointerType.
Definition: newmark_method.hpp:128
void UpdateVariable(NodeType &rNode) override
Definition: newmark_method.hpp:509
NewmarkMethod(const TVariableType &rVariable)
Constructor.
Definition: newmark_method.hpp:147
void PredictVariable(NodeType &rNode) override
Definition: newmark_method.hpp:419
BasePointerType Clone() override
Clone.
Definition: newmark_method.hpp:163
KRATOS_CLASS_POINTER_DEFINITION(NewmarkMethod)
TimeIntegrationMethod< TVariableType, TValueType > BaseType
BaseType.
Definition: newmark_method.hpp:125
double & GetFirstDerivativeInertialParameter(double &rParameter) override
Definition: newmark_method.hpp:558
void UpdateFromFirstDerivative(NodeType &rNode) override
Definition: newmark_method.hpp:480
BaseType::NodeType NodeType
NodeType.
Definition: newmark_method.hpp:131
int Check(const ProcessInfo &rCurrentProcessInfo) override
This function is designed to be called once to perform all the checks needed.
Definition: newmark_method.hpp:248
void SetProcessInfoParameters(ProcessInfo &rCurrentProcessInfo) override
Definition: newmark_method.hpp:233
void UpdateFirstDerivative(NodeType &rNode) override
Definition: newmark_method.hpp:517
NewmarkMethod(const TVariableType &rVariable, const TVariableType &rFirstDerivative, const TVariableType &rSecondDerivative, const TVariableType &rPrimaryVariable)
Constructor.
Definition: newmark_method.hpp:153
void PredictFromFirstDerivative(NodeType &rNode) override
Definition: newmark_method.hpp:407
void AssignFromVariable(NodeType &rNode) override
Definition: newmark_method.hpp:326
void PredictFromVariable(NodeType &rNode) override
Definition: newmark_method.hpp:394
void PredictSecondDerivative(NodeType &rNode) override
Definition: newmark_method.hpp:454
void UpdateSecondDerivative(NodeType &rNode) override
Definition: newmark_method.hpp:533
NewmarkParameters mNewmark
Definition: newmark_method.hpp:320
void AssignFromSecondDerivative(NodeType &rNode) override
Definition: newmark_method.hpp:371
void CalculateParameters(ProcessInfo &rCurrentProcessInfo) override
Definition: newmark_method.hpp:180
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: newmark_method.hpp:298
void SetParameters(const ProcessInfo &rCurrentProcessInfo) override
Definition: newmark_method.hpp:205
NewmarkMethod()
Default Constructor.
Definition: newmark_method.hpp:144
~NewmarkMethod() override
Destructor.
Definition: newmark_method.hpp:169
double & GetSecondDerivativeInertialParameter(double &rParameter) override
Definition: newmark_method.hpp:564
void PredictFirstDerivative(NodeType &rNode) override
Definition: newmark_method.hpp:433
void UpdateFromVariable(NodeType &rNode) override
Definition: newmark_method.hpp:469
void AssignFromFirstDerivative(NodeType &rNode) override
Definition: newmark_method.hpp:341
std::string Info() const override
Turn back information as a string.
Definition: newmark_method.hpp:284
BaseType::VariablePointer VariablePointer
KratosVariable or KratosVariableComponent.
Definition: newmark_method.hpp:134
NewmarkMethod(const TVariableType &rVariable, const TVariableType &rFirstDerivative, const TVariableType &rSecondDerivative)
Constructor.
Definition: newmark_method.hpp:150
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
const TVariableType * VariablePointer
KratosVariable or KratosVariableComponent.
Definition: time_integration_method.hpp:65
#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
float gamma
Definition: generate_two_fluid_navier_stokes.py:131
def load(f)
Definition: ode_solve.py:307
Definition: newmark_method.hpp:55
double c5
Definition: newmark_method.hpp:67
double c4
Definition: newmark_method.hpp:66
double c1
Definition: newmark_method.hpp:63
double delta_time
Definition: newmark_method.hpp:59
double beta
Definition: newmark_method.hpp:56
double gamma
Definition: newmark_method.hpp:57
double c3
Definition: newmark_method.hpp:65
double c0
Definition: newmark_method.hpp:62
void SetParameters(const double &rbeta, const double &rgamma, const double &rdelta_time)
Definition: newmark_method.hpp:69
double c2
Definition: newmark_method.hpp:64