3 #ifndef COMPUTESTRESS_MECHANICS_H 4 #define COMPUTESTRESS_MECHANICS_H 6 #include "../../../include/matrixFreePDE.h" 46 void computeStress(
const dealii::Table<2, double>& CIJ,
const dealii::VectorizedArray<double> strain[][dim], dealii::VectorizedArray<double> R[][dim]){
48 dealii::VectorizedArray<double> S[6], E[6];
49 E[0]=strain[0][0]; E[1]=strain[1][1]; E[2]=strain[2][2];
51 E[3]=strain[1][2]+strain[2][1];
52 E[4]=strain[0][2]+strain[2][0];
53 E[5]=strain[0][1]+strain[1][0];
54 for (
unsigned int i=0; i<6; i++){
56 for (
unsigned int j=0; j<6; j++){
60 R[0][0]=S[0]; R[1][1]=S[1]; R[2][2]=S[2];
61 R[1][2]=S[3]; R[0][2]=S[4]; R[0][1]=S[5];
62 R[2][1]=S[3]; R[2][0]=S[4]; R[1][0]=S[5];
86 dealii::VectorizedArray<double> S[3], E[3];
87 E[0]=strain[0][0]; E[1]=strain[1][1];
89 E[2]=strain[0][1]+strain[1][0];
90 for (
unsigned int i=0; i<3; i++){
92 for (
unsigned int j=0; j<3; j++){
96 R[0][0]=S[0]; R[1][1]=S[1];
97 R[0][1]=S[2]; R[1][0]=S[2];
100 dealii::VectorizedArray<double> S[1], E[1];
110 void computeStress(
const dealii::VectorizedArray<double> CIJ[2*dim-1+dim/3][2*dim-1+dim/3],
const dealii::VectorizedArray<double> strain[][dim], dealii::VectorizedArray<double> R[][dim]){
112 dealii::VectorizedArray<double> S[6], E[6];
113 E[0]=strain[0][0]; E[1]=strain[1][1]; E[2]=strain[2][2];
115 E[3]=strain[1][2]+strain[2][1];
116 E[4]=strain[0][2]+strain[2][0];
117 E[5]=strain[0][1]+strain[1][0];
118 for (
unsigned int i=0; i<6; i++){
120 for (
unsigned int j=0; j<6; j++){
121 S[i]+=CIJ[i][j]*E[j];
124 R[0][0]=S[0]; R[1][1]=S[1]; R[2][2]=S[2];
125 R[1][2]=S[3]; R[0][2]=S[4]; R[0][1]=S[5];
126 R[2][1]=S[3]; R[2][0]=S[4]; R[1][0]=S[5];
129 dealii::VectorizedArray<double> S[3], E[3];
130 E[0]=strain[0][0]; E[1]=strain[1][1];
132 E[2]=strain[0][1]+strain[1][0];
133 for (
unsigned int i=0; i<3; i++){
135 for (
unsigned int j=0; j<3; j++){
136 S[i]+=CIJ[i][j]*E[j];
139 R[0][0]=S[0]; R[1][1]=S[1];
140 R[0][1]=S[2]; R[1][0]=S[2];
143 dealii::VectorizedArray<double> S[1], E[1];
153 void computeStress(
const dealii::Tensor<2, 2*dim-1+dim/3, dealii::VectorizedArray<double> >& CIJ,
const dealii::VectorizedArray<double> strain[][dim], dealii::VectorizedArray<double> R[][dim]){
155 dealii::VectorizedArray<double> S[6], E[6];
156 E[0]=strain[0][0]; E[1]=strain[1][1]; E[2]=strain[2][2];
158 E[3]=strain[1][2]+strain[2][1];
159 E[4]=strain[0][2]+strain[2][0];
160 E[5]=strain[0][1]+strain[1][0];
161 for (
unsigned int i=0; i<6; i++){
163 for (
unsigned int j=0; j<6; j++){
164 S[i]+=CIJ[i][j]*E[j];
167 R[0][0]=S[0]; R[1][1]=S[1]; R[2][2]=S[2];
168 R[1][2]=S[3]; R[0][2]=S[4]; R[0][1]=S[5];
169 R[2][1]=S[3]; R[2][0]=S[4]; R[1][0]=S[5];
172 dealii::VectorizedArray<double> S[3], E[3];
173 E[0]=strain[0][0]; E[1]=strain[1][1];
175 E[2]=strain[0][1]+strain[1][0];
176 for (
unsigned int i=0; i<3; i++){
178 for (
unsigned int j=0; j<3; j++){
179 S[i]+=CIJ[i][j]*E[j];
182 R[0][0]=S[0]; R[1][1]=S[1];
183 R[0][1]=S[2]; R[1][0]=S[2];
186 dealii::VectorizedArray<double> S[1], E[1];
196 void computeStress(
const dealii::Tensor<2, 2*dim-1+dim/3, dealii::VectorizedArray<double> >& CIJ,
const dealii::Tensor<2, dim, dealii::VectorizedArray<double> > strain, dealii::Tensor<2, dim, dealii::VectorizedArray<double> >& R){
198 dealii::Tensor<1, 2*dim-1+dim/3, dealii::VectorizedArray<double> > S, E;
201 E[0]=strain[0][0]; E[1]=strain[1][1]; E[2]=strain[2][2];
203 E[3]=strain[1][2]+strain[2][1];
204 E[4]=strain[0][2]+strain[2][0];
205 E[5]=strain[0][1]+strain[1][0];
210 R[0][0]=S[0]; R[1][1]=S[1]; R[2][2]=S[2];
211 R[1][2]=S[3]; R[0][2]=S[4]; R[0][1]=S[5];
212 R[2][1]=S[3]; R[2][0]=S[4]; R[1][0]=S[5];
215 E[0]=strain[0][0]; E[1]=strain[1][1];
217 E[2]=strain[0][1]+strain[1][0];
222 R[0][0]=S[0]; R[1][1]=S[1];
223 R[0][1]=S[2]; R[1][0]=S[2];
227 R[0][0]=CIJ[0][0]*strain[0][0];
233 void computeStress(
const dealii::Table<2, double>& CIJ,
const dealii::Tensor<2, dim, dealii::VectorizedArray<double> >& strain, dealii::Tensor<2, dim, dealii::VectorizedArray<double> >& R){
235 dealii::VectorizedArray<double> S[6], E[6];
236 E[0]=strain[0][0]; E[1]=strain[1][1]; E[2]=strain[2][2];
238 E[3]=strain[1][2]+strain[2][1];
239 E[4]=strain[0][2]+strain[2][0];
240 E[5]=strain[0][1]+strain[1][0];
241 for (
unsigned int i=0; i<6; i++){
243 for (
unsigned int j=0; j<6; j++){
247 R[0][0]=S[0]; R[1][1]=S[1]; R[2][2]=S[2];
248 R[1][2]=S[3]; R[0][2]=S[4]; R[0][1]=S[5];
249 R[2][1]=S[3]; R[2][0]=S[4]; R[1][0]=S[5];
252 dealii::VectorizedArray<double> S[3], E[3];
253 E[0]=strain[0][0]; E[1]=strain[1][1];
255 E[2]=strain[0][1]+strain[1][0];
256 for (
unsigned int i=0; i<3; i++){
258 for (
unsigned int j=0; j<3; j++){
259 S[i]+=CIJ[i][j]*E[j];
262 R[0][0]=S[0]; R[1][1]=S[1];
263 R[0][1]=S[2]; R[1][0]=S[2];
266 dealii::VectorizedArray<double> S[1], E[1];
void computeStress(const dealii::Table< 2, double > &CIJ, const dealii::VectorizedArray< double > strain[][dim], dealii::VectorizedArray< double > R[][dim])