NeoPZ
testShape.cc
Go to the documentation of this file.
1 #include "pzreal.h"
2 #include "fadType.h"
3 #include "pzshapecube.h"
4 #include <iostream>
5 #include "error.h"
6 
7 void error(char * string)
8 {
9  if(string)cerr << endl << string << endl;
10 
11 }
12 
13 int main(){
14 
15 
16  TPZVec<REAL> point(3,0.);
17  TPZVec<int> id(8);
18  int i;
19 
20  for(i = 0; i< 8; i ++)
21  {
22  id[i] = i;
23  }
24 
25  TPZVec<int> order(19);
26  for(i = 0; i< 19; i ++)
27  {
28  order[i] = 3;
29  }
30 
31  TPZVec<FADREAL> phi(64);
32  TPZFMatrix OldPhi(64,1), OldDPhi(3,64);
33  TPZFMatrix DiffPhi(64,1), DiffDPhi(3,64);
34 
35  TPZShapeCube::ShapeCube(point, id, order, phi);
36  TPZShapeCube::ShapeCube(point, id, order, OldPhi, OldDPhi);
37 
38  cout << "Calculated by Fad" << phi;
39  cout << "Old derivative method (phi)\n" << OldPhi;
40  cout << "Old derivative method (dPhi)\n" << OldDPhi;
41 
42  shapeFAD::ExplodeDerivatives(phi, DiffPhi, DiffDPhi);
43  DiffPhi-=OldPhi;
44  DiffDPhi-=OldDPhi;
45  cout << "FAD derivative method (phi)\n" << /*TPZFMatrix (OldPhi -*/ DiffPhi;
46  cout << "FAD derivative method (dPhi)\n" <</* TPZFMatrix (OldDPhi -*/ DiffDPhi;
47  return 0;
48 }
int main()
Definition: testShape.cc:13
void error(char *string)
Definition: testShape.cc:7
Contains TPZShapeCube class which implements the shape functions of a hexaedral element.
Full matrix class. Matrix.
Definition: pzfmatrix.h:32
Contains the declaration of TPZFlopCounter class and TPZCounter struct.