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.
explicit_hamilton_scheme.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 2015 $
6 // Revision: $Revision: 0.0 $
7 //
8 //
9 
10 #if !defined(KRATOS_EXPLICIT_HAMILTON_SCHEME_H_INCLUDED)
11 #define KRATOS_EXPLICIT_HAMILTON_SCHEME_H_INCLUDED
12 
13 /* System includes */
14 #ifdef _OPENMP
15 #include <omp.h>
16 #endif
17 
18 /* External includes */
19 #include "boost/smart_ptr.hpp"
20 
21 
22 /* Project includes */
23 #include "includes/define.h"
24 #include "includes/model_part.h"
26 #include "includes/variables.h"
27 #include "utilities/quaternion.h"
28 
30 
31 namespace Kratos
32 {
33 
59  template<class TSparseSpace,
60  class TDenseSpace //= DenseSpace<double>
61  >
62  class ExplicitHamiltonScheme : public Scheme<TSparseSpace,TDenseSpace>
63  {
64 
65  public:
70 
72 
73  typedef typename BaseType::TDataType TDataType;
74 
76 
78 
80 
83 
85 
87 
89 
91 
99  ExplicitHamiltonScheme(const double rMaximumDeltaTime,
100  const double rDeltaTimeFraction,
101  const double rDeltaTimePredictionLevel,
102  const bool rRayleighDamping)
103  : Scheme<TSparseSpace,TDenseSpace>()
104  {
105 
106  mDeltaTime.PredictionLevel = rDeltaTimePredictionLevel;
107 
108  mDeltaTime.Maximum = rMaximumDeltaTime;
109  mDeltaTime.Fraction = rDeltaTimeFraction;
110 
111  mRayleighDamping = rRayleighDamping;
112 
113  //Allocate auxiliary memory
114  int NumThreads = ParallelUtilities::GetNumThreads();
115 
116 
117  mMatrix.D.resize(NumThreads);
118  //mMatrix.M.resize(NumThreads);
119 
120  mVector.v.resize(NumThreads);
121  //mVector.a.resize(NumThreads);
122  //mVector.ap.resize(NumThreads);
123 
124 
125  }
126 
127 
131 
132 
138  virtual int Check(ModelPart& r_model_part)
139  {
140  KRATOS_TRY
141 
142  BaseType::Check(r_model_part);
143 
144  if(r_model_part.GetBufferSize() < 2)
145  {
146  KRATOS_THROW_ERROR(std::logic_error, "Insufficient buffer size for Central Difference Scheme. It has to be 2", "")
147  }
148 
149  KRATOS_CATCH("")
150 
151  return 0;
152  }
153 
154 
155  virtual void Initialize(ModelPart& r_model_part)
156  {
157  KRATOS_TRY
158 
160  {
161  this->CalculateDeltaTime(r_model_part);
162  }
163 
164  //initialize scheme variables
165  this->InitializeExplicitScheme(r_model_part);
166 
167  ProcessInfo& rCurrentProcessInfo = r_model_part.GetProcessInfo();
168  rCurrentProcessInfo[COMPUTE_DYNAMIC_TANGENT] = true;
169 
170  mTime.Previous = 0.0;
171  mTime.PreviousMiddle = 0.0;
172 
173  mSchemeIsInitialized = true;
174 
175  KRATOS_CATCH("")
176  }
177 
178  //***************************************************************************
179 
180  void InitializeSolutionStep(ModelPart& r_model_part,
182  TSystemVectorType& Dx,
184  )
185  {
186  KRATOS_TRY
187 
188  BaseType::InitializeSolutionStep(r_model_part,A,Dx,b);
189 
191  {
192  this->CalculateDeltaTime(r_model_part);
193  }
194 
195 
196  //initialize residual
197  //this->InitializeResidual(r_model_part);
198 
199  //initialize movements
200  this->InitializeMovements(r_model_part);
201 
202  //initialize update flags
203  mUpdatePositionFlag = true;
204  mUpdateRotationFlag = true;
205  mUpdateMomentumFlag = true;
206 
207 
208  KRATOS_CATCH("")
209  }
210 
211  //**************************************************************************
212 
213  void InitializeResidual( ModelPart& r_model_part )
214 
215  {
216  KRATOS_TRY
217 
218  NodesArrayType& pNodes = r_model_part.Nodes();
219 
220  #ifdef _OPENMP
221  int number_of_threads = omp_get_max_threads();
222  #else
223  int number_of_threads = 1;
224  #endif
225 
226  vector<unsigned int> node_partition;
227  OpenMPUtils::CreatePartition(number_of_threads, pNodes.size(), node_partition);
228 
229  #pragma omp parallel for
230  for(int k=0; k<number_of_threads; k++)
231  {
232  typename NodesArrayType::iterator i_begin=pNodes.ptr_begin()+node_partition[k];
233  typename NodesArrayType::iterator i_end=pNodes.ptr_begin()+node_partition[k+1];
234 
235  for(ModelPart::NodeIterator i=i_begin; i!= i_end; ++i)
236  {
237  (i)->FastGetSolutionStepValue(FORCE_RESIDUAL).clear();
238  (i)->FastGetSolutionStepValue(MOMENT_RESIDUAL).clear();
239  }
240  }
241 
242  KRATOS_CATCH("")
243  }
244 
245 
246  //**************************************************************************
247 
248  void InitializeMovements( ModelPart& r_model_part )
249 
250  {
251  KRATOS_TRY
252 
253  NodesArrayType& pNodes = r_model_part.Nodes();
254 
255  #ifdef _OPENMP
256  int number_of_threads = omp_get_max_threads();
257  #else
258  int number_of_threads = 1;
259  #endif
260 
261  vector<unsigned int> node_partition;
262  OpenMPUtils::CreatePartition(number_of_threads, pNodes.size(), node_partition);
263 
264  #pragma omp parallel for
265  for(int k=0; k<number_of_threads; k++)
266  {
267  typename NodesArrayType::iterator i_begin=pNodes.ptr_begin()+node_partition[k];
268  typename NodesArrayType::iterator i_end=pNodes.ptr_begin()+node_partition[k+1];
269 
270  for(ModelPart::NodeIterator i=i_begin; i!= i_end; ++i)
271  {
272  array_1d<double, 3 >& CurrentStepRotation = (i)->FastGetSolutionStepValue(STEP_ROTATION);
273  if( (i->pGetDof(ROTATION_X))->IsFree() )
274  CurrentStepRotation[0] = 0;
275  if( (i->pGetDof(ROTATION_Y))->IsFree() )
276  CurrentStepRotation[1] = 0;
277  if( (i->pGetDof(ROTATION_Z))->IsFree() )
278  CurrentStepRotation[2] = 0;
279  }
280  }
281 
282  KRATOS_CATCH("")
283  }
284 
285 
286  //***************************************************************************
287 
288  void FinalizeSolutionStep(ModelPart& rModelPart,
290  TSystemVectorType& Dx,
292  {
293  KRATOS_TRY
294  //finalizes solution step for all of the elements
295  ElementsArrayType& rElements = rModelPart.Elements();
296  ProcessInfo& CurrentProcessInfo = rModelPart.GetProcessInfo();
297 
298  int NumThreads = ParallelUtilities::GetNumThreads();
299  OpenMPUtils::PartitionVector ElementPartition;
300  OpenMPUtils::DivideInPartitions(rElements.size(), NumThreads, ElementPartition);
301 
302  #pragma omp parallel
303  {
304  int k = OpenMPUtils::ThisThread();
305 
306  ElementsArrayType::iterator ElementsBegin = rElements.begin() + ElementPartition[k];
307  ElementsArrayType::iterator ElementsEnd = rElements.begin() + ElementPartition[k + 1];
308 
309  for (ElementsArrayType::iterator itElem = ElementsBegin; itElem != ElementsEnd; ++itElem)
310  {
311  itElem->FinalizeSolutionStep(CurrentProcessInfo);
312  }
313  }
314 
315  ConditionsArrayType& rConditions = rModelPart.Conditions();
316 
317  OpenMPUtils::PartitionVector ConditionPartition;
318  OpenMPUtils::DivideInPartitions(rConditions.size(), NumThreads, ConditionPartition);
319 
320  #pragma omp parallel
321  {
322  int k = OpenMPUtils::ThisThread();
323 
324  ConditionsArrayType::iterator ConditionsBegin = rConditions.begin() + ConditionPartition[k];
325  ConditionsArrayType::iterator ConditionsEnd = rConditions.begin() + ConditionPartition[k + 1];
326 
327  for (ConditionsArrayType::iterator itCond = ConditionsBegin; itCond != ConditionsEnd; ++itCond)
328  {
329  itCond->FinalizeSolutionStep(CurrentProcessInfo);
330  }
331  }
332  KRATOS_CATCH( "" )
333  }
334 
335 
336  //***************************************************************************
337 
338  void CalculateDeltaTime(ModelPart& r_model_part)
339  {
340 
341  KRATOS_TRY
342 
343  ProcessInfo& rCurrentProcessInfo = r_model_part.GetProcessInfo();
344  ElementsArrayType& pElements = r_model_part.Elements();
345 
346 #ifdef _OPENMP
347  int number_of_threads = omp_get_max_threads();
348 #else
349  int number_of_threads = 1;
350 
351 #endif
352 
353  vector<unsigned int> element_partition;
354  OpenMPUtils::CreatePartition(number_of_threads, pElements.size(), element_partition);
355 
356  double safety_factor = 0.65; //most autors recommend a value near 0.80 (Belytschko - Nonlinear FE.. 2000. chap 6. pag. 315)
357 
358  Vector delta_times(number_of_threads);
359 
360  double stable_delta_time = 0.00;
361 
362  for(int i = 0; i < number_of_threads; i++)
363  delta_times[i] = mDeltaTime.Maximum/safety_factor;
364 
365 #pragma omp parallel for private(stable_delta_time)
366  for(int k=0; k<number_of_threads; k++)
367  {
368  typename ElementsArrayType::iterator it_begin=pElements.ptr_begin()+element_partition[k];
369  typename ElementsArrayType::iterator it_end=pElements.ptr_begin()+element_partition[k+1];
370  for(ElementsArrayType::iterator it=it_begin; it!= it_end; ++it)
371  {
372 
373  //get geometric and material properties
374  double length = it->GetGeometry().Length();
375  double alpha = it->GetProperties()[RAYLEIGH_ALPHA];
376  double beta = it->GetProperties()[RAYLEIGH_BETA];
377  double E = it->GetProperties()[YOUNG_MODULUS];
378  double v = it->GetProperties()[POISSON_RATIO];
379  double ro = it->GetProperties()[DENSITY];
380 
381  //compute courant criterion
382  double bulk = E/(3.0*(1.0-2.0*v));
383  double wavespeed = sqrt(bulk/ro);
384  double w = 2.0*wavespeed/length; //frequency
385 
386  double psi = 0.5*(alpha/w + beta*w); //critical ratio;
387 
388  stable_delta_time = (2.0/w)*(sqrt(1.0 + psi*psi)-psi);
389 
390  if(stable_delta_time > 0.00){
391  if(stable_delta_time < delta_times[k]){
392  delta_times[k] = stable_delta_time;
393  }
394  }
395 
396  }
397  }
398 
399  stable_delta_time = *std::min_element(delta_times.begin(), delta_times.end());
400 
401  stable_delta_time *= safety_factor * 0.5; //extra factor added to get an stable delta time
402 
403  if(stable_delta_time < mDeltaTime.Maximum){
404 
405  rCurrentProcessInfo[DELTA_TIME] = stable_delta_time;
406 
407  std::cout<< " New computed stable Time step = "<< stable_delta_time <<" "<< std::endl;
408  std::cout<< " " << std::endl;
409  }
410 
411  KRATOS_CATCH("")
412  }
413 
414  //***************************************************************************
415 
417  {
418  KRATOS_TRY
419 
420  //Set velocity to zero...
421 
422  NodesArrayType& pNodes = r_model_part.Nodes();
423 
424 #ifdef _OPENMP
425  int number_of_threads = omp_get_max_threads();
426 #else
427  int number_of_threads = 1;
428 #endif
429 
430  vector<unsigned int> node_partition;
431  OpenMPUtils::CreatePartition(number_of_threads, pNodes.size(), node_partition);
432 
433 #pragma omp parallel for
434  for(int k=0; k<number_of_threads; k++)
435  {
436  typename NodesArrayType::iterator i_begin = pNodes.ptr_begin()+node_partition[k];
437  typename NodesArrayType::iterator i_end = pNodes.ptr_begin()+node_partition[k+1];
438 
439  for(ModelPart::NodeIterator i=i_begin; i!= i_end; ++i)
440  {
441  i->FastGetSolutionStepValue(POSITION_MOMENTUM).clear();
442  i->FastGetSolutionStepValue(ROTATION_MOMENTUM).clear();
443 
444  i->FastGetSolutionStepValue(FORCE_RESIDUAL).clear();
445  i->FastGetSolutionStepValue(MOMENT_RESIDUAL).clear();
446 
447  i->FastGetSolutionStepValue(DISPLACEMENT).clear();
448  i->FastGetSolutionStepValue(ROTATION).clear();
449  }
450  }
451 
452  KRATOS_CATCH("")
453  }
454 
458  //***************************************************************************
459  virtual void Update(ModelPart& r_model_part,
460  DofsArrayType& rDofSet,
462  TSystemVectorType& Dx,
464  )
465  {
466  KRATOS_TRY
467 
468  ProcessInfo& rCurrentProcessInfo = r_model_part.GetProcessInfo();
469 
470  mUpdatePositionFlag = rCurrentProcessInfo[POSITION_UPDATE_LABEL];
471  mUpdateRotationFlag = rCurrentProcessInfo[ROTATION_UPDATE_LABEL];
472  mUpdateMomentumFlag = rCurrentProcessInfo[MOMENTUM_UPDATE_LABEL];
473 
474 
475  if( mUpdatePositionFlag == true ){
476  //1) Update nodal positions:
477  UpdateNodalPosition( r_model_part );
478 
479  mUpdatePositionFlag = false;
480  }
481 
482  if( mUpdateRotationFlag == true ){
483  //1) Update nodal positions:
484  UpdateNodalRotation( r_model_part );
485 
486  mUpdateRotationFlag = false;
487  }
488 
489  if( mUpdateMomentumFlag == true ){
490 
491  //2) Update momentum equations:
492  UpdateNodalMomentum( r_model_part );
493 
494  mUpdateMomentumFlag = false;
495  }
496 
497 
498  KRATOS_CATCH("")
499  }
500 
501 
502  //***************************************************************************
503  //***************************************************************************
504 
505 
506  void UpdateNodalPosition(ModelPart& r_model_part)
507  {
508  KRATOS_TRY
509 
510  ProcessInfo& rCurrentProcessInfo = r_model_part.GetProcessInfo();
511  NodesArrayType& pNodes = r_model_part.Nodes();
512 
513  //Step Update
514  mTime.Delta = rCurrentProcessInfo[DELTA_TIME];
515 
516  double Alpha = rCurrentProcessInfo[ALPHA_TRAPEZOIDAL_RULE];
517 
518  #ifdef _OPENMP
519  int number_of_threads = omp_get_max_threads();
520  #else
521  int number_of_threads = 1;
522  #endif
523 
524  vector<unsigned int> node_partition;
525  OpenMPUtils::CreatePartition(number_of_threads, pNodes.size(), node_partition);
526 
527  #pragma omp parallel for
528  for(int k=0; k<number_of_threads; k++)
529  {
530  typename NodesArrayType::iterator i_begin=pNodes.ptr_begin()+node_partition[k];
531  typename NodesArrayType::iterator i_end=pNodes.ptr_begin()+node_partition[k+1];
532 
533  for(ModelPart::NodeIterator i=i_begin; i!= i_end; ++i)
534  {
535 
536  //is active by default
537  bool node_is_active = true;
538  if( (i)->IsDefined(ACTIVE) )
539  node_is_active = (i)->Is(ACTIVE);
540 
541  if(node_is_active)
542  {
543  // Update DISPLACEMENTS, LINEAR VELOCITIES AND ACCELERATIONS
544 
545  const double& nodal_mass = i->FastGetSolutionStepValue(NODAL_MASS);
546 
547  array_1d<double,3>& force_residual = i->FastGetSolutionStepValue(FORCE_RESIDUAL);
548  array_1d<double,3>& position_momentum = i->FastGetSolutionStepValue(POSITION_MOMENTUM);
549 
550 
551  array_1d<double,3>& CurrentDisplacement = i->FastGetSolutionStepValue(DISPLACEMENT,0);
552  array_1d<double,3>& ReferenceDisplacement = i->FastGetSolutionStepValue(DISPLACEMENT,1);
553 
554  ReferenceDisplacement = CurrentDisplacement;
555 
556  //Solution of the explicit equation: force_residual is (Fext-Fint) then the sign is changed respect the reference formulation
557 
558  //std::cout<<" nodal mass: ("<<i->Id()<<"): "<<nodal_mass<<std::endl;
559 
560  if( (i->pGetDof(DISPLACEMENT_X))->IsFree() ){
561 
562  CurrentDisplacement[0] = ReferenceDisplacement[0] + ( mTime.Delta / nodal_mass ) * ( position_momentum[0] + Alpha * mTime.Delta * force_residual[0] );
563 
564  }
565 
566 
567  if( (i->pGetDof(DISPLACEMENT_Y))->IsFree() ){
568 
569  CurrentDisplacement[1] = ReferenceDisplacement[1] + ( mTime.Delta / nodal_mass ) * ( position_momentum[1] + Alpha * mTime.Delta * force_residual[1] );
570 
571  }
572 
573 
574  if( i->HasDofFor(DISPLACEMENT_Z) ){
575 
576  if( (i->pGetDof(DISPLACEMENT_Z))->IsFree() ){
577 
578  CurrentDisplacement[2] = ReferenceDisplacement[2] + ( mTime.Delta / nodal_mass ) * ( position_momentum[2] + Alpha * mTime.Delta * force_residual[2] );
579 
580  }
581  }
582 
583  //std::cout<<" Node ["<<i->Id()<<"] (mass:"<<nodal_mass<<",force:"<<force_residual<<",moment: "<<moment_residual<<", position: "<<position_momentum<<"); Alpha:"<<Alpha<<std::endl;
584  //std::cout<<" Node ["<<i->Id()<<"] (Dt/mass:"<<mTime.Delta / nodal_mass<<", position_momentum:"<<position_momentum<<", alpha*Dt*force_residual: "<<Alpha * mTime.Delta * force_residual<<"); Disp:"<<CurrentDisplacement<<", "<<ReferenceDisplacement<<std::endl;
585 
586  //linear velocities and accelerations
587  array_1d<double, 3 > DeltaDisplacement = CurrentDisplacement-ReferenceDisplacement;
588 
589  array_1d<double, 3 > & CurrentVelocity = (i)->FastGetSolutionStepValue(VELOCITY, 0);
590  array_1d<double, 3 > & PreviousVelocity = (i)->FastGetSolutionStepValue(VELOCITY, 1);
591 
592  array_1d<double, 3 > & CurrentAcceleration = (i)->FastGetSolutionStepValue(ACCELERATION, 0);
593  //array_1d<double, 3 > & PreviousAcceleration = (i)->FastGetSolutionStepValue(ACCELERATION, 1);
594 
595  PreviousVelocity = CurrentVelocity;
596 
597  UpdateVelocity (CurrentVelocity, DeltaDisplacement, mTime.Delta);
598 
599  array_1d<double, 3 > DeltaVelocity = CurrentVelocity-PreviousVelocity;
600 
601  UpdateAcceleration (CurrentAcceleration, DeltaVelocity, mTime.Delta);
602 
603  //---------------------------//
604 
605  }
606  }
607  }
608 
609 
610  KRATOS_CATCH("")
611 
612  }
613 
614 
615  //***************************************************************************
616  //***************************************************************************
617 
618 
619  void UpdateNodalRotation(ModelPart& r_model_part)
620  {
621  KRATOS_TRY
622 
623  ProcessInfo& rCurrentProcessInfo = r_model_part.GetProcessInfo();
624  NodesArrayType& pNodes = r_model_part.Nodes();
625 
626  //Step Update
627  mTime.Delta = rCurrentProcessInfo[DELTA_TIME];
628 
629  //double Alpha = rCurrentProcessInfo[ALPHA_TRAPEZOIDAL_RULE];
630 
631 
632  #ifdef _OPENMP
633  int number_of_threads = omp_get_max_threads();
634  #else
635  int number_of_threads = 1;
636  #endif
637 
638  vector<unsigned int> node_partition;
639  OpenMPUtils::CreatePartition(number_of_threads, pNodes.size(), node_partition);
640 
641  #pragma omp parallel for
642  for(int k=0; k<number_of_threads; k++)
643  {
644  typename NodesArrayType::iterator i_begin=pNodes.ptr_begin()+node_partition[k];
645  typename NodesArrayType::iterator i_end=pNodes.ptr_begin()+node_partition[k+1];
646 
647  for(ModelPart::NodeIterator i=i_begin; i!= i_end; ++i)
648  {
649 
650  //is active by default
651  bool node_is_active = true;
652  if( (i)->IsDefined(ACTIVE) )
653  node_is_active = (i)->Is(ACTIVE);
654 
655  if(node_is_active)
656  {
657 
658  // Update ROTATIONS, ANGULAR VELOCITIES AND ACCELERATIONS
659 
660  //Total Rotation
661  array_1d<double, 3 > & CurrentRotation = (i)->FastGetSolutionStepValue(ROTATION, 0);
662  array_1d<double, 3 > & ReferenceRotation = (i)->FastGetSolutionStepValue(ROTATION, 1);
663 
664  //StepRotation
665  array_1d<double, 3 > & CurrentStepRotation = (i)->FastGetSolutionStepValue(STEP_ROTATION, 0);
666 
667  Vector TotalRotationVector = ZeroVector(3);
668  Vector StepRotationVector = ZeroVector(3);
669 
670  QuaternionType StepRotationQuaternion;
671  QuaternionType CurrentRotationQuaternion;
672  QuaternionType ReferenceRotationQuaternion;
673 
674  for( unsigned int j=0; j<3; j++)
675  {
676 
677  TotalRotationVector[j] = ReferenceRotation[j]; //previous iteration total rotation
678  StepRotationVector[j] = CurrentStepRotation[j]; //previous iteration step rotation
679  }
680 
681  StepRotationQuaternion = QuaternionType::FromRotationVector( StepRotationVector );
682 
683  // updated step rotations:
684  ReferenceRotationQuaternion = QuaternionType::FromRotationVector( TotalRotationVector );
685 
686  CurrentRotationQuaternion = StepRotationQuaternion * ReferenceRotationQuaternion;
687 
688  CurrentRotationQuaternion.ToRotationVector( TotalRotationVector );
689 
690  for( unsigned int j=0; j<3; j++)
691  {
692  CurrentRotation[j] = TotalRotationVector[j];
693  }
694 
695 
696  //angular velocities and accelerations
697  array_1d<double, 3 > & CurrentAngularVelocity = (i)->FastGetSolutionStepValue(ANGULAR_VELOCITY, 0);
698  array_1d<double, 3 > & PreviousAngularVelocity = (i)->FastGetSolutionStepValue(ANGULAR_VELOCITY, 1);
699 
700  array_1d<double, 3 > & CurrentAngularAcceleration = (i)->FastGetSolutionStepValue(ANGULAR_ACCELERATION, 0);
701 
702  PreviousAngularVelocity = CurrentAngularVelocity;
703 
704  UpdateAngularVelocity (CurrentAngularVelocity, StepRotationVector, mTime.Delta);
705 
706  array_1d<double, 3 > DeltaAngularVelocity = CurrentAngularVelocity-PreviousAngularVelocity;
707 
708  UpdateAngularAcceleration (CurrentAngularAcceleration, DeltaAngularVelocity, mTime.Delta);
709 
710  //------------------------
711 
712  }
713  }
714  }
715 
716 
717  KRATOS_CATCH("")
718 
719  }
720 
721 
722  //***************************************************************************
723  //***************************************************************************
724 
725 
726  void UpdateNodalMomentum(ModelPart& r_model_part)
727  {
728  KRATOS_TRY
729 
730  ProcessInfo& rCurrentProcessInfo = r_model_part.GetProcessInfo();
731  NodesArrayType& pNodes = r_model_part.Nodes();
732 
733  //Step Update
734  mTime.Delta = rCurrentProcessInfo[DELTA_TIME];
735 
736  double Alpha = rCurrentProcessInfo[ALPHA_TRAPEZOIDAL_RULE];
737 
738 #ifdef _OPENMP
739  int number_of_threads = omp_get_max_threads();
740 #else
741  int number_of_threads = 1;
742 #endif
743 
744  vector<unsigned int> node_partition;
745  OpenMPUtils::CreatePartition(number_of_threads, pNodes.size(), node_partition);
746 
747 #pragma omp parallel for
748  for(int k=0; k<number_of_threads; k++)
749  {
750  typename NodesArrayType::iterator i_begin=pNodes.ptr_begin()+node_partition[k];
751  typename NodesArrayType::iterator i_end=pNodes.ptr_begin()+node_partition[k+1];
752 
753  for(ModelPart::NodeIterator i=i_begin; i!= i_end; ++i)
754  {
755  //is active by default
756  bool node_is_active = true;
757  if( (i)->IsDefined(ACTIVE) )
758  node_is_active = (i)->Is(ACTIVE);
759 
760  if(node_is_active)
761  {
762  //Current step information "N+1" (before step update).
763  array_1d<double,3>& previous_force_residual = i->FastGetSolutionStepValue(FORCE_RESIDUAL,1);
764  array_1d<double,3>& previous_moment_residual = i->FastGetSolutionStepValue(MOMENT_RESIDUAL,1);
765 
766  array_1d<double,3>& force_residual = i->FastGetSolutionStepValue(FORCE_RESIDUAL);
767  array_1d<double,3>& moment_residual = i->FastGetSolutionStepValue(MOMENT_RESIDUAL);
768 
769  array_1d<double,3>& previous_position_momentum = i->FastGetSolutionStepValue(POSITION_MOMENTUM,1);
770  array_1d<double,3>& previous_rotation_momentum = i->FastGetSolutionStepValue(ROTATION_MOMENTUM,1);
771 
772  array_1d<double,3>& position_momentum = i->FastGetSolutionStepValue(POSITION_MOMENTUM);
773  array_1d<double,3>& rotation_momentum = i->FastGetSolutionStepValue(ROTATION_MOMENTUM);
774 
775 
776  //Solution of the explicit momentum equations: force_residual is (Fext-Fint) then the sign is changed respect the reference formulation (the same for moment_residual)
777  position_momentum = previous_position_momentum + mTime.Delta * ( (1.0 - Alpha) * previous_force_residual + Alpha * force_residual );
778 
779  rotation_momentum = previous_rotation_momentum + mTime.Delta * ( (1.0 - Alpha) * previous_moment_residual + Alpha * moment_residual );
780 
781  //std::cout<<" Node ["<<i->Id()<<"] (force_residual:"<<force_residual<<", "<<previous_force_residual<<",moment_residual: "<<moment_residual<<", "<<previous_moment_residual<<"); position_momentum:"<<position_momentum<<std::endl;
782  }
783  }
784  }
785 
786 
787  KRATOS_CATCH("")
788  }
789 
790  //***************************************************************************
791  //***************************************************************************
792 
796  Element::Pointer rCurrentElement,
797  LocalSystemMatrixType& LHS_Contribution,
798  LocalSystemVectorType& RHS_Contribution,
799  Element::EquationIdVectorType& rEquationId,
800  ProcessInfo& rCurrentProcessInfo)
801  {
802  KRATOS_TRY
803 
804  (rCurrentElement) -> CalculateSecondDerivativesContributions(LHS_Contribution,RHS_Contribution,rCurrentProcessInfo);
805 
806  //add explicit contribution of the Element Residual (RHS) to nodal Force Residual (nodal RHS)
807  (rCurrentElement) -> AddExplicitContribution(LHS_Contribution, TANGENT_MATRIX, TANGENT_LYAPUNOV, rCurrentProcessInfo);
808 
809  //add explicit contribution of the Element Residual (RHS) to nodal Moment Residual (nodal RHS)
810  (rCurrentElement) -> AddExplicitContribution(RHS_Contribution, RESIDUAL_VECTOR, RESIDUAL_LYAPUNOV, rCurrentProcessInfo);
811 
812  //std::cout<<" Element ["<<(rCurrentElement)->Id()<<"]: (Tangent:"<<LHS_Contribution<<") "<<std::endl;
813  //std::cout<<" Element ["<<(rCurrentElement)->Id()<<"]: (Residual:"<<RHS_Contribution<<") "<<std::endl;
814 
815  //----------------------
816 
817  // (rCurrentElement) -> CalculateFirstDerivativesContributions(LHS_Contribution,RHS_Contribution,rCurrentProcessInfo);
818 
819  // //add explicit contribution of the Element Residual (RHS) to nodal Force Residual (nodal RHS)
820  // (rCurrentElement) -> AddExplicitContribution(LHS_Contribution, TANGENT_MATRIX, TANGENT_LYAPUNOV, rCurrentProcessInfo);
821 
822  // //add explicit contribution of the Element Residual (RHS) to nodal Moment Residual (nodal RHS)
823  // (rCurrentElement) -> AddExplicitContribution(RHS_Contribution, RESIDUAL_VECTOR, RESIDUAL_LYAPUNOV, rCurrentProcessInfo);
824 
825  // //std::cout<<" Element ["<<(rCurrentElement)->Id()<<"]: (Tangent:"<<LHS_Contribution<<") "<<std::endl;
826  // //std::cout<<" Element ["<<(rCurrentElement)->Id()<<"]: (Residual:"<<RHS_Contribution<<") "<<std::endl;
827 
828  KRATOS_CATCH( "" )
829 
830  }
831 
832  //***************************************************************************
833  //***************************************************************************
834 
839  Condition::Pointer rCurrentCondition,
840  LocalSystemMatrixType& LHS_Contribution,
841  LocalSystemVectorType& RHS_Contribution,
842  Element::EquationIdVectorType& rEquationId,
843  ProcessInfo& rCurrentProcessInfo)
844  {
845  KRATOS_TRY
846 
847  // (rCurrentCondition) -> CalculateSecondDerivativesContributions(LHS_Contribution,RHS_Contribution,rCurrentProcessInfo);
848 
849  // //add explicit contribution of the Element Residual (RHS) to nodal Force Residual (nodal RHS)
850  // (rCurrentCondition) -> AddExplicitContribution(LHS_Contribution, TANGENT_MATRIX, TANGENT_LYAPUNOV, rCurrentProcessInfo);
851 
852  // //add explicit contribution of the Element Residual (RHS) to nodal Moment Residual (nodal RHS)
853  // (rCurrentCondition) -> AddExplicitContribution(RHS_Contribution, RESIDUAL_VECTOR, RESIDUAL_LYAPUNOV, rCurrentProcessInfo);
854 
855  // //std::cout<<" Condition ["<<(rCurrentCondition)->Id()<<"]: (Tangent:"<<LHS_Contribution<<") "<<std::endl;
856  // //std::cout<<" Condition ["<<(rCurrentCondition)->Id()<<"]: (Residual:"<<RHS_Contribution<<") "<<std::endl;
857 
858  // //----------------------
859 
860  // (rCurrentCondition) -> CalculateFirstDerivativesContributions(LHS_Contribution,RHS_Contribution,rCurrentProcessInfo);
861 
862  // //add explicit contribution of the Element Residual (RHS) to nodal Force Residual (nodal RHS)
863  // (rCurrentCondition) -> AddExplicitContribution(LHS_Contribution, TANGENT_MATRIX, TANGENT_LYAPUNOV, rCurrentProcessInfo);
864 
865  // //add explicit contribution of the Element Residual (RHS) to nodal Moment Residual (nodal RHS)
866  // (rCurrentCondition) -> AddExplicitContribution(RHS_Contribution, RESIDUAL_VECTOR, RESIDUAL_LYAPUNOV, rCurrentProcessInfo);
867 
868  // //std::cout<<" Condition ["<<(rCurrentCondition)->Id()<<"]: (Tangent:"<<LHS_Contribution<<") "<<std::endl;
869  // //std::cout<<" Condition ["<<(rCurrentCondition)->Id()<<"]: (Residual:"<<RHS_Contribution<<") "<<std::endl;
870 
871  KRATOS_CATCH( "" )
872  }
873 
874 
875  //***************************************************************************
876  //***************************************************************************
877 
878  void Calculate_RHS_Contribution(Element::Pointer rCurrentElement,
879  LocalSystemVectorType& RHS_Contribution,
881  ProcessInfo& rCurrentProcessInfo)
882  {
883 
884  KRATOS_TRY
885 
886 
887  //basic operations for the element considered
888  (rCurrentElement) -> CalculateRightHandSide(RHS_Contribution, rCurrentProcessInfo);
889 
890  //std::cout<<" Element ["<<(rCurrentElement)->Id()<<"]: (Residual:"<<RHS_Contribution<<") "<<std::endl;
891 
892  //add explicit contribution of the Element Residual (RHS) to nodal Force Residual (nodal RHS)
893  (rCurrentElement) -> AddExplicitContribution(RHS_Contribution, RESIDUAL_VECTOR, FORCE_RESIDUAL, rCurrentProcessInfo);
894 
895  //add explicit contribution of the Element Residual (RHS) to nodal Moment Residual (nodal RHS)
896  (rCurrentElement) -> AddExplicitContribution(RHS_Contribution, RESIDUAL_VECTOR, MOMENT_RESIDUAL, rCurrentProcessInfo);
897 
898 
899  KRATOS_CATCH( "" )
900  }
901 
902 
903  //***************************************************************************
904  //***************************************************************************
905 
909  virtual void Condition_Calculate_RHS_Contribution(Condition::Pointer rCurrentCondition,
910  LocalSystemVectorType& RHS_Contribution,
912  ProcessInfo& rCurrentProcessInfo)
913  {
914  KRATOS_TRY
915 
916  //basic operations for the element considered
917  (rCurrentCondition) -> CalculateRightHandSide(RHS_Contribution, rCurrentProcessInfo);
918 
919  //std::cout<<" Condition ["<<(rCurrentCondition)->Id()<<"]: (Residual:"<<RHS_Contribution<<") "<<std::endl;
920 
921  //add explicit contribution of the Condition Residual (RHS) to nodal Force Residual (nodal RHS)
922  (rCurrentCondition) -> AddExplicitContribution(RHS_Contribution, RESIDUAL_VECTOR, FORCE_RESIDUAL, rCurrentProcessInfo);
923 
924  //add explicit contribution of the Condition Residual (RHS) to nodal Moment Residual (nodal RHS)
925  (rCurrentCondition) -> AddExplicitContribution(RHS_Contribution, RESIDUAL_VECTOR, MOMENT_RESIDUAL, rCurrentProcessInfo);
926 
927 
928  KRATOS_CATCH( "" )
929  }
930 
931 
954  protected:
960  {
961  //std::vector< Matrix > M; //first derivative matrix (usually mass matrix)
962  std::vector< Matrix > D; //second derivative matrix (usually damping matrix)
963  };
964 
966  {
967  std::vector< Vector > v; //velocity
968  //std::vector< Vector > a; //acceleration
969  //std::vector< Vector > ap; //previous acceleration
970  };
971 
972 
974  {
975  double PredictionLevel; // 0, 1, 2
976 
977  double Maximum; //maximum delta time
978  double Fraction; //fraction of the delta time
979  };
980 
981 
983  {
984  double PreviousMiddle; //n-1/2
985  double Previous; //n
986  double Middle; //n+1/2
987  double Current; //n+1
988 
989  double Delta; //time step
990  };
991 
992 
995 
997 
998 
1002 
1006 
1007 
1020  //*********************************************************************************
1021  //Updating first time Derivative
1022  //*********************************************************************************
1023 
1024  inline void UpdateVelocity(array_1d<double, 3 >& rCurrentVelocity,
1025  const array_1d<double, 3 >& rDeltaDisplacement,
1026  const double& rDeltaTime)
1027  {
1028  noalias(rCurrentVelocity) = (1.0/rDeltaTime) * rDeltaDisplacement;
1029  }
1030 
1031 
1032  //*********************************************************************************
1033  //Updating second time Derivative
1034  //*********************************************************************************
1035 
1036  inline void UpdateAcceleration(array_1d<double, 3 >& rCurrentAcceleration,
1037  const array_1d<double, 3 >& rDeltaVelocity,
1038  const double& rDeltaTime)
1039  {
1040  noalias(rCurrentAcceleration) = (1.0/rDeltaTime) * rDeltaVelocity;
1041  }
1042 
1043  //*********************************************************************************
1044  //Updating first time Derivative
1045  //*********************************************************************************
1046 
1047  inline void UpdateAngularVelocity(array_1d<double, 3 >& rCurrentVelocity,
1048  const array_1d<double, 3 >& rDeltaRotation,
1049  const double& rDeltaTime)
1050  {
1051  noalias(rCurrentVelocity) = (1.0/rDeltaTime) * rDeltaRotation;
1052  }
1053 
1054 
1055  //*********************************************************************************
1056  //Updating second time Derivative
1057  //*********************************************************************************
1058 
1059  inline void UpdateAngularAcceleration(array_1d<double, 3 >& rCurrentAcceleration,
1060  const array_1d<double, 3 >& rDeltaVelocity,
1061  const double& rDeltaTime)
1062  {
1063  noalias(rCurrentAcceleration) = (1.0/rDeltaTime) * rDeltaVelocity;
1064  }
1065 
1080  private:
1110  }; /* Class Scheme */
1111 
1120 } /* namespace Kratos.*/
1121 
1122 #endif /* KRATOS_EXPLICIT_HAMILTON_SCHEME_H_INCLUDED defined */
std::vector< std::size_t > EquationIdVectorType
Definition: element.h:98
Definition: explicit_hamilton_scheme.hpp:63
void UpdateVelocity(array_1d< double, 3 > &rCurrentVelocity, const array_1d< double, 3 > &rDeltaDisplacement, const double &rDeltaTime)
Definition: explicit_hamilton_scheme.hpp:1024
virtual void Update(ModelPart &r_model_part, DofsArrayType &rDofSet, TSystemMatrixType &A, TSystemVectorType &Dx, TSystemVectorType &b)
Definition: explicit_hamilton_scheme.hpp:459
void Condition_CalculateSystemContributions(Condition::Pointer rCurrentCondition, LocalSystemMatrixType &LHS_Contribution, LocalSystemVectorType &RHS_Contribution, Element::EquationIdVectorType &rEquationId, ProcessInfo &rCurrentProcessInfo)
Definition: explicit_hamilton_scheme.hpp:838
BaseType::TSystemMatrixType TSystemMatrixType
Definition: explicit_hamilton_scheme.hpp:77
DeltaTimeParameters mDeltaTime
Definition: explicit_hamilton_scheme.hpp:1000
BaseType::DofsArrayType DofsArrayType
Definition: explicit_hamilton_scheme.hpp:75
ModelPart::ConditionsContainerType ConditionsArrayType
Definition: explicit_hamilton_scheme.hpp:86
ModelPart::NodesContainerType NodesArrayType
Definition: explicit_hamilton_scheme.hpp:88
virtual ~ExplicitHamiltonScheme()
Definition: explicit_hamilton_scheme.hpp:130
void UpdateAngularVelocity(array_1d< double, 3 > &rCurrentVelocity, const array_1d< double, 3 > &rDeltaRotation, const double &rDeltaTime)
Definition: explicit_hamilton_scheme.hpp:1047
void UpdateNodalRotation(ModelPart &r_model_part)
Definition: explicit_hamilton_scheme.hpp:619
virtual void Condition_Calculate_RHS_Contribution(Condition::Pointer rCurrentCondition, LocalSystemVectorType &RHS_Contribution, Element::EquationIdVectorType &EquationId, ProcessInfo &rCurrentProcessInfo)
Definition: explicit_hamilton_scheme.hpp:909
void CalculateDeltaTime(ModelPart &r_model_part)
Definition: explicit_hamilton_scheme.hpp:338
ModelPart::ElementsContainerType ElementsArrayType
Definition: explicit_hamilton_scheme.hpp:84
void Calculate_RHS_Contribution(Element::Pointer rCurrentElement, LocalSystemVectorType &RHS_Contribution, Element::EquationIdVectorType &EquationId, ProcessInfo &rCurrentProcessInfo)
Definition: explicit_hamilton_scheme.hpp:878
bool mSchemeIsInitialized
Definition: explicit_hamilton_scheme.hpp:996
bool mRayleighDamping
Definition: explicit_hamilton_scheme.hpp:1001
void InitializeMovements(ModelPart &r_model_part)
Definition: explicit_hamilton_scheme.hpp:248
bool mUpdatePositionFlag
Definition: explicit_hamilton_scheme.hpp:1003
Scheme< TSparseSpace, TDenseSpace > BaseType
Definition: explicit_hamilton_scheme.hpp:71
GeneralVectors mVector
Definition: explicit_hamilton_scheme.hpp:994
void UpdateAcceleration(array_1d< double, 3 > &rCurrentAcceleration, const array_1d< double, 3 > &rDeltaVelocity, const double &rDeltaTime)
Definition: explicit_hamilton_scheme.hpp:1036
GeneralMatrices mMatrix
Definition: explicit_hamilton_scheme.hpp:993
BaseType::TDataType TDataType
Definition: explicit_hamilton_scheme.hpp:73
KRATOS_CLASS_POINTER_DEFINITION(ExplicitHamiltonScheme)
BaseType::LocalSystemVectorType LocalSystemVectorType
Definition: explicit_hamilton_scheme.hpp:81
void InitializeExplicitScheme(ModelPart &r_model_part)
Definition: explicit_hamilton_scheme.hpp:416
ExplicitHamiltonScheme(const double rMaximumDeltaTime, const double rDeltaTimeFraction, const double rDeltaTimePredictionLevel, const bool rRayleighDamping)
Definition: explicit_hamilton_scheme.hpp:99
void UpdateNodalPosition(ModelPart &r_model_part)
Definition: explicit_hamilton_scheme.hpp:506
BaseType::TSystemVectorType TSystemVectorType
Definition: explicit_hamilton_scheme.hpp:79
BaseType::LocalSystemMatrixType LocalSystemMatrixType
Definition: explicit_hamilton_scheme.hpp:82
TimeVariables mTime
Definition: explicit_hamilton_scheme.hpp:999
void CalculateSystemContributions(Element::Pointer rCurrentElement, LocalSystemMatrixType &LHS_Contribution, LocalSystemVectorType &RHS_Contribution, Element::EquationIdVectorType &rEquationId, ProcessInfo &rCurrentProcessInfo)
Definition: explicit_hamilton_scheme.hpp:795
void FinalizeSolutionStep(ModelPart &rModelPart, TSystemMatrixType &A, TSystemVectorType &Dx, TSystemVectorType &b)
Function called once at the end of a solution step, after convergence is reached if an iterative proc...
Definition: explicit_hamilton_scheme.hpp:288
virtual void Initialize(ModelPart &r_model_part)
This is the place to initialize the Scheme.
Definition: explicit_hamilton_scheme.hpp:155
virtual int Check(ModelPart &r_model_part)
Definition: explicit_hamilton_scheme.hpp:138
bool mUpdateMomentumFlag
Definition: explicit_hamilton_scheme.hpp:1005
Quaternion< double > QuaternionType
Definition: explicit_hamilton_scheme.hpp:90
void InitializeSolutionStep(ModelPart &r_model_part, TSystemMatrixType &A, TSystemVectorType &Dx, TSystemVectorType &b)
Function called once at the beginning of each solution step.
Definition: explicit_hamilton_scheme.hpp:180
void UpdateAngularAcceleration(array_1d< double, 3 > &rCurrentAcceleration, const array_1d< double, 3 > &rDeltaVelocity, const double &rDeltaTime)
Definition: explicit_hamilton_scheme.hpp:1059
void InitializeResidual(ModelPart &r_model_part)
Definition: explicit_hamilton_scheme.hpp:213
void UpdateNodalMomentum(ModelPart &r_model_part)
Definition: explicit_hamilton_scheme.hpp:726
bool mUpdateRotationFlag
Definition: explicit_hamilton_scheme.hpp:1004
iterator end()
Definition: amatrix_interface.h:243
iterator begin()
Definition: amatrix_interface.h:241
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
MeshType::ConditionsContainerType ConditionsContainerType
Condintions container. A vector set of Conditions with their Id's as key.
Definition: model_part.h:183
MeshType::ElementsContainerType ElementsContainerType
Element container. A vector set of Elements with their Id's as key.
Definition: model_part.h:168
IndexType GetBufferSize() const
This method gets the suffer size of the model part database.
Definition: model_part.h:1876
ConditionsContainerType & Conditions(IndexType ThisIndex=0)
Definition: model_part.h:1381
ProcessInfo & GetProcessInfo()
Definition: model_part.h:1746
MeshType::NodeIterator NodeIterator
Definition: model_part.h:134
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
static void DivideInPartitions(const int NumTerms, const int NumThreads, PartitionVector &Partitions)
Divide an array of length NumTerms between NumThreads threads.
Definition: openmp_utils.h:158
static int ThisThread()
Wrapper for omp_get_thread_num().
Definition: openmp_utils.h:108
std::vector< int > PartitionVector
Vector type for the output of DivideInPartitions method.
Definition: openmp_utils.h:53
static int GetNumThreads()
Returns the current number of threads.
Definition: parallel_utilities.cpp:34
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
void ToRotationVector(T &rx, T &ry, T &rz) const
Definition: quaternion.h:262
static Quaternion FromRotationVector(double rx, double ry, double rz)
Definition: quaternion.h:427
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
ModelPart::ElementsContainerType ElementsArrayType
Elements containers definition.
Definition: scheme.h:89
virtual void EquationId(const Element &rElement, Element::EquationIdVectorType &rEquationId, const ProcessInfo &rCurrentProcessInfo)
This method gets the eqaution id corresponding to the current element.
Definition: scheme.h:636
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 InitializeSolutionStep(ModelPart &rModelPart, TSystemMatrixType &A, TSystemVectorType &Dx, TSystemVectorType &b)
Function called once at the beginning of each solution step.
Definition: scheme.h:272
typename TSparseSpace::DataType TDataType
Data type definition.
Definition: scheme.h:68
typename TDenseSpace::MatrixType LocalSystemMatrixType
Local system matrix type definition.
Definition: scheme.h:77
virtual int Check(const ModelPart &rModelPart) const
This function is designed to be called once to perform all the checks needed on the input provided....
Definition: scheme.h:508
ModelPart::ConditionsContainerType ConditionsArrayType
Conditions containers definition.
Definition: scheme.h:92
#define KRATOS_THROW_ERROR(ExceptionType, ErrorMessage, MoreInfo)
Definition: define.h:77
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
safety_factor
Definition: edgebased_PureConvection.py:110
v
Definition: generate_convection_diffusion_explicit_element.py:114
w
Definition: generate_convection_diffusion_explicit_element.py:108
alpha
Definition: generate_convection_diffusion_explicit_element.py:113
E
Definition: generate_hyper_elastic_simo_taylor_neo_hookean.py:26
tuple psi
Definition: generate_hyper_elastic_simo_taylor_neo_hookean.py:34
b
Definition: generate_total_lagrangian_mixed_volumetric_strain_element.py:31
def Alpha(n, j)
Definition: quadrature.py:93
int k
Definition: quadrature.py:595
int j
Definition: quadrature.py:648
A
Definition: sensitivityMatrix.py:70
integer i
Definition: TensorModule.f:17
Definition: explicit_hamilton_scheme.hpp:974
double Fraction
Definition: explicit_hamilton_scheme.hpp:978
double PredictionLevel
Definition: explicit_hamilton_scheme.hpp:975
double Maximum
Definition: explicit_hamilton_scheme.hpp:977
Definition: explicit_hamilton_scheme.hpp:960
std::vector< Matrix > D
Definition: explicit_hamilton_scheme.hpp:962
Definition: explicit_hamilton_scheme.hpp:966
std::vector< Vector > v
Definition: explicit_hamilton_scheme.hpp:967
Definition: explicit_hamilton_scheme.hpp:983
double Previous
Definition: explicit_hamilton_scheme.hpp:985
double PreviousMiddle
Definition: explicit_hamilton_scheme.hpp:984
double Current
Definition: explicit_hamilton_scheme.hpp:987
double Delta
Definition: explicit_hamilton_scheme.hpp:989
double Middle
Definition: explicit_hamilton_scheme.hpp:986