WriteWallSurfaceAreaVTKUnitTest.cpp File Reference
#include <Mercury3D.h>
#include <Species/LinearViscoelasticSpecies.h>
#include <Walls/InfiniteWall.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <locale.h>

Classes

class  AreaVTK
 

Functions

int main (int argc, char **argv)
 

Function Documentation

◆ main()

int main ( int argc  ,
char **  argv 
)
126 {
127  setlocale(LC_ALL, "C");
128 
129  {
130  AreaVTK problem("InfiniteWall");
131  problem.solve(argc, argv);
132 
133  double A0 = problem.getTotalsurfaceAreaFromFile(problem.getName() + "Wall_0.vtu");
134  double A1 = problem.getTotalsurfaceAreaFromFile(problem.getName() + "Wall_1.vtu");
135 
136  double checkedArea = 4.0; // calculated from domain size
137  helpers::check(A0, A1, 0, "Surface areas of first object are equal");
138  helpers::check(A0, checkedArea, 1e-3, "Surface area of first object");
139  }
140 
141  {
142  AreaVTK problem("../SelfTests/Walls/Casing.stl");
143  problem.solve(argc, argv);
144 
145  double A0 = problem.getTotalsurfaceAreaFromFile(problem.getName() + "Wall_0.vtu");
146  double A1 = problem.getTotalsurfaceAreaFromFile(problem.getName() + "Wall_1.vtu");
147 
148  double checkedArea = 675075.0; // checked via MeshLab
149  helpers::check(A0, A1, 0, "Surface areas of second object are equal");
150  helpers::check(A0, checkedArea, 1e-1, "Surface area of second object");
151  }
152 
153  return 0;
154 }
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Definition: WriteWallSurfaceAreaVTKUnitTest.cpp:15
void check(double real, double ideal, double error, std::string errorMessage)
Definition: TestHelpers.cc:16
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References helpers::check(), e(), and problem.