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.
adams_bashforth_strategy.h
Go to the documentation of this file.
1 //
2 // Author:
3 // Guillermo Casas gcasas@cimne.upc.edu
4 //
5 #if !defined(KRATOS_ADAMS_BASHFORTH_STRATEGY)
6 #define KRATOS_ADAMS_BASHFORTH_STRATEGY
7 
8 // /* External includes */
9 
10 // System includes
11 
12 // Project includes
13 #include "utilities/timer.h"
15 #include "includes/variables.h"
17 
18 /* System includes */
19 #include <limits>
20 #include <iostream>
21 #include <iomanip>
22 #include <time.h>
23 
24 /* External includes */
25 #ifdef _OPENMP
26 #include <omp.h>
27 #endif
28 
29 #define CUSTOMTIMER 0 // ACTIVATES AND DISABLES ::TIMER:::::
30 
31 /* Project includes */
32 #include "includes/define.h"
33 #include "utilities/openmp_utils.h"
34 #include "includes/model_part.h"
36 
37 #ifdef USING_CGAL
38 #include <CGAL/spatial_sort.h>
39 #endif
40 
41 /* Timer defines */
42 #ifdef CUSTOMTIMER
43 #define KRATOS_TIMER_START(t) Timer::Start(t);
44 #define KRATOS_TIMER_STOP(t) Timer::Stop(t);
45 #else
46 #define KRATOS_TIMER_START(t)
47 #define KRATOS_TIMER_STOP(t)
48 #endif
49 
50 namespace Kratos {
51 
52  class KRATOS_API(SWIMMING_DEM_APPLICATION) AdamsBashforthStrategy: public ExplicitSolverStrategy {
53  public:
54 
63 
64  using BaseType::mpInlet_model_part;
65  using BaseType::mpCluster_model_part;
66  using BaseType::mpContact_model_part;
67  using BaseType::GetModelPart;
68  using BaseType::GetFemModelPart;
69  using BaseType::mNumberOfThreads;
70  using BaseType::mListOfSphericParticles;
71  using BaseType::mListOfGhostSphericParticles;
72  using BaseType::SearchNeighbours;
73  using BaseType::SetSearchRadiiOnAllParticles;
76 
78 
80  const double max_delta_time,
81  const int n_step_search,
82  const double safety_factor,
83  const int delta_option,
84  ParticleCreatorDestructor::Pointer p_creator_destructor,
85  DEM_FEM_Search::Pointer p_dem_fem_search,
86  SpatialSearch::Pointer pSpSearch,
87  Parameters strategy_parameters):
88  ExplicitSolverStrategy(settings,
89  max_delta_time,
90  n_step_search,
92  delta_option,
93  p_creator_destructor,
94  p_dem_fem_search,
95  pSpSearch,
96  strategy_parameters)
97  {
98  mFirstStep = true;
100  }
103 
104  double SolveSolutionStep() override;
105 
106  protected:
107 
108  void ReconstructForces(ModelPart& r_model_part);
109 
110  private:
111  bool mFirstStep;
112  }; // Class AdamsBashforthStrategy
113 } // namespace Kratos.
114 
115 #endif // KRATOS_ADAMS_BASHFORTH_STRATEGY defined
Definition: adams_bashforth_strategy.h:52
GlobalPointersVector< Element >::iterator ParticleWeakIteratorType
Definition: adams_bashforth_strategy.h:61
AdamsBashforthStrategy()
Definition: adams_bashforth_strategy.h:77
ParticleWeakVectorType::ptr_iterator ParticleWeakIteratorType_ptr
Definition: adams_bashforth_strategy.h:62
ExplicitSolverStrategy BaseType
Definition: adams_bashforth_strategy.h:55
BaseType::ElementsIterator ElementsIterator
Definition: adams_bashforth_strategy.h:58
AdamsBashforthStrategy(ExplicitSolverSettings &settings, const double max_delta_time, const int n_step_search, const double safety_factor, const int delta_option, ParticleCreatorDestructor::Pointer p_creator_destructor, DEM_FEM_Search::Pointer p_dem_fem_search, SpatialSearch::Pointer pSpSearch, Parameters strategy_parameters)
Definition: adams_bashforth_strategy.h:79
BaseType::NodesArrayType NodesArrayType
Definition: adams_bashforth_strategy.h:56
BaseType::ElementsArrayType ElementsArrayType
Definition: adams_bashforth_strategy.h:57
BaseType::ConditionsArrayType ConditionsArrayType
Definition: adams_bashforth_strategy.h:59
KRATOS_CLASS_POINTER_DEFINITION(AdamsBashforthStrategy)
Pointer definition of AdamsBashforthStrategy.
GlobalPointersVector< Element > ParticleWeakVectorType
Definition: adams_bashforth_strategy.h:60
virtual ~AdamsBashforthStrategy()
Destructor.
Definition: adams_bashforth_strategy.h:102
Definition: explicit_solver_strategy.h:54
Definition: explicit_solver_strategy.h:70
ModelPart::ElementsContainerType ElementsArrayType
Definition: explicit_solver_strategy.h:74
ModelPart::NodesContainerType NodesArrayType
Definition: explicit_solver_strategy.h:73
ElementsArrayType::iterator ElementsIterator
Definition: explicit_solver_strategy.h:75
ParticleCreatorDestructor::Pointer & GetParticleCreatorDestructor()
Definition: explicit_solver_strategy.h:272
ModelPart::ConditionsContainerType ConditionsArrayType
Definition: explicit_solver_strategy.h:76
typename TContainerType::iterator ptr_iterator
Definition: global_pointers_vector.h:85
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
safety_factor
Definition: edgebased_PureConvection.py:110