Trilinos based (stochastic) FEM solvers
asmeSBVP.hpp
Go to the documentation of this file.
1 /*
2 Brian Staber (brian.staber@gmail.com)
3 */
4 
5 #ifndef ASMESBVP_HPP
6 #define ASMESBVP_HPP
7 
9 #include "tensor_calculus.hpp"
10 #include "linearizedElasticity.hpp"
11 
13 {
14 public:
15 
16  asmeSBVP(Epetra_Comm & comm, Teuchos::ParameterList & Parameters){
17 
18  Krylov = &Parameters.sublist("Krylov");
19 
20  std::string mesh_file = Teuchos::getParameter<std::string>(Parameters.sublist("Mesh"), "mesh_file");
21  Mesh = new mesh(comm, mesh_file, 1.0);
22  Comm = Mesh->Comm;
23 
24  StandardMap = new Epetra_Map(-1,3*Mesh->n_local_nodes_without_ghosts,&Mesh->local_dof_without_ghosts[0],0,*Comm);
25  OverlapMap = new Epetra_Map(-1,3*Mesh->n_local_nodes,&Mesh->local_dof[0],0,*Comm);
26  ImportToOverlapMap = new Epetra_Import(*OverlapMap,*StandardMap);
28 
30  for (unsigned int e=0; e<Mesh->n_cells/32; ++e){
31  for (unsigned int j=0; j<32; ++j){
32  phase.push_back(j);
33  }
34  }
35 
36  int order = Teuchos::getParameter<int>(Parameters.sublist("Shinozuka"), "order");
37  double L1 = Teuchos::getParameter<double>(Parameters.sublist("Shinozuka"), "lx");
38  double L2 = Teuchos::getParameter<double>(Parameters.sublist("Shinozuka"), "ly");
39  double L3 = Teuchos::getParameter<double>(Parameters.sublist("Shinozuka"), "lz");
40 
41  GRF_Generator = Teuchos::rcp(new shinozuka_layeredcomp(order,L1,L2,L3));
42 
43  solution = new Epetra_Vector(*StandardMap);
44  }
45 
47  }
48 
49  Epetra_SerialDenseVector get_neumannBc(Epetra_SerialDenseMatrix & matrix_X, Epetra_SerialDenseMatrix & xg, unsigned int & gp){
50  std::cout << "Not using this method in this application.\n";
51  Epetra_SerialDenseVector f(3);
52  return f;
53  }
54  Epetra_SerialDenseVector get_forcing(double & x1, double & x2, double & x3, unsigned int & e_lid, unsigned int & gp){
55  std::cout << "Not using this method in this application.\n";
56  Epetra_SerialDenseVector f(3);
57  return f;
58  }
59 
60  void solveOneRealization(double & bcDisp, int * seeds){
61 
62  Epetra_SerialDenseVector w1_shino(Mesh->n_local_cells*Mesh->n_gauss_cells);
63  Epetra_SerialDenseVector w2_shino(Mesh->n_local_cells*Mesh->n_gauss_cells);
64  Epetra_SerialDenseVector w3_shino(Mesh->n_local_cells*Mesh->n_gauss_cells);
65  Epetra_SerialDenseVector w4_shino(Mesh->n_local_cells*Mesh->n_gauss_cells);
66  Epetra_SerialDenseVector w5_shino(Mesh->n_local_cells*Mesh->n_gauss_cells);
67 
73 
74  GRF_Generator->rng.seed(seeds[0]);
75  GRF_Generator->generator_gauss_points(w1_shino,*Mesh,phase);
76 
77  GRF_Generator->rng.seed(seeds[1]);
78  GRF_Generator->generator_gauss_points(w2_shino,*Mesh,phase);
79 
80  GRF_Generator->rng.seed(seeds[2]);
81  GRF_Generator->generator_gauss_points(w3_shino,*Mesh,phase);
82 
83  GRF_Generator->rng.seed(seeds[3]);
84  GRF_Generator->generator_gauss_points(w4_shino,*Mesh,phase);
85 
86  GRF_Generator->rng.seed(seeds[4]);
87  GRF_Generator->generator_gauss_points(w5_shino,*Mesh,phase);
88 
89  double deltaN = 0.0970;
90  double deltaM4 = 0.0461;
91  double deltaM5 = 0.0952;
92  double alpha; double beta = 1.0;
93  double Psi1, Psi2;
94 
95  for (unsigned int i=0; i<w1_shino.Length(); ++i){
96 
97  alpha = 3.0/(2.0*deltaN*deltaN); beta = 1.0;
98  Psi1 = icdf_gamma(w1_shino(i),alpha,beta);
99  m1(i) = (deltaN*deltaN/3.0)*2.0*Psi1;
100 
101  alpha = 3.0/(2.0*deltaN*deltaN) - 1.0/2.0;
102  Psi2 = icdf_gamma(w2_shino(i),alpha,beta);
103  m2(i) = (deltaN*deltaN/3.0)*( 2.0*Psi2 + w3_shino(i)*w3_shino(i) );
104 
105  m3(i) = (deltaN*deltaN/3.0)*std::sqrt(2.0*Psi1)*w3_shino(i);
106 
107  alpha = 1.0/(deltaM4*deltaM4); beta = 1.0*deltaM4*deltaM4;
108  m4(i) = icdf_gamma(w4_shino(i),alpha,beta);
109  alpha = 1.0/(deltaM5*deltaM5); beta = 1.0*deltaM5*deltaM5;
110  m5(i) = icdf_gamma(w5_shino(i),alpha,beta);
111 
112  }
113 
114  Epetra_FECrsMatrix linearOperator(Copy,*FEGraph);
115  Epetra_FEVector rhs(*StandardMap);
116  Epetra_Vector lhs(*StandardMap);
117 
118  rhs.PutScalar(0.0);
119  lhs.PutScalar(0.0);
120 
122  apply_dirichlet_conditions(linearOperator,rhs,bcDisp);
123 
124  Epetra_LinearProblem problem;
125  AztecOO solver;
126 
127  problem.SetOperator(&linearOperator);
128  problem.SetLHS(&lhs);
129  problem.SetRHS(&rhs);
130  solver.SetProblem(problem);
131  solver.SetParameters(*Krylov);
132 
133  solver.Iterate(2000,1e-6);
134 
135  *solution = lhs;
136 
137  }
138 
139  double icdf_gamma(double & w, double & alpha, double & beta){
140  double erfx = boost::math::erf<double>(w/std::sqrt(2.0));
141  double y = (1.0/2.0)*(1.0 + erfx);
142  double yinv = boost::math::gamma_p_inv<double,double>(alpha,y);
143  double z = yinv*beta;
144  return z;
145  }
146 
148  n_bc_dof = 0;
149  int dof = 1;
150  double coord;
151  unsigned int node;
152  for (unsigned int i=0; i<Mesh->n_local_nodes_without_ghosts; ++i){
153  node = Mesh->local_nodes[i];
154  coord = Mesh->nodes_coord[3*node+dof];
155  if(coord==0.0){
156  n_bc_dof+=3;
157  }
158  if(coord==25.0){
159  n_bc_dof+=3;
160  }
161  }
162 
163  int indbc = 0;
164  dof_on_boundary = new int [n_bc_dof];
165  for (unsigned int inode=0; inode<Mesh->n_local_nodes_without_ghosts; ++inode){
166  node = Mesh->local_nodes[inode];
167  coord = Mesh->nodes_coord[3*node+dof];
168  if (coord==0.0){
169  dof_on_boundary[indbc+0] = 3*inode+0;
170  dof_on_boundary[indbc+1] = 3*inode+1;
171  dof_on_boundary[indbc+2] = 3*inode+2;
172  indbc+=3;
173  }
174  if (coord==25.0){
175  dof_on_boundary[indbc+0] = 3*inode+0;
176  dof_on_boundary[indbc+1] = 3*inode+dof;
177  dof_on_boundary[indbc+2] = 3*inode+2;
178  indbc+=3;
179  }
180  }
181  }
182 
183  void apply_dirichlet_conditions(Epetra_FECrsMatrix & K, Epetra_FEVector & F, double & displacement){
184  //if (n_bc_dof>0){
185  Epetra_MultiVector v(*StandardMap,true);
186  v.PutScalar(0.0);
187 
188  int node;
189  int dof = 1;
190  double coord;
191  for (unsigned int inode=0; inode<Mesh->n_local_nodes_without_ghosts; ++inode){
192  node = Mesh->local_nodes[inode];
193  coord = Mesh->nodes_coord[3*node+dof];
194  if (coord==25.0){
195  v[0][StandardMap->LID(3*node+dof)] = displacement;
196  }
197  }
198 
199  Epetra_MultiVector rhs_dir(*StandardMap,true);
200  K.Apply(v,rhs_dir);
201  F.Update(-1.0,rhs_dir,1.0);
202 
203  for (unsigned int inode=0; inode<Mesh->n_local_nodes_without_ghosts; ++inode){
204  node = Mesh->local_nodes[inode];
205  coord = Mesh->nodes_coord[3*node+dof];
206  if (coord==0.0){
207  F[0][StandardMap->LID(3*node+0)] = 0.0;
208  F[0][StandardMap->LID(3*node+1)] = 0.0;
209  F[0][StandardMap->LID(3*node+2)] = 0.0;
210  }
211  if (coord==25.0){
212  F[0][StandardMap->LID(3*node+0)] = 0.0;
213  F[0][StandardMap->LID(3*node+dof)] = displacement;
214  F[0][StandardMap->LID(3*node+2)] = 0.0;
215  }
216  }
217  //}
218  ML_Epetra::Apply_OAZToMatrix(dof_on_boundary,n_bc_dof,K);
219  }
220 
221  void get_elasticity_tensor(unsigned int & e_lid, unsigned int & gp, Epetra_SerialDenseMatrix & tangent_matrix){
222 
223  int e_gid = Mesh->local_cells[e_lid];
224  int n_gauss_cells = Mesh->n_gauss_cells;
225 
226  double epsilon = 1.0e-6;
227  Epetra_SerialDenseMatrix M(6,6);
228  double M1 = m1(e_lid*n_gauss_cells+gp) + epsilon;
229  double M2 = m2(e_lid*n_gauss_cells+gp) + epsilon;
230  double M3 = m3(e_lid*n_gauss_cells+gp);
231  double M4 = m4(e_lid*n_gauss_cells+gp) + epsilon;
232  double M5 = m5(e_lid*n_gauss_cells+gp) + epsilon;
233 
234  transverse_isotropic_matrix(M,M1,M2,M3,M4,M5);
235 
236  double c1 = 144.8969*1.0e3;
237  double c2 = 14.2500*1.0e3;
238  double c3 = 5.8442*1.0e3;
239  double c4 = 7.5462*1.0e3;
240  double c5 = 12.5580*1.0e3;
241 
242  Epetra_SerialDenseMatrix sqrtmCmoy(6,6);
243  double constant = std::sqrt(c1*c1-2.0*c1*c2+c2*c2+4.0*c3*c3);
244 
245  double d1 = (std::sqrt(2.0)*(c1-c2+constant)*std::sqrt(c1+c2+constant))/(4.0*constant) + (std::sqrt(2.0)*(c2-c1+constant)*std::sqrt(c1+c2-constant))/(4.0*constant);
246  double d2 = (std::sqrt(2.0)*(c2-c1+constant)*std::sqrt(c1+c2+constant))/(4.0*constant) + (std::sqrt(2.0)*(c1-c2+constant)*std::sqrt(c1+c2-constant))/(4.0*constant);
247  double d3 = std::sqrt(2.0)*c3*( std::sqrt(c1+c2+constant) - std::sqrt(c1+c2-constant) )/( 2.0*constant );
248  double d4 = std::sqrt(c4);
249  double d5 = std::sqrt(c5);
250 
251  transverse_isotropic_matrix(sqrtmCmoy,d1,d2,d3,d4,d5);
252 
253  Epetra_SerialDenseMatrix AtimesB(6,6);
254 
255  AtimesB.Multiply('N','N',1.0,M,sqrtmCmoy,0.0);
256  tangent_matrix.Multiply('N','N',1.0,sqrtmCmoy,AtimesB,0.0);
257 
258  if(phase[e_gid] % 2){
259  tangent_matrix(0,5) = -tangent_matrix(0,5);
260  tangent_matrix(5,0) = -tangent_matrix(5,0);
261  tangent_matrix(1,5) = -tangent_matrix(1,5);
262  tangent_matrix(5,1) = -tangent_matrix(5,1);
263  tangent_matrix(2,5) = -tangent_matrix(2,5);
264  tangent_matrix(5,2) = -tangent_matrix(5,2);
265  tangent_matrix(3,4) = -tangent_matrix(3,4);
266  tangent_matrix(4,3) = -tangent_matrix(4,3);
267  }
268 
269  tangent_matrix.Scale(1.0/(1.0+epsilon));
270 
271  }
272 
273  void recover_cauchy_stress(std::string & filename, int * seeds){
274 
275  Epetra_SerialDenseVector w1_shino(Mesh->n_local_cells);
276  Epetra_SerialDenseVector w2_shino(Mesh->n_local_cells);
277  Epetra_SerialDenseVector w3_shino(Mesh->n_local_cells);
278  Epetra_SerialDenseVector w4_shino(Mesh->n_local_cells);
279  Epetra_SerialDenseVector w5_shino(Mesh->n_local_cells);
280 
281  m1.Resize(Mesh->n_local_cells);
282  m2.Resize(Mesh->n_local_cells);
283  m3.Resize(Mesh->n_local_cells);
284  m4.Resize(Mesh->n_local_cells);
285  m5.Resize(Mesh->n_local_cells);
286 
287  double xi = 0.0; double eta = 0.0; double zeta = 0.0;
288 
289  GRF_Generator->rng.seed(seeds[0]);
290  GRF_Generator->generator_one_gauss_point(w1_shino,*Mesh,phase,xi,eta,zeta);
291 
292  GRF_Generator->rng.seed(seeds[1]);
293  GRF_Generator->generator_one_gauss_point(w2_shino,*Mesh,phase,xi,eta,zeta);
294 
295  GRF_Generator->rng.seed(seeds[2]);
296  GRF_Generator->generator_one_gauss_point(w3_shino,*Mesh,phase,xi,eta,zeta);
297 
298  GRF_Generator->rng.seed(seeds[3]);
299  GRF_Generator->generator_one_gauss_point(w4_shino,*Mesh,phase,xi,eta,zeta);
300 
301  GRF_Generator->rng.seed(seeds[4]);
302  GRF_Generator->generator_one_gauss_point(w5_shino,*Mesh,phase,xi,eta,zeta);
303 
304  double deltaN = 0.0970;
305  double deltaM4 = 0.0461;
306  double deltaM5 = 0.0952;
307  double alpha; double beta = 1.0;
308  double Psi1, Psi2;
309 
310  for (unsigned int i=0; i<w1_shino.Length(); ++i){
311 
312  alpha = 3.0/(2.0*deltaN*deltaN); beta = 1.0;
313  Psi1 = icdf_gamma(w1_shino(i),alpha,beta);
314  m1(i) = (deltaN*deltaN/3.0)*2.0*Psi1;
315 
316  alpha = 3.0/(2.0*deltaN*deltaN) - 1.0/2.0;
317  Psi2 = icdf_gamma(w2_shino(i),alpha,beta);
318  m2(i) = (deltaN*deltaN/3.0)*( 2.0*Psi2 + w3_shino(i)*w3_shino(i) );
319 
320  m3(i) = (deltaN*deltaN/3.0)*std::sqrt(2.0*Psi1)*w3_shino(i);
321 
322  alpha = 1.0/(deltaM4*deltaM4); beta = 1.0*deltaM5*deltaM5;
323  m4(i) = icdf_gamma(w4_shino(i),alpha,beta);
324  alpha = 1.0/(deltaM4*deltaM4); beta = 1.0*deltaM5*deltaM5;
325  m5(i) = icdf_gamma(w5_shino(i),alpha,beta);
326 
327  }
328  compute_center_cauchy_stress(*solution, filename, true, true);
329  }
330 
331  void get_elasticity_tensor_for_recovery(unsigned int & e_lid, Epetra_SerialDenseMatrix & tangent_matrix){
332 
333  int e_gid = Mesh->local_cells[e_lid];
334 
335  double epsilon = 1.0e-6;
336  Epetra_SerialDenseMatrix M(6,6);
337  double M1 = m1(e_lid) + epsilon;
338  double M2 = m2(e_lid) + epsilon;
339  double M3 = m3(e_lid);
340  double M4 = m4(e_lid) + epsilon;
341  double M5 = m5(e_lid) + epsilon;
342 
343  transverse_isotropic_matrix(M,M1,M2,M3,M4,M5);
344 
345  double c1 = 144.8969*1.0e3;
346  double c2 = 14.2500*1.0e3;
347  double c3 = 5.8442*1.0e3;
348  double c4 = 7.5462*1.0e3;
349  double c5 = 12.5580*1.0e3;
350 
351  Epetra_SerialDenseMatrix sqrtmCmoy(6,6);
352  double constant = std::sqrt(c1*c1-2.0*c1*c2+c2*c2+4.0*c3*c3);
353 
354  double d1 = (std::sqrt(2.0)*(c1-c2+constant)*std::sqrt(c1+c2+constant))/(4.0*constant) + (std::sqrt(2.0)*(c2-c1+constant)*std::sqrt(c1+c2-constant))/(4.0*constant);
355  double d2 = (std::sqrt(2.0)*(c2-c1+constant)*std::sqrt(c1+c2+constant))/(4.0*constant) + (std::sqrt(2.0)*(c1-c2+constant)*std::sqrt(c1+c2-constant))/(4.0*constant);
356  double d3 = std::sqrt(2.0)*c3*( std::sqrt(c1+c2+constant) - std::sqrt(c1+c2-constant) )/( 2.0*constant );
357  double d4 = std::sqrt(c4);
358  double d5 = std::sqrt(c5);
359 
360  transverse_isotropic_matrix(sqrtmCmoy,d1,d2,d3,d4,d5);
361 
362  Epetra_SerialDenseMatrix AtimesB(6,6);
363 
364  AtimesB.Multiply('N','N',1.0,M,sqrtmCmoy,0.0);
365  tangent_matrix.Multiply('N','N',1.0,sqrtmCmoy,AtimesB,0.0);
366 
367  if(phase[e_gid] % 2){
368  tangent_matrix(0,5) = -tangent_matrix(0,5);
369  tangent_matrix(5,0) = -tangent_matrix(5,0);
370  tangent_matrix(1,5) = -tangent_matrix(1,5);
371  tangent_matrix(5,1) = -tangent_matrix(5,1);
372  tangent_matrix(2,5) = -tangent_matrix(2,5);
373  tangent_matrix(5,2) = -tangent_matrix(5,2);
374  tangent_matrix(3,4) = -tangent_matrix(3,4);
375  tangent_matrix(4,3) = -tangent_matrix(4,3);
376  }
377 
378  tangent_matrix.Scale(1.0/(1.0+epsilon));
379 
380  }
381 
382  void transverse_isotropic_matrix(Epetra_SerialDenseMatrix & C, double & c1, double & c2, double & c3, double & c4, double & c5){
383 
384  C(0,0) = c1/16.0 + (9.0*c2)/32.0 + (9.0*c4)/32.0 + (3.0*c5)/8.0 + (3.0*std::sqrt(2.0)*c3)/16.0;
385  C(0,1) = (3.0*c1)/16.0 + (3.0*c2)/32.0 + (3.0*c4)/32.0 - (3.0*c5)/8.0 + (5.0*std::sqrt(2.0)*c3)/16.0;
386  C(0,2) = (3.0*c2)/8.0 - (3.0*c4)/8.0 + (std::sqrt(2.0)*c3)/8.0;
387  C(0,3) = 0.0;
388  C(0,4) = 0.0;
389  C(0,5) = std::sqrt(6)*(c1/16.0 - (3.0*c2)/32.0 - (3.0*c4)/32.0 + c5/8.0 + (std::sqrt(2.0)*c3)/16.0);
390 
391  C(1,0) = (3.0*c1)/16.0 + (3.0*c2)/32.0 + (3.0*c4)/32.0 - (3.0*c5)/8.0 + (5*std::sqrt(2.0)*c3)/16.0;
392  C(1,1) = (9.0*c1)/16.0 + c2/32.0 + c4/32.0 + (3.0*c5)/8.0 + (3.0*std::sqrt(2.0)*c3)/16.0;
393  C(1,2) = c2/8.0 - c4/8.0 + (3.0*std::sqrt(2.0)*c3)/8.0;
394  C(1,3) = 0.0;
395  C(1,4) = 0.0;
396  C(1,5) = -std::sqrt(6.0)*(c2/32.0 - (3.0*c1)/16.0 + c4/32.0 + c5/8.0 + (std::sqrt(2.0)*c3)/16.0);
397 
398  C(2,0) = (3.0*c2)/8.0 - (3.0*c4)/8.0 + std::sqrt(2.0)*c3/8.0;
399  C(2,1) = c2/8.0 - c4/8.0 + (3.0*std::sqrt(2.0)*c3)/8.0;
400  C(2,2) = c2/2.0 + c4/2.0;
401  C(2,3) = 0.0;
402  C(2,4) = 0.0;
403  C(2,5) = (std::sqrt(3.0)*(2.0*c3 - std::sqrt(2.0)*c2 + std::sqrt(2.0)*c4))/8.0;
404 
405  C(3,0) = 0.0;
406  C(3,1) = 0.0;
407  C(3,2) = 0.0;
408  C(3,3) = c4/4.0 + (3.0*c5)/4.0;
409  C(3,4) = -(std::sqrt(3.0)*(c4 - c5))/4.0;
410  C(3,5) = 0.0;
411 
412  C(4,0) = 0.0;
413  C(4,1) = 0.0;
414  C(4,2) = 0.0;
415  C(4,3) = -(std::sqrt(3.0)*(c4 - c5))/4.0;
416  C(4,4) = (3.0*c4)/4.0 + c5/4.0;
417  C(4,5) = 0.0;
418 
419  C(5,0) = std::sqrt(6.0)*(c1/16.0 - (3.0*c2)/32.0 - (3.0*c4)/32.0 + c5/8.0 + std::sqrt(2.0)*c3/16.0);
420  C(5,1) = -std::sqrt(6.0)*(c2/32.0 - (3.0*c1)/16.0 + c4/32.0 + c5/8.0 + (std::sqrt(2.0)*c3)/16.0);
421  C(5,2) = (std::sqrt(3.0)*(2.0*c3 - std::sqrt(2.0)*c2 + std::sqrt(2.0)*c4))/8.0;
422  C(5,3) = 0.0;
423  C(5,4) = 0.0;
424  C(5,5) = (3.0*c1)/8.0 + (3.0*c2)/16.0 + (3.0*c4)/16.0 + c5/4.0 - (3.0*std::sqrt(2.0)*c3)/8.0;
425 
426  }
427 
428  int print_solution(std::string fileName){
429 
430  int NumTargetElements = 0;
431  if (Comm->MyPID()==0){
432  NumTargetElements = 3*Mesh->n_nodes;
433  }
434  Epetra_Map MapOnRoot(-1,NumTargetElements,0,*Comm);
435  Epetra_Export ExportOnRoot(*StandardMap,MapOnRoot);
436  Epetra_MultiVector lhs_root(MapOnRoot,true);
437  lhs_root.Export(*solution,ExportOnRoot,Insert);
438 
439  int error = EpetraExt::MultiVectorToMatrixMarketFile(fileName.c_str(),lhs_root,0,0,false);
440 
441  return error;
442 
443  }
444 
445  Epetra_Vector * solution;
446  Teuchos::ParameterList * Krylov;
447  Teuchos::RCP<shinozuka_layeredcomp> GRF_Generator;
448 
449  Epetra_SerialDenseVector m1;
450  Epetra_SerialDenseVector m2;
451  Epetra_SerialDenseVector m3;
452  Epetra_SerialDenseVector m4;
453  Epetra_SerialDenseVector m5;
454 
455  std::vector<int> phase;
456 
457  double _deltaN;
458  double _deltaM4;
459  double _deltaM5;
460 
461 };
462 
463 
464 #endif
Epetra_Comm * Comm
for j
Definition: costFunction.m:42
Teuchos::ParameterList * Krylov
Definition: asmeSBVP.hpp:446
std::vector< int > local_nodes
Definition: meshpp.hpp:80
std::vector< double > nodes_coord
Definition: meshpp.hpp:77
~asmeSBVP()
Definition: asmeSBVP.hpp:46
void get_elasticity_tensor(unsigned int &e_lid, unsigned int &gp, Epetra_SerialDenseMatrix &tangent_matrix)
Definition: asmeSBVP.hpp:221
int n_local_cells
Definition: meshpp.hpp:94
Epetra_SerialDenseVector get_forcing(double &x1, double &x2, double &x3, unsigned int &e_lid, unsigned int &gp)
Definition: asmeSBVP.hpp:54
Teuchos::RCP< shinozuka_layeredcomp > GRF_Generator
Definition: asmeSBVP.hpp:447
Epetra_SerialDenseVector m3
Definition: asmeSBVP.hpp:451
Epetra_FECrsGraph * FEGraph
double _deltaM5
Definition: asmeSBVP.hpp:459
Epetra_Vector * solution
Definition: asmeSBVP.hpp:445
void get_elasticity_tensor_for_recovery(unsigned int &e_lid, Epetra_SerialDenseMatrix &tangent_matrix)
Definition: asmeSBVP.hpp:331
asmeSBVP(Epetra_Comm &comm, Teuchos::ParameterList &Parameters)
Definition: asmeSBVP.hpp:16
double _deltaM4
Definition: asmeSBVP.hpp:458
std::vector< int > local_cells
Definition: meshpp.hpp:81
void setup_dirichlet_conditions()
Definition: asmeSBVP.hpp:147
clc clear all close all mesh
Definition: run.m:5
int n_local_nodes_without_ghosts
Definition: meshpp.hpp:92
filename
Definition: costFunction.m:44
Epetra_SerialDenseVector m4
Definition: asmeSBVP.hpp:452
void compute_center_cauchy_stress(Epetra_Vector &x, std::string &filename, bool printCauchy, bool printVM)
Epetra_SerialDenseVector m2
Definition: asmeSBVP.hpp:450
std::vector< int > phase
Definition: asmeSBVP.hpp:455
void assemblePureDirichlet_homogeneousForcing(Epetra_FECrsMatrix &K)
Epetra_Import * ImportToOverlapMap
void solveOneRealization(double &bcDisp, int *seeds)
Definition: asmeSBVP.hpp:60
Epetra_Map * StandardMap
double _deltaN
Definition: asmeSBVP.hpp:457
unsigned int n_gauss_cells
Definition: meshpp.hpp:98
void apply_dirichlet_conditions(Epetra_FECrsMatrix &K, Epetra_FEVector &F, double &displacement)
Definition: asmeSBVP.hpp:183
Epetra_SerialDenseVector get_neumannBc(Epetra_SerialDenseMatrix &matrix_X, Epetra_SerialDenseMatrix &xg, unsigned int &gp)
Definition: asmeSBVP.hpp:49
void recover_cauchy_stress(std::string &filename, int *seeds)
Definition: asmeSBVP.hpp:273
int n_nodes
Definition: meshpp.hpp:87
Epetra_SerialDenseVector m5
Definition: asmeSBVP.hpp:453
modelParameters beta
Definition: run_station15.m:10
for i
Definition: costFunction.m:38
Epetra_Map * OverlapMap
e
Definition: run.m:10
int print_solution(std::string fileName)
Definition: asmeSBVP.hpp:428
Epetra_SerialDenseVector m1
Definition: asmeSBVP.hpp:449
double icdf_gamma(double &w, double &alpha, double &beta)
Definition: asmeSBVP.hpp:139
void transverse_isotropic_matrix(Epetra_SerialDenseMatrix &C, double &c1, double &c2, double &c3, double &c4, double &c5)
Definition: asmeSBVP.hpp:382
output eta
Definition: costFunction.m:33