7 #ifndef __solve_SemiImplicit2D_h__ 8 #define __solve_SemiImplicit2D_h__ 14 #define PARTICLE_DEBUG 33 virtual void initialize(
sp<Scope> a_spScope);
35 virtual void prestep(
bool a_force_only);
36 virtual void step(t_solve_real a_timestep,
t_solve_v2 &a_totalConstraintForce);
38 virtual bool isForceOnly(
void) {
return m_force_only; }
40 virtual void setRayleighDamping(
bool a_flag) { m_rayleigh_damping = a_flag; }
41 virtual void setRayleighDamping(t_solve_real a_stiffness, t_solve_real a_mass)
43 m_rayleigh_stiffness = a_stiffness;
44 m_rayleigh_mass = -a_mass;
65 std::vector<Particle> &particles(
void) {
return m_particles; }
66 bool lookupIndex(
unsigned int &a_particle,
Record &r_particle);
68 class FE_DL_EXPORT CompileMatrix
75 typedef std::vector<t_ppBlock> t_dfdx_array;
76 typedef std::vector<t_ppBlock> t_dfdv_array;
77 typedef std::pair<t_dfdx_array, t_dfdv_array> t_entry;
78 typedef std::map<unsigned int, t_entry> t_row;
80 std::vector<t_row> m_rows;
83 void setRows(
unsigned int a_count);
84 unsigned int rows(
void);
85 t_row &row(
unsigned int a_index);
86 t_entry &entry(
unsigned int a_i,
89 typedef std::set<unsigned int> t_nonzero_set;
90 typedef std::vector< t_nonzero_set > t_nonzero_pattern;
92 void symbolicFill(
void);
96 typedef unsigned int t_size;
97 typedef std::pair<t_size, t_size> t_pair;
98 typedef std::vector<t_pair> t_pairs;
103 virtual ~Force(
void){}
105 virtual void clear(
void){}
106 virtual void accumulate(
void){}
107 virtual bool validate(
void){
return true; }
110 std::vector<Particle> &a_particles,
111 CompileMatrix &a_compileMatrix){}
117 virtual void addForce(
sp<Force> a_force,
bool a_add_damping=
false);
123 void reorder(std::vector<unsigned int> &a_order, t_pairs &a_pairs);
125 std::vector<Particle> m_particles;
128 AsSolverParticle m_asSolverParticle;
129 AsLineConstrained m_asLineConstrained;
130 AsPlaneConstrained m_asPlaneConstrained;
138 #ifdef PARTICLE_DEBUG 139 AsColored m_asColored;
141 AsForceFilter m_asForceFilter;
145 unsigned int m_n_sim;
146 std::vector< sp<Force> > m_forces_add_damping;
147 std::vector< sp<Force> > m_forces_as_is;
156 std::vector<t_solve_v2> m_rhs;
157 std::vector<t_solve_v2> m_dv;
158 std::vector<t_solve_v2> m_tmp;
160 std::map<FE_UWORD, unsigned int> m_recordToParticle;
162 t_solve_real m_dv2dxRatio;
163 t_solve_real m_dxImplicitness;
164 t_solve_real m_dvImplicitness;
166 t_solve_real m_ratio;
167 unsigned int m_subdivcnt;
168 unsigned int m_subdivsz;
169 t_solve_real m_subdivmult;
171 bool m_rayleigh_damping;
172 t_solve_real m_rayleigh_stiffness;
173 t_solve_real m_rayleigh_mass;
174 std::vector<t_solve_v2> m_perturb;
just a Component
Definition: AccessorSets.h:92
Heap-based support for classes participating in fe::ptr <>
Definition: Counted.h:35
kernel
Definition: namespace.dox:3
force application point
Definition: shapeAS.h:42
clear signal
Definition: solveAS.h:38
Special vector for color (RGBA)
Definition: Color.h:21
particle in physical space
Definition: shapeAS.h:58
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
Base class providing an fe::Handle to the derived class.
Definition: Handled.h:209
Semi Implicit time integration.
Definition: SemiImplicit2D.h:26
accumulate signal
Definition: solveAS.h:59