NeoPZ
TPZMulticamadaOrtho.cpp
Go to the documentation of this file.
1 
6 #include "TPZPlacaOrthotropic.h"
7 #include "TPZMulticamadaOrtho.h"
8 #include "pzmatorthotropic.h"
9 
10 #include "pzgmesh.h"
11 #include "pzgeoel.h"
12 #include "pzgeoelbc.h"
13 #include "pzintel.h"
14 
15 #include "pzbctension.h"
16 #include "pzanalysis.h"
17 #include "pzstepsolver.h"
18 #include "pzskylstrmatrix.h"
19 #include "pzdxmesh.h"
20 
21 using namespace std;
22 
23 TPZMulticamadaOrthotropic::TPZMulticamadaOrthotropic(REAL z,REAL dx,REAL dy, int64_t nelx, int64_t nely, REAL Correct) : fDirx(3,0.), fDiry(3,0.) {
24 
25  fCorrect = Correct;
26  fGeoMesh = new TPZGeoMesh();
28  fZMin = z;
29  fZMax = z;
30  fNelx = nelx;
31  if(! fNelx%2) fNelx++;//se for par fica impar
32  fNely = nely;
33  if(! fNely%2) fNely++;
34  fDx = dx/fNelx;
35  fDy = dy/fNely;
36  fGeoMesh->NodeVec().Resize((fNelx+1)*(fNely+1));
37  int64_t ix, iy;
38  TPZManVector<REAL,3> coord(3,fZMax);
39  for(ix=0; ix<= nelx; ix++) {
40  for(iy=0; iy<= nely; iy++) {
41  coord[0] = ix*fDx-dx/2.;
42  coord[1] = iy*fDy-dy/2.;
43  fGeoMesh->NodeVec()[ix+iy*(nelx+1)].Initialize(coord,*fGeoMesh);
44  }
45  }
46  fLinearX = 0;
47  fLinearY = 0;
48 
49  fDirx[0] = 0.25;
50  fDiry[1] = 0.25;
51 
52  int i;
53  for(i=0; i<3; i++) {
54  fMX[i] = 0.;
55  fMY[i] = 0.;
56  fMXY[i] = 0.;
57  fNX[i] = 0.;
58  fNY[i] = 0.;
59  fNXY[i] = 0.;
60  fQX[i] = 0.;
61  fQY[i] = 0.;
62  fdMXdX[i] = 0.;
63  fdMXdY[i] = 0.;
64  fdMYdY[i] = 0.;
65  fdMYdX[i] = 0.;
66  fdMXYdX[i] = 0.;
67  fdMXYdY[i] = 0.;
68  fdQXdX[i] = 0.;
69  fdQXdY[i] = 0.;
70  fdQYdX[i] = 0.;
71  fdQYdY[i] = 0.;
72  fdNXdX[i] = 0.;
73  fdNXdY[i] = 0.;
74  fdNYdX[i] = 0.;
75  fdNYdY[i] = 0.;
76  fdNXYdX[i] = 0.;
77  fdNXYdY[i] = 0.;
78  }
79 }
80 
81 
83 
87  int nplaca = fPlacaOrth.NElements();
88  int ip;
89  for(ip = 0; ip<nplaca; ip++) {
90  fPlacaOrth[ip].IdentifyCompEl();
91  }
92 }
93 
94 
96 
97  TPZMaterial * bcptr;
99  TPZFNMatrix<9,STATE> val1(3,3,0.),val2(3,1,0.);
100  TPZBCTension *bc = new TPZBCTension(material,-material->Id()*4,4,val1,val2, 1., this,fPlacaOrth.NElements());
101  bcptr = (bc);
103  bc = new TPZBCTension(material,-material->Id()*4-1,4,val1,val2, 1., this,fPlacaOrth.NElements());
104  bcptr = (bc);
106  bc = new TPZBCTension(material,-material->Id()*4-2,4,val1,val2, -1., this,fPlacaOrth.NElements());
107  bcptr = (bc);
109  bc = new TPZBCTension(material,-material->Id()*4-3,4,val1,val2, -1.,this,fPlacaOrth.NElements());
110  bcptr = (bc);
112 
113  // fPlacaOrth.Push(placa);
114  int64_t nnodes = fGeoMesh->NodeVec().NElements();
115  fGeoMesh->NodeVec().Resize(nnodes+(fNelx+1)*(fNely+1));
116  int64_t ix, iy;
117  TPZManVector<REAL,3> coord(3,fZMax+height);
118  fZMax += height;
119  for(ix=0; ix<= fNelx; ix++) {
120  for(iy=0; iy<= fNely; iy++) {
121  coord[0] = ix*fDx-fDx*REAL(fNelx/2.);
122  coord[1] = iy*fDy-fDy*REAL(fNely/2.);
123  fGeoMesh->NodeVec()[nnodes+ix+iy*(fNelx+1)].Initialize(coord,*fGeoMesh);
124  }
125  }
126  int64_t nodebase1 = nnodes - (fNelx+1)*(fNely+1);
127  int64_t elx, ely;
128  TPZManVector<int64_t,8> nodeindexes(8,-1);
129  for(elx=0; elx<fNelx; elx++) {
130  for(ely=0; ely<fNely; ely++) {
131  nodeindexes[0] = nodebase1+elx+ely*(fNelx+1);
132  nodeindexes[1] = nodebase1+elx+1+ely*(fNelx+1);
133  nodeindexes[2] = nodebase1+elx+1+(ely+1)*(fNelx+1);
134  nodeindexes[3] = nodebase1+elx+(ely+1)*(fNelx+1);
135  int i;
136  for(i=0; i<4; i++) nodeindexes[i+4] = nodeindexes[i]+(fNelx+1)*(fNely+1);
137  int64_t index;
138  TPZGeoEl *gel = fGeoMesh->CreateGeoElement (ECube, nodeindexes, material->Id(), index);
139  if(ely == 0) TPZGeoElBC gbc1(gel,21,-material->Id()*4);
140  if(elx == fNelx-1) TPZGeoElBC gbc2(gel,22,-material->Id()*4-1);
141  if(ely == fNely-1) TPZGeoElBC gbc3(gel,23,-material->Id()*4-2);
142  if(elx == 0) TPZGeoElBC gbc4(gel,24,-material->Id()*4-3);
143  int nplaca = fPlacaOrth.NElements();
144  if(nplaca == 0 && elx == 0 && ely == 0) {
145  TPZBndCond *bc2 = new TPZBndCond(material,-100,0,val1,val2);
146  bcptr = (bc2);
148  TPZGeoElBC gbc5(gel,0,-100);
149  val1(0,0) = 1.e12;
150  val1(2,2) = 1.e12;
151  TPZBndCond *bc3 = new TPZBndCond(material,-101,2,val1,val2);
152  bcptr = (bc3);
154  TPZGeoElBC gbc6(gel,3,-101);
155  val1.Zero();
156  val1(0,0) = 0.;
157  val1(2,2) = 1.e12;
158  TPZBndCond *bc4 = new TPZBndCond(material,-102,2,val1,val2);
159  bcptr = (bc4);
160 
162  TPZGeoElBC gbc7(gel,2,-102);
163  }
164  if(elx == fNelx/2 && ely == fNely/2) {
165  TPZPlacaOrthotropic placa(gel,fZMax-height,fZMax);
166  fPlacaOrth.Push(placa);
167  }
168  }
169  }
170 }
171 
172 void TPZMulticamadaOrthotropic::Print(std::ostream &out){
173 
174  int i, nplaca=fPlacaOrth.NElements();
175  out << "TPZMulticamadaOrthotropic::Print\n";
176  out << nplaca << endl;
177  for (i=0; i<nplaca; i++){
178  out << "placa : " << i << endl;
179  fPlacaOrth[i].Print();
180  }
181 }
182 
184 
185  return (fZMax - fZMin);
186 }
187 
189  return fPlacaOrth.NElements();
190 }
191 
193 
194  REAL z = co[2];
195  REAL x = co[0];
196  REAL y = co[1];
197  tensor.Redim(3,3);
198  REAL height = Height();
199  REAL zrel = z-(fZMax-fZMin)/2.;
200  if(height <= 0.) return;
201  REAL height3 = height*height*height;
202  tensor(0,0) += (fNX[2]+fLinearX*fdNXdX[2]*x)/height;
203  tensor(1,1) += (fNY[2]+fLinearY*fdNYdY[2]*y)/height;
204  tensor(1,0) += (fNXY[2]+fLinearX*fdNXYdX[2]*x+fLinearY*fdNXYdY[2]*y)/height;
205  tensor(0,1) = tensor(1,0);
206  tensor(0,0) += REAL(12.)*(fMX[2]+(x*REAL(fLinearX)*fdMXdX[2]))*zrel/(height3);
207  tensor(1,1) += 12.*(fMY[2]+y*REAL(fLinearY)*fdMYdY[2])*zrel/height3;
208  tensor(0,1) += 12.*(fMXY[2]+REAL(fLinearX)*x*fdMXYdX[2]+REAL(fLinearY)*y*fdMXYdY[2])*zrel/height3;
209  tensor(1,0) = tensor(0,1);
210  tensor(0,2) += -6.*(fQX[2]+REAL(fLinearX)*x*fdQXdX[2])*(zrel*zrel-height*height/4.)/height3;
211  tensor(2,0) = tensor(0,2);
212  tensor(1,2) += -6.*(fQY[2]+REAL(fLinearY)*y*fdQYdY[2])*(zrel*zrel-height*height/4.)/height3;
213  tensor(2,1) = tensor(1,2);
214 
215 }
216 
218 
219  int nplaca = fPlacaOrth.NElements();
220  int ip;
221  fMX[1] = 0.;
222  fMY[1] = 0.;
223  fMXY[1] = 0.;
224  fNX[1] = 0.;
225  fNY[1] = 0.;
226  fNXY[1] = 0.;
227  fQX[1] = 0.;
228  fQY[1] = 0.;
229  fdMXdX[1] = 0.;
230  fdMYdX[1] = 0.;
231  fdMXYdX[1] = 0.;
232  fdNXdX[1] = 0.;
233  fdNYdX[1] = 0.;
234  fdNXYdX[1] = 0.;
235  fdQXdX[1] = 0.;
236  fdQYdX[1] = 0.;
237  fdMXdY[1] = 0.;
238  fdMYdY[1] = 0.;
239  fdMXYdY[1] = 0.;
240  fdNXdY[1] = 0.;
241  fdNYdY[1] = 0.;
242  fdNXYdY[1] = 0.;
243  fdQXdY[1] = 0.;
244  fdQYdY[1] = 0.;
245  REAL zref = (fZMax+fZMin)/2.;
246  TPZManVector<REAL,3> normal(3,0.),direction(3,0.);
247  for(ip=0; ip<nplaca; ip++) {
248  normal.Fill(0.);
249  direction.Fill(0.);
250  normal[0] = 1.;
251  direction[0] = 1.;
252  fMX[1] += fPlacaOrth[ip].Moment(zref,normal,direction);
253  fNX[1] += fPlacaOrth[ip].Force(normal,direction);
254  direction.Fill(0.);
255  direction[1] = 1.;
256  fMXY[1] += fPlacaOrth[ip].Moment(zref,normal,direction);
257  fNXY[1] += fPlacaOrth[ip].Force(normal,direction);
258  direction.Fill(0.);
259  direction[2] = 1.;
260  fQX[1] += fPlacaOrth[ip].Force(normal,direction);
261  normal.Fill(0.);
262  normal[1] = 1.;
263  direction.Fill(0.);
264  direction[1] = 1.;
265  fMY[1] += fPlacaOrth[ip].Moment(zref,normal,direction);
266  fNY[1] += fPlacaOrth[ip].Force(normal,direction);
267  direction.Fill(0.);
268  direction[2] = 1.;
269  fQY[1] += fPlacaOrth[ip].Force(normal,direction);
270  if(fLinearX) {
271  normal.Fill(0.);
272  direction.Fill(0.);
273  normal[0] = 1.;
274  direction[0] = 1.;
275  fdMXdX[1] += fPlacaOrth[ip].GradMoment(zref,fDirx,normal,direction);
276  fdNXdX[1] += fPlacaOrth[ip].GradForce(fDirx,normal,direction);
277  direction.Fill(0.);
278  direction[1] = 1.;
279  fdMXYdX[1] += fPlacaOrth[ip].GradMoment(zref,fDirx,normal,direction);
280  fdNXYdX[1] += fPlacaOrth[ip].GradForce(fDirx,normal,direction);
281  direction.Fill(0.);
282  direction[2] = 1.;
283  fdQXdX[1] += fPlacaOrth[ip].GradForce(fDirx,normal,direction);
284  normal.Fill(0.);
285  normal[1] = 1.;
286  direction.Fill(0.);
287  direction[1] = 1.;
288  fdMYdX[1] += fPlacaOrth[ip].GradMoment(zref,fDirx,normal,direction);
289  fdNYdX[1] += fPlacaOrth[ip].GradForce(fDirx,normal,direction);
290  direction.Fill(0.);
291  direction[2] = 1.;
292  fdQYdX[1] += fPlacaOrth[ip].GradForce(fDirx,normal,direction);
293  } else {
294  fdMXdX[1] = 0.;
295  fdMYdX[1] = 0.;
296  fdMXYdX[1] = 0.;
297  fdNXdX[1] = 0.;
298  fdNYdX[1] = 0.;
299  fdNXYdX[1] = 0.;
300  fdQXdX[1] = 0.;
301  fdQYdX[1] = 0.;
302  }
303  if(fLinearY) {
304  normal.Fill(0.);
305  direction.Fill(0.);
306  normal[0] = 1.;
307  direction[0] = 1.;
308  fdMXdY[1] += fPlacaOrth[ip].GradMoment(zref,fDiry,normal,direction);
309  fdNXdY[1] += fPlacaOrth[ip].GradForce(fDiry,normal,direction);
310  direction.Fill(0.);
311  direction[1] = 1.;
312  fdMXYdY[1] += fPlacaOrth[ip].GradMoment(zref,fDiry,normal,direction);
313  fdNXYdY[1] += fPlacaOrth[ip].GradForce(fDiry,normal,direction);
314  direction.Fill(0.);
315  direction[2] = 1.;
316  fdQXdY[1] += fPlacaOrth[ip].GradForce(fDiry,normal,direction);
317  normal.Fill(0.);
318  normal[1] = 1.;
319  direction.Fill(0.);
320  direction[1] = 1.;
321  fdMYdY[1] += fPlacaOrth[ip].GradMoment(zref,fDiry,normal,direction);
322  fdNYdY[1] += fPlacaOrth[ip].GradForce(fDiry,normal,direction);
323  direction.Fill(0.);
324  direction[2] = 1.;
325  fdQYdY[1] += fPlacaOrth[ip].GradForce(fDiry,normal,direction);
326  } else {
327  fdMXdY[1] = 0.;
328  fdMYdY[1] = 0.;
329  fdMXYdY[1] = 0.;
330  fdNXdY[1] = 0.;
331  fdNYdY[1] = 0.;
332  fdNXYdY[1] = 0.;
333  fdQXdY[1] = 0.;
334  fdQYdY[1] = 0.;
335  }
336  }
337  fMX[2] = (fMX[0]-fMX[1]) * fCorrect;
338  fMY[2] = (fMY[0]-fMY[1]) * fCorrect;
339  fMXY[2] = (fMXY[0]-fMXY[1]) * fCorrect;
340  fNX[2] = (fNX[0]-fNX[1]) * fCorrect;
341  fNY[2] = (fNY[0]-fNY[1]) * fCorrect;
342  fNXY[2] = (fNXY[0]-fNXY[1]) * fCorrect;
343  fQX[2] = (fQX[0]-fQX[1]) * fCorrect;
344  fQY[2] = (fQY[0]-fQY[1]) * fCorrect;
345 
346  fdMXdX[2] = (fdMXdX[0]-fdMXdX[1]) * fCorrect;
347  // fdMYdX[2] = fdMYdX[1]-fdMYdX[0];
348  fdMYdX[2] = 0.;
349  fdMXYdX[2] = (fdMXYdX[0]-fdMXYdX[1]) * fCorrect;
350  fdNXdX[2] = (fdNXdX[0]-fdNXdX[1]) * fCorrect;
351  // fdNYdX[2] = fdNYdX[1]-fdNYdX[0];
352  fdNYdX[2] = 0.;
353  fdNXYdX[2] = (fdNXYdX[0]-fdNXYdX[1]) * fCorrect;
354  fdQXdX[2] = (fdQXdX[0]-fdQXdX[1]) * fCorrect;
355  // fdQYdX[2] = fdQYdX[1]-fdQYdX[0];
356  fdQYdX[2] = 0.;
357 
358  // fdMXdY[2] = fdMXdY[1]-fdMXdY[0];
359  fdMXdY[2] = 0.;
360  fdMYdY[2] = (fdMYdY[0]-fdMYdY[1]) * fCorrect;
361  fdMXYdY[2] = (fdMXYdY[0]-fdMXYdY[1]) * fCorrect;
362  // fdNXdY[2] = fdNXdY[1]-fdNXdY[0];
363  fdNXdY[2] = 0.;
364  fdNYdY[2] = (fdNYdY[0]-fdNYdY[1]) * fCorrect;
365  fdNXYdY[2] = (fdNXYdY[0]-fdNXYdY[1]) * fCorrect;
366  // fdQXdY[2] = fdQXdY[1]-fdQXdY[0];
367  fdQXdY[2] = 0.;
368  fdQYdY[2] = (fdQYdY[0]-fdQYdY[1]) * fCorrect;
369 
370 }
371 
373 
374  REAL zmin = fPlacaOrth[placa].ZMin();
375  REAL zmax = fPlacaOrth[placa].ZMax();
376  TPZManVector<REAL,3> ksi(3,0.);
377  ksi[2] = -1.+2.*(x[2]-zmin)/(zmax-zmin);
378  TPZFNMatrix<9> tensorcomp(3,3),tensoranalytic(3,3),gradtensorx(3,3),gradtensory(3,3);
379  fPlacaOrth[placa].Tensor(ksi,tensorcomp);
380  AnalyticTensor(x,tensoranalytic);
381  tensor = tensorcomp + tensoranalytic;
382  if(fLinearX) {
383  fPlacaOrth[placa].GradTensor(fDirx,ksi,gradtensorx);
384  gradtensorx *= x[0];
385  tensor += gradtensorx;
386  }
387  if(fLinearY) {
388  fPlacaOrth[placa].GradTensor(fDiry,ksi,gradtensory);
389  gradtensory *= x[1];
390  tensor += gradtensory;
391  }
392 
393 }
394 
395 void TPZMulticamadaOrthotropic::ComputeSolution(std::ostream &out,int print){
396 
399  an.SetStructuralMatrix(skyl);
400  TPZStepSolver<STATE> solve;
401  solve.SetDirect(ELDLt);
402  an.SetSolver(solve);
403 
404  an.Solution().Zero();
405 
406  an.Run();
407  if(print) an.Print("* PRINT ANALISYS *",out);
408 }
409 
410 void TPZMulticamadaOrthotropic::ComputeSolution(TPZMaterial *mat,std::ofstream &out,int64_t numiter){
411 
414  an.SetStructuralMatrix(skyl);
415  TPZStepSolver<STATE> solve;
416  solve.SetDirect(ELDLt);
417  an.SetSolver(solve);
418  an.Solution().Zero();
419 
420  TPZVec<std::string> scalar(3),vector(0);
421  scalar[0] = "SigX";
422  scalar[1] = "SigY";
423  scalar[2] = "TauXY";
424 
425  TPZCompMesh *cmesh = an.Mesh();
426  int dim = mat->Dimension();
427  if (!mat) {
428  DebugStop();
429  }
430  std::set<int> matids;
431  matids.insert(mat->Id());
432  TPZDXGraphMesh graph(cmesh,dim,matids,scalar,vector);
433  cout << "\nmain::ComputeSolution out file : MultCam.dx\n";
434  graph.SetFileName("MultCam.dx");
435  int resolution = 0;
436  graph.SetResolution(resolution);
437  graph.DrawMesh(dim);
438  int64_t iter = 0;
439  int draw=0;
440  an.Solution().Zero();
441  an.Run();
443  PrintCenterForces(out);
444  PrintTensors(out);
445  cout << "Iteracao = " << ++iter << endl;
446  an.LoadSolution();
447  REAL time = 0.0;
448  graph.DrawSolution(draw++,time);
449 
450  while(iter < numiter) {
451 
452  an.Solution().Zero();
453  an.Run();
455  PrintCenterForces(out);
456  PrintTensors(out);
457  an.LoadSolution();
458  time += 0.1;
459  graph.DrawSolution(draw++,time);
460  cout << "Iteracao = " << ++iter << endl;
461  }
462  out.flush();
463  an.LoadSolution();
464 }
465 
466 
468 
469  out << "Output for the tensors at the center of the plates\n\n";
470  int nplaca = fPlacaOrth.NElements();
471  int ip;
472  for(ip=0; ip< nplaca; ip++) {
473  out << "Tensor para placa " << ip << endl;
474  fPlacaOrth[ip].PrintTensors(out);
475  out << endl;
476  }
477  out << endl << endl;
478 }
479 
480 void TPZMulticamadaOrthotropic::PrintTensors(std::ostream &out,TPZFMatrix<REAL> &tensorin,TPZFMatrix<REAL> &tensorout) {
481 
482  out << "Output for the tensors at the center of the plates\n\n";
483  int nplaca = fPlacaOrth.NElements();
484  int ip;
485  for(ip=0; ip< nplaca; ip++) {
486  out << "Tensor para placa " << ip << endl;
487  fPlacaOrth[ip].PrintTensors(out,tensorin,tensorout);
488  out << endl;
489  }
490  out << endl << endl;
491 }
492 
494 
495  out << "Integrated force and moment values and their numerically computed derivatives " << endl << endl;
496  int i;
497  out << "fMX ";
498  for(i=0; i<3; i++) {
499  out <<
500  fMX[i] << " ";
501  }
502  out << "\nfdMXdX ";
503  for(i=0; i<3; i++) {
504  out <<
505  fdMXdX[i] << " ";
506  }
507  out << "\nfdMXdY ";
508  for(i=0; i<3; i++) {
509  out <<
510  fdMXdY[i] << " ";
511  }
512  out << "\nfMY ";
513  for(i=0; i<3; i++) {
514  out <<
515  fMY[i] << " ";
516  }
517  out << "\nfMYdX ";
518  for(i=0; i<3; i++) {
519  out <<
520  fdMYdX[i] << " ";
521  }
522  out << "\nfdMYdY ";
523  for(i=0; i<3; i++) {
524  out <<
525  fdMYdY[i] << " ";
526  }
527  out << "\nfMXY ";
528  for(i=0; i<3; i++) {
529  out <<
530  fMXY[i] << " ";
531  }
532  out << "\nfdMXYdX ";
533  for(i=0; i<3; i++) {
534  out <<
535  fdMXYdX[i] << " ";
536  }
537  out << "\nfdMXYdY ";
538  for(i=0; i<3; i++) {
539  out <<
540  fdMXYdY[i] << " ";
541  }
542  out << "\nfNX ";
543  for(i=0; i<3; i++) {
544  out <<
545  fNX[i] << " ";
546  }
547  out << "\nfdNXdX ";
548  for(i=0; i<3; i++) {
549  out <<
550  fdNXdX[i] << " ";
551  }
552  out << "\nfdNXdY ";
553  for(i=0; i<3; i++) {
554  out <<
555  fdNXdY[i] << " ";
556  }
557  out << "\nfNY ";
558  for(i=0; i<3; i++) {
559  out <<
560  fNY[i] << " ";
561  }
562  out << "\nfdNYdX ";
563  for(i=0; i<3; i++) {
564  out <<
565  fdNYdX[i] << " ";
566  }
567  out << "\nfdNYdY ";
568  for(i=0; i<3; i++) {
569  out <<
570  fdNYdY[i] << " ";
571  }
572  out << "\nfNXY ";
573  for(i=0; i<3; i++) {
574  out <<
575  fNXY[i] << " ";
576  }
577  out << "\nfdNXYdX ";
578  for(i=0; i<3; i++) {
579  out <<
580  fdNXYdX[i] << " ";
581  }
582  out << "\nfdNXYdY ";
583  for(i=0; i<3; i++) {
584  out <<
585  fdNXYdY[i] << " ";
586  }
587  out << "\nfQX ";
588  for(i=0; i<3; i++) {
589  out <<
590  fQX[i] << " ";
591  }
592  out << "\nfdQXdX ";
593  for(i=0; i<3; i++) {
594  out <<
595  fdQXdX[i] << " ";
596  }
597  out << "\nfdQXdY ";
598  for(i=0; i<3; i++) {
599  out <<
600  fdQXdY[i] << " ";
601  }
602  out << "\nfQY ";
603  for(i=0; i<3; i++) {
604  out <<
605  fQY[i] << " ";
606  }
607  out << "\nfdQYdX ";
608  for(i=0; i<3; i++) {
609  out <<
610  fdQYdX[i] << " ";
611  }
612  out << "\nfdQYdY ";
613  for(i=0; i<3; i++) {
614  out <<
615  fdQYdY[i] << " ";
616  }
617  out << endl << endl;
618 }
void AddPlacaOrtho(TPZMaterial *material, REAL height)
Adds shells.
void Print(std::ostream &out=std::cout)
Prints the structural information of the vector object to the output stream. This method will not p...
Definition: pzvec.h:482
Contains TPZAnalysis class which implements the sequence of actions to perform a finite element analy...
void Print(std::ostream &out=std::cout)
virtual void SetFileName(const std::string &filename)
Sets the name of the output file.
Definition: pzdxmesh.cpp:418
Class which implements a tension boundary condition, where the tensor is computed from a finite eleme...
Definition: pzbctension.h:24
Definition: pzmatrix.h:52
void SetStructuralMatrix(TPZAutoPointer< TPZStructMatrix > strmatrix)
Set structural matrix as auto pointer for analysis.
Definition: pzanalysis.cpp:82
void Print(const std::string &name, std::ostream &out)
Print connect and solution information.
Definition: pzanalysis.cpp:447
clarg::argBool bc("-bc", "binary checkpoints", false)
virtual TPZGeoEl * CreateGeoElement(MElementType type, TPZVec< int64_t > &cornerindexes, int matid, int64_t &index, int reftype=1)
Generic method for creating a geometric element. Putting this method centrally facilitates the modifi...
Definition: pzgmesh.cpp:1296
Implements the interface of the graphmesh to the OpenDX graphics package. Post processing.
Definition: pzdxmesh.h:17
Defines step solvers class. Solver.
Definition: pzmganalysis.h:17
void SetSolver(TPZMatrixSolver< STATE > &solver)
Set solver matrix.
TPZMulticamadaOrthotropic(REAL z, REAL dx, REAL dy, int64_t nelx, int64_t nely, REAL Correct=1.0)
Construtor.
void Tensor(TPZVec< REAL > &x, int placa, TPZFMatrix< REAL > &tensor)
Tensor which needs to be applied at the given coordinate.
TPZCompMesh * Mesh() const
Returns the pointer to the computational mesh.
Definition: pzanalysis.h:180
virtual int Dimension() const =0
Returns the integrable dimension of the material.
Contains declaration of TPZGeoElBC class, it is a structure to help the construction of geometric ele...
int64_t NElements() const
Access method to query the number of elements of the vector.
void AnalyticTensor(TPZVec< REAL > &co, TPZFMatrix< REAL > &tensor)
Compute a tension state corresponding to the difference between the target state and tension state l...
Contains the TPZMatOrthotropic class.
Contains the TPZBCTension class which implements a tension boundary condition.
const int bc3
Definition: main.cpp:88
TPZManVector< REAL, 3 > fDiry
const int bc4
Definition: main.cpp:89
void SetDefaultOrder(int order)
Definition: pzcmesh.h:403
Implements SkyLine Structural Matrices. Structural Matrix.
TPZFMatrix< STATE > & Solution()
Returns the solution matrix.
Definition: pzanalysis.h:177
This abstract class defines the behaviour which each derived class needs to implement.
Definition: TPZMaterial.h:39
void SetResolution(int res)
Sets resolution.
Definition: pzgraphmesh.h:86
int Zero() override
Makes Zero all the elements.
Definition: pzfmatrix.h:651
void Resize(const int newsize)
Increase the size of the chunk vector.
Definition: pzadmchunk.h:280
Contains declaration of TPZMesh class which defines a geometrical mesh and contains a corresponding l...
Implements the sequence of actions to perform a finite element analysis. Analysis.
Definition: pzanalysis.h:32
void Push(const T object)
Pushes a copy of the object on the stack.
Definition: pzstack.h:80
expr_ dx(i) *cos(expr_.val())
virtual void DrawSolution(TPZBlock< REAL > &Sol)
Draw solution as dx file.
Definition: pzdxmesh.cpp:384
virtual void LoadSolution()
Load the solution into the computable grid.
Definition: pzanalysis.cpp:441
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
Definition: pzgeoel.h:43
#define DebugStop()
Returns a message to user put a breakpoint in.
Definition: pzerror.h:20
int64_t fNelx
Number of elementos at x and y axes : fNelx, fNely.
This class defines the boundary condition for TPZMaterial objects.
Definition: pzbndcond.h:29
Contains the TPZSkylineStructMatrix class which implements SkyLine Structural Matrices.
TPZAdmChunkVector< TPZGeoNode > & NodeVec()
Definition: pzgmesh.h:140
REAL fCorrect
Relaxation factor to correct resulting forces.
virtual void AutoBuild(const std::set< int > *MaterialIDs)
Creates the computational elements, and the degree of freedom nodes.
Definition: pzcmesh.cpp:308
void PrintCenterForces(std::ostream &out)
Contains the TPZPlacaOrthotropic class.
REAL co[8][3]
Coordinates of the eight nodes.
void PrintTensors(std::ostream &out)
int Redim(const int64_t newRows, const int64_t newCols) override
Redimension a matrix and ZERO your elements.
Definition: pzfmatrix.h:616
virtual void DrawMesh(int numcases)
Draw mesh as dx file.
Definition: pzdxmesh.cpp:93
virtual void Run(std::ostream &out=std::cout)
Calls the appropriate sequence of methods to build a solution or a time stepping sequence.
Definition: pzanalysis.cpp:920
Structure to help the construction of geometric elements along side of a given geometric element...
Definition: pzgeoelbc.h:21
void BuildConnectivity()
Build the connectivity of the grid.
Definition: pzgmesh.cpp:967
int InsertMaterialObject(TPZMaterial *mat)
Insert a material object in the datastructure.
Definition: pzcmesh.cpp:287
TPZCompMesh * fCompMesh
Computational mesh to calculations.
TPZStack< TPZPlacaOrthotropic > fPlacaOrth
Shells vector.
void GenerateMesh()
Creates a computational mesh to all the shells.
This class implements a geometric mesh for the pz environment. Geometry.
Definition: pzgmesh.h:48
TPZManVector< REAL, 3 > fDirx
Implements computational mesh. Computational Mesh.
Definition: pzcmesh.h:47
Definition: pzeltype.h:61
Contains declaration of TPZInterpolatedElement class which implements computational element of the in...
int Id() const
Definition: TPZMaterial.h:170
void Fill(const T &copy, const int64_t from=0, const int64_t numelem=-1)
Will fill the elements of the vector with a copy object.
Definition: pzvec.h:460
TPZGeoMesh * fGeoMesh
Geometric mesh with shells.
Contains TPZStepSolver class which defines step solvers class.
const int bc2
Definition: main.cpp:87
void ComputeCenterForces()
Computes the global efforts of the finite element solution.
int64_t NElements() const
Returns the number of elements of the vector.
Definition: pzvec.h:190
O objeto desta classe representa uma placa do objeto multicamada.
Contains the TPZMulticamadaOrthotropic class.
void SetDirect(const DecomposeType decomp)
Contains the TPZDXGraphMesh class which implements the interface of the graphmesh to the OpenDX graph...
REAL fDx
Dimension of the shells (must to be constant for all shells)
void ComputeSolution(std::ostream &out=std::cout, int print=0)