-
Notifications
You must be signed in to change notification settings - Fork 0
/
tetra1_marker.h
executable file
·87 lines (77 loc) · 1.78 KB
/
tetra1_marker.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/*
ver.03.03
file tetra1_marker.h
*/
#pragma once
#include "common.h"
#include "tetra1.h"
#include "tetra1_up.hpp"
#include "marker.h"
#include "face.h"
class Tetra1_marker:virtual public Tetra1,virtual public Element_marker{
public:
Tetra1_marker(
int* node_index,
Node* raw_nodes,
Default_material* material
);
virtual ~Tetra1_marker(){};
//from Tetra1
void update_loadstep(void);
void update_iteration(void);
void calcK(Sparse& K){
Tetra1::calcK(K);
calcK_c(K);
calcK_sigma(K);
#ifdef ALPHA
calcK_alpha(K);
#endif
#ifdef MASS
calcK_mass(K);
#endif
};
void calcT(MATRIX& T){
Tetra1::calcT(T);
calcT_unique(T);
};
void calcT_unique(MATRIX& T);
void calcK_mass(Sparse& K);
void calcT_mass(MATRIX& T);
//from Element_marker
void move_markers(void);
bool isInside(double x[3]);
bool isInside(Face& face);
void calcVolume(void);
//others
bool isCut(void){
if(0<m_weight && m_weight<1.-ABFEM::CONSTANTS::g_eps && vmarker.size())
return true;
else
return false;
};
double get_weight(void)const{
return m_weight;
};
double get_volume(void)const{
return m_weight*m_Volume;
};
//issue11
bool effective_flag;
unsigned get_effective_flag(void)const{return effective_flag;};
protected:
void update_markers(void);
private:
const static double m_geo_eps;
const static double m_diffuse;
const static double m_mass_coef;
const static int m_VP_div=ABFEM::CONSTANTS::g_VP_div;
const static int m_num_VP=(m_VP_div-3)*(m_VP_div-2)*(m_VP_div-1)/6;
void calcK_alpha(Sparse& K);
void calcK_c(Sparse& K);
void calcK_sigma(Sparse& K);
void getVolumeCoor(double dest[m_num_nodes],double x[3]);
const static int m_surface_node_index[m_num_nodes][m_dim];
Face m_Face[m_num_nodes];
Node* m_surface_nodes[m_num_nodes][m_dim];
double m_shape_weight[m_num_nodes];
};