suanPan
ExternalMaterialData.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright (C) 2017-2024 Theodore Chang
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  ******************************************************************************/
29 #ifndef EXTERNALMATERIALDATA_H
30 #define EXTERNALMATERIALDATA_H
31 
33  /*allocate memory, initialise variables based on parameters defined by users*/
34  ALLOCATE = 0,
35  /*deallocate memory that is previously allocated in operation *info=ALLOCATE*/
37  /*update material state based on new trial strain only*/
39  /*update material state based on new trial strain and new trial strain rate*/
41  /*commit trial state to current state*/
42  COMMIT = 4,
43  /*reset trial state to current state*/
44  RESET = 5,
45  /*clear both current and trial state to zero*/
46  CLEAR = 6,
47  /*validate if the model parameters are legal*/
48  VALIDATE = 7
49 };
50 
52  unsigned size = 0; // indicate the dimension of material
53  unsigned constant_size = 0; // indicate the number of constants
54 
55  int c_strain = -1; // current status
56  int c_strain_rate = -1; // current status
57  int c_stress = -1; // current status
58 
59  int t_strain = -1; // trial status
60  int t_strain_rate = -1; // trial status
61  int t_stress = -1; // trial status
62 
63  int c_history = -1; // current status
64  int c_stiffness = -1; // stiffness matrix
65  int c_damping = -1; // damping matrix
66 
67  int t_history = -1; // trial status
68  int t_stiffness = -1; // stiffness matrix
69  int t_damping = -1; // damping matrix
70 
71  int i_history = -1; // initial status
72  int i_stiffness = -1; // stiffness matrix
73  int i_damping = -1; // damping matrix
74 
75  double density = 0.;
76 
77  double* pool = nullptr; // stores states, should be allocated by dll
78  double* constant = nullptr; // stores model constants, should be allocated by main exe
79 };
80 
81 #endif
82 
ExternalMaterialOp
Definition: ExternalMaterialData.h:32
@ ALLOCATE
Definition: ExternalMaterialData.h:34
@ COMMIT
Definition: ExternalMaterialData.h:42
@ CLEAR
Definition: ExternalMaterialData.h:46
@ STATIC_UPDATE
Definition: ExternalMaterialData.h:38
@ RESET
Definition: ExternalMaterialData.h:44
@ DEALLOCATE
Definition: ExternalMaterialData.h:36
@ DYNAMIC_UPDATE
Definition: ExternalMaterialData.h:40
@ VALIDATE
Definition: ExternalMaterialData.h:48
A ExternalMaterialData class.
Definition: ExternalMaterialData.h:51
int t_stiffness
Definition: ExternalMaterialData.h:68
unsigned size
Definition: ExternalMaterialData.h:52
int i_stiffness
Definition: ExternalMaterialData.h:72
int c_strain_rate
Definition: ExternalMaterialData.h:56
int c_stiffness
Definition: ExternalMaterialData.h:64
int t_strain_rate
Definition: ExternalMaterialData.h:60
int c_stress
Definition: ExternalMaterialData.h:57
int c_damping
Definition: ExternalMaterialData.h:65
int t_strain
Definition: ExternalMaterialData.h:59
double density
Definition: ExternalMaterialData.h:75
int c_history
Definition: ExternalMaterialData.h:63
int t_stress
Definition: ExternalMaterialData.h:61
int c_strain
Definition: ExternalMaterialData.h:55
int i_damping
Definition: ExternalMaterialData.h:73
double * constant
Definition: ExternalMaterialData.h:78
unsigned constant_size
Definition: ExternalMaterialData.h:53
int t_damping
Definition: ExternalMaterialData.h:69
int i_history
Definition: ExternalMaterialData.h:71
int t_history
Definition: ExternalMaterialData.h:67
double * pool
Definition: ExternalMaterialData.h:77