Free Electron
LinearBendForce.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2014 Free Electron Organization
2  Any use of this software requires a license. */
3 
4 /** @file */
5 
6 #ifndef __mechanics_LinearBendForce_h__
7 #define __mechanics_LinearBendForce_h__
8 
9 #include "signal/signal.h"
10 #include "datatool/datatool.h"
11 #include "shape/shape.h"
12 #include "solve/solve.h"
13 #include "solve/SemiImplicit.h"
14 #include "mechanicsAS.h"
15 
16 namespace fe
17 {
18 namespace ext
19 {
20 
21 class FE_DL_EXPORT LinearBendForce : public SemiImplicit::Force,
22  public CastableAs<LinearBendForce>
23 {
24  public:
25  LinearBendForce(sp<SemiImplicit> a_integrator);
26 virtual ~LinearBendForce(void);
27 virtual void clear(void);
28 virtual void accumulate(void);
29 virtual bool validate(void);
30 
31 virtual void compile( sp<RecordGroup> rg_input,
32  std::vector<SemiImplicit::Particle> &a_particles,
33  SemiImplicit::CompileMatrix &a_compileMatrix);
34 
35  private:
36  class FE_DL_EXPORT Element
37  {
38  public:
39  t_solve_real m_length;
40  t_solve_real m_alpha_A;
41  t_solve_real m_alpha_B;
42  t_solve_real m_alpha_C;
43  t_solve_real m_alpha_D;
44  t_solve_real m_lambda;
45  t_solve_real m_gamma;
46 
47  t_solve_v3 *m_location[4];
48  t_solve_v3 *m_velocity[4];
49  t_solve_v3 *m_force[4];
50 
51  t_solve_matrix m_dfdxAA;
52  t_solve_matrix m_dfdxAB;
53  t_solve_matrix m_dfdxAC;
54  t_solve_matrix m_dfdxAD;
55  t_solve_matrix m_dfdxBB;
56  t_solve_matrix m_dfdxBC;
57  t_solve_matrix m_dfdxBD;
58  t_solve_matrix m_dfdxCC;
59  t_solve_matrix m_dfdxCD;
60  t_solve_matrix m_dfdxDD;
61 
62  t_solve_matrix m_dfdvAA;
63  t_solve_matrix m_dfdvAB;
64  t_solve_matrix m_dfdvAC;
65  t_solve_matrix m_dfdvAD;
66  t_solve_matrix m_dfdvBB;
67  t_solve_matrix m_dfdvBC;
68  t_solve_matrix m_dfdvBD;
69  t_solve_matrix m_dfdvCC;
70  t_solve_matrix m_dfdvCD;
71  t_solve_matrix m_dfdvDD;
72 
73 
74  t_solve_matrix *m_p_dfdxAA;
75  t_solve_matrix *m_p_dfdxAB;
76  t_solve_matrix *m_p_dfdxAC;
77  t_solve_matrix *m_p_dfdxAD;
78  t_solve_matrix *m_p_dfdxBB;
79  t_solve_matrix *m_p_dfdxBC;
80  t_solve_matrix *m_p_dfdxBD;
81  t_solve_matrix *m_p_dfdxCC;
82  t_solve_matrix *m_p_dfdxCD;
83  t_solve_matrix *m_p_dfdxDD;
84 
85  t_solve_matrix *m_p_dfdvAA;
86  t_solve_matrix *m_p_dfdvAB;
87  t_solve_matrix *m_p_dfdvAC;
88  t_solve_matrix *m_p_dfdvAD;
89  t_solve_matrix *m_p_dfdvBB;
90  t_solve_matrix *m_p_dfdvBC;
91  t_solve_matrix *m_p_dfdvBD;
92  t_solve_matrix *m_p_dfdvCC;
93  t_solve_matrix *m_p_dfdvCD;
94  t_solve_matrix *m_p_dfdvDD;
95  };
96 
97  hp<SemiImplicit> m_integrator;
98 
99  std::vector<Element> m_elements;
100 };
101 
102 } /* namespace */
103 } /* namespace */
104 
105 
106 #endif /* __mechanics_LinearBendForce_h__ */
kernel
Definition: namespace.dox:3