Debian Codegraph @

add_ons/albertasystems/Elast/Common/phase_elast.hh

raw
1 #ifndef __phase_elast_hh
2 #define __phase_elast_hh
3
4 #include <alberta.h>
5 #include "newalberta.hh"
6 //phase.hh muss vorher includet werden
7 /****************************************************************************/
8
9 #define N_MESHES 1
10 #define MESH_HEAT 0
11 #define MESH_ELAST 0
12 #if N_MESHES==1
13 #define MESH_PHASE 0
14 #else
15 #define MESH_PHASE 1
16 #endif
17
18 /****************************************************************************/
19 /* use compact storage for deviator (symmetric, trace=0) */
20 #if DIM==2
21 #define TRIP_DIM 2
22 #else
23 #if DIM==3
24 #define TRIP_DIM 5
25 #endif
26 #endif
27 //#define NROFDOMS 4
28 #define LATENT_HEAT 1 //jetzt in phase
29 #define LATENT_MARTENSITE 2
30 //extern int nrofphases;
31 //#define ALPHA 0
32 //#define SMALL 1
33 //#define BETA 2
34 //#define GAMMA 3
35 //#define C_SIGMA 4
36 #if 0
37 #if DIM == 1
38 #define h2_from_det(det) ((det)*(det))
39 #endif
40 #if DIM == 2
41 #define h2_from_det(det) (det)
42 #endif
43 #if DIM == 3
44 #define h2_from_det(det) pow((det), 2.0/3.0)
45 #endif
46 #endif
47
48 typedef struct prob_data PROB_DATA;
49
50 struct prob_data {
51 REAL t_start, t_end, dt, dt_max;
52 REAL_D *(*anisotropy)(const REAL_D grd); /* anisotropy function */
53 /* returns matrix D2(A(grd)) */
54 /*sollte man wahrscheinlich auch entsprechend oben buendeln*/
55 const REAL *(*u_0)(const REAL_D x, REAL_D u);
56 const REAL *(*fu)(const REAL_D x, REAL t, REAL_D);
57 const REAL *(*gu_D)(const REAL_D x, REAL t, REAL_D);
58 const REAL *(*gu_N)(const REAL_D x, REAL t, S_CHAR bound, REAL_D);
59
60 const REAL *(*u_ex)(const REAL_D x,REAL_D u );
61 const REAL_D *(*grd_u_ex)(const REAL_D x, REAL_DD);/*Kompatibel m H1_err_d */
62
63 REAL mu;
64 REAL lambda;
65 REAL mu_lambda_scale;
66
67 REAL rho;
68
69 REAL th_a;
70 REAL th_m;
71 REAL (*elast_rhs_th)(REAL th, REAL a, REAL p, REAL m);
72 REAL (*elast_rhs_rho)(REAL th, REAL a, REAL p, REAL m);
73 REAL *(*grd_elast_rhs_th)(REAL th, REAL a, REAL p, REAL m,
74 REAL *grd_th, REAL *grd_a,
75 REAL *grd_p, REAL *grd_m);
76 REAL *(*grd_elast_rhs_rho)(REAL th, REAL a, REAL p, REAL m,
77 REAL *grd_th, REAL *grd_a,
78 REAL *grd_p, REAL *grd_m);
79
80 REAL trip_Kappa;
81 REAL_D *(*e_ex)(REAL t);
82 REAL *(*e_trip)(REAL t);
83
84 };
85
86 /****************************************************************************/
87
88
89 /****lin_sys: jetzt in PE_elast.h definiert****/
90 struct elast_info
91 {
92 REAL_D Lambda[DIM+1];
93 REAL det;
94
95 REAL lambda_2mu_det, mu_det, lambda_det;
96 REAL lambda3_mu2_det, lambda_mu23_det;
97
98 const DOF_REAL_VEC *th_h, *m_h;
99 const DOF_REAL_VEC /* **p_h*/ *p_h;
100
101 const QUAD_FAST *quad_fast_u, *quad_fast_th,*quad_fast_pm;
102 };
103
104 /****************************************************************************/
105
106 struct PE_leaf_data
107 {
108 REAL estimate_elast; /* one real for the estimate */
109 REAL est_c_elast; /* one real for the coarsening estimate */
110 U_CHAR mark; /* needed for special refinement ???? */
111 };
112
113 const QUAD *get_lumping_quadrature(int dim);
114
115 /*src/Common/adapt.c----------------------------------------------------------------------*/
116
117 /*int marking(MESH *mesh, ADAPT_STAT *adapt);*/
118 extern U_CHAR okmarking(MESH *mesh, ADAPT_STAT *adapt);
119
120 /****************************************************************************/
121 #endif