-
Notifications
You must be signed in to change notification settings - Fork 1
/
bending.h
40 lines (36 loc) · 1.12 KB
/
bending.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <FronTier.h>
#include "spring_solver.h"
class BendingForce: public SpringSolver::ExtForceInterface
{
void calculateBendingForce3d2003(POINT* p1, TRI* t1, TRI* t2);
void calculateBendingForce3d2006(POINT* p1, TRI* t1, TRI* t2);
void calculateBendingForce3dparti(POINT*, TRI*, TRI*);
INTERFACE* intfc;
// bend stiffness
double bends;
// bend damping
double bendd;
// specify which method to be used
// 0: 2003
// 1: 2006
// 2: particle
// default particle
int index;
void clear_surf_point_force(SURFACE*);
static const int num = 3;
// pointer to member function
void (BendingForce::*method[num])(POINT*,TRI*, TRI*);
public:
double* getExternalForce(SpringVertex* sv);
void computeExternalForce();
void getParaFromFile(const char*);
double& getBendStiff() { return bends; }
double& getBendDamp() { return bendd; }
int methodIndex() { return index; }
BendingForce(INTERFACE* _intfc, double s = 0.01, double d = 0.0);
static double calOriLeng(int, int, TRI*, TRI*);
};
/*
class particleBending : public BendingForce {
}
*/