Free Electron
SemiImplicitInertial.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __solve_SemiImplicitInertial_h__
8 #define __solve_SemiImplicitInertial_h__
9 
10 #include "signal/signal.h"
11 #include "datatool/datatool.h"
12 #include "shape/shape.h"
13 //#include "mechanics/mechanics.h"
14 
15 namespace fe
16 {
17 namespace ext
18 {
19 
20 /** Semi Implicit time integration
21 
22  @copydoc SemiImplicitInertial_info
23  */
24 class FE_DL_EXPORT SemiImplicitInertial:
25  virtual public HandlerI,
26  virtual public Config,
27  public Initialize<SemiImplicitInertial>
28 {
29  public:
31 virtual ~SemiImplicitInertial(void);
32 virtual void initialize(void);
33 
34  // AS HandlerI
35 virtual void handleBind(sp<SignalerI> spSignaler,
36  sp<Layout> l_sig);
37 virtual void handle(Record &r_sig);
38 
39  private:
40  AsParticle m_asParticle;
41  AsSolverParticle m_asSolverParticle;
42  AsLineConstrained m_asLineConstrained;
43  AsPlaneConstrained m_asPlaneConstrained;
44  AsBodyPoint m_asBodyPoint;
45  AsComponent m_asComponent;
46  AsForcePoint m_asForcePoint;
47  AsTemporal m_asTemporal;
48  AsValidate m_asValidate;
49  AsAccumulate m_asAccumulate;
50  AsClear m_asClear;
51  AsUpdate m_asUpdate;
52  AsForceFilter m_asForceFilter;
53  hp<SignalerI> m_hpSignaler;
54  sp<Scope> m_spScope;
55  Record r_clear;
56  Record r_accum;
57  Record r_validate;
58  Record r_update;
59 
60  SystemTicker m_ticker;
61 
62  class Cache
63  {
64  public:
65  Cache(void)
66  {
67  }
70  };
71 
75  BlockDiagonalPreconditioner<Real> m_preconditioner;
76  BlockPCG<Real> m_solver;
77  std::vector<SpatialVector> m_rhs;
78  std::vector<SpatialVector> m_dv;
79  std::vector<SpatialVector> m_tmp;
80 
81  typedef std::map< sp<RecordGroup>, Cache > t_cache;
82  t_cache m_cache;
83 
84  Real m_dv2dxRatio;
85  Real m_dxImplicitness;
86  Real m_dvImplicitness;
87 
88  Real m_ratio;
89  unsigned int m_subdivcnt;
90  unsigned int m_subdivsz;
91  Real m_subdivmult;
92 
93  void clear(sp<RecordGroup> rg_input, Real a_timestep);
94  void accumulate(sp<RecordGroup> rg_input, Real a_timestep);
95  void step(sp<RecordGroup> rg_input, Real a_timestep,
96  std::vector<Record> &r_particles,
97  SpatialVector &a_totalConstraintForce);
98  bool validate(sp<RecordGroup> rg_input, Real a_timestep);
99 };
100 
101 } /* namespace ext */
102 } /* namespace fe */
103 
104 
105 #endif /* __solve_SemiImplicitInertial_h__ */
106 
Convienience base class for specification and use of path accessors.
Definition: Config.h:19
just a Component
Definition: AccessorSets.h:92
kernel
Definition: namespace.dox:3
force application point
Definition: shapeAS.h:42
Per-class participation in the Initialized <> mechanism.
Definition: Initialized.h:117
clear signal
Definition: solveAS.h:38
Interface to handle signals from an SignalerI.
Definition: HandlerI.h:22
particle in physical space
Definition: shapeAS.h:58
High precision timer.
Definition: SystemTicker.h:174
Time-based Operator.
Definition: datatoolAS.h:73
validate signal
Definition: solveAS.h:80
update state signal
Definition: solveAS.h:97
Reference to an instance of a Layout.
Definition: RecordSB.h:35
Semi Implicit time integration.
Definition: SemiImplicitInertial.h:24
accumulate signal
Definition: solveAS.h:59