Programming tasks to Scientific Computing I
ex3.cpp
Go to the documentation of this file.
1 
5 #include <iostream>
6 
7 #include <adaptiveTriangMesh.h>
8 #include <configuratorsShellFE.h>
9 #include <EigenDataContainer.h>
10 #include <quadratureShellFE.h>
11 #include <shellHandler.h>
12 #include <triangleShellFE.h>
13 
14 #include "errorMeasurements.h"
15 #include "errorEstimator.h"
17 
18 using namespace std;
19 
20 // typedefs for better code readability
21 typedef double RealType;
26 
27 void printHelp()
28 {
29  cout << "Usage: ex3 meshFile resultPrefix [numRefinements]\n";
30  cout << "\tmeshFile\tLegacy VTK file defining the Finite Element mesh "
31  << "to use\n";
32  cout << "\tresultPrefix\tPrefix for result files, counter will be appended\n";
33  cout << "\tnumRefinements\tNumber of times the mesh is refined"
34  << " (default: 10)\n\n";
35 }
36 
38 int main(int argc, char **argv)
39 {
40  unsigned int numRefinements = 10;
41  switch (argc) {
42  case 3: {
43  // First two arguments are handled below
44  break;
45  }
46  case 4: {
47  numRefinements = atoi(argv[3]);
48  break;
49  }
50  default: {
51  printHelp();
52  return 1;
53  }
54  }
55 
59 
60  return 0;
61 }
shellFE::UnitTriangMeshConfiguratorP1< DataTypeContainerShellFE, MeshType, QuadType > ConfiguratorType
Definition: ex3.cpp:25
shellFE::CenterOfMassQuadrature< RealType, typename DataTypeContainerShellFE::DomVecType > QuadType
Definition: ex3.cpp:24
Different quadrature types for triangular meshes.
int main(int argc, char **argv)
Main function containing the basic structure of the code.
Definition: ex3.cpp:38
void printHelp()
Definition: ex3.cpp:27
shellFE::ShellElementWithTangentSpaceAtVertex< DataTypeContainerShellFE > TriangleType
Definition: ex3.cpp:22
double RealType
Definition: ex3.cpp:21
shellFE::AdaptiveTriangMesh< DataTypeContainerShellFE, TriangleType > MeshType
Definition: ex3.cpp:23
Eigen typedefs for use with the TriangleMesh.
Configurator for Finite Elements.
Triangle which has a tangent space at each node.