Skip to content
Snippets Groups Projects
Commit 41c5b9cc authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

Merge branch 'add-test/cylinder' into 'master'

Add test for a cylinder

See merge request !16
parents 5962aaf7 0879c827
No related branches found
No related tags found
1 merge request!16Add test for a cylinder
Pipeline #7961 passed
$MeshFormat
2.2 0 8
$EndMeshFormat
$Nodes
10
1 1.0 0.0 0.0
2 0.309016994375 0.951056516295 0.0
3 -0.809016994375 0.587785252292 0.0
4 -0.809016994375 -0.587785252292 0.0
5 0.309016994375 -0.951056516295 0.0
6 1.0 0.0 1.0
7 0.309016994375 0.951056516295 1.0
8 -0.809016994375 0.587785252292 1.0
9 -0.809016994375 -0.587785252292 1.0
10 0.309016994375 -0.951056516295 1.0
$EndNodes
$Elements
10
1 2 0 1 2 6
2 2 0 2 7 6
3 2 0 2 3 8
4 2 0 2 8 7
5 2 0 3 4 8
6 2 0 4 9 8
7 2 0 4 5 10
8 2 0 4 10 9
9 2 0 5 1 6
10 2 0 5 6 10
$EndElements
foreach (geometry RANGE 1 3)
foreach (geometry RANGE 1 4)
foreach (order RANGE 1 4)
dune_add_test(NAME convergence-g${geometry}-p${order}
SOURCES convergencetest.cc
......
......@@ -26,6 +26,7 @@
// 1 .. Sphere
// 2 .. Ellipsoid
// 3 .. Torus
// 4 .. Cylinder
#ifndef GEOMETRY_TYPE
#define GEOMETRY_TYPE 1
#endif
......@@ -36,8 +37,10 @@
#include <dune/curvedgrid/geometries/ellipsoid.hh>
#elif GEOMETRY_TYPE == 3
#include <dune/curvedgrid/geometries/torus.hh>
#elif GEOMETRY_TYPE == 4
#include <dune/curvedgrid/geometries/cylinder.hh>
#else
#error "Unknown GEOMETRY_TYPE. Must bei either 1, 2, or 3"
#error "Unknown GEOMETRY_TYPE. Must bei either 1, 2, 3, or 4"
#endif
// polynomial order of geometry
......@@ -66,6 +69,9 @@ int main (int argc, char** argv)
#elif GEOMETRY_TYPE == 3
std::unique_ptr<HostGrid> hostGrid = GmshReader<HostGrid>::read( DUNE_GRID_PATH "torus2.msh");
auto gridFct = torusGridFunction<HostGrid>(2.0, 1.0);
#elif GEOMETRY_TYPE == 4
std::unique_ptr<HostGrid> hostGrid = GmshReader<HostGrid>::read( DUNE_GRID_PATH "cylinder.msh");
auto gridFct = cylinderGridFunction<HostGrid>(1.0);
#endif
CurvedGrid grid(*hostGrid, gridFct, order);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment