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

added test for ctype

parent 47b09433
No related branches found
No related tags found
1 merge request!64Template parameter for ctype
......@@ -291,6 +291,20 @@ int main (int argc, char *argv[]) try
std::cout << " Check if has multiple neighbor functionality" << std::endl;
traversal(*gridStar);
}
{
std::cout << "\n################################################\n";
std::cout << "Checking FoamGrid<2, 3, float> (2d in 3d grid with float coordinates)\n";
std::cout << "################################################\n\n";
std::cout << " Creating grid" << std::endl;
std::shared_ptr<FoamGrid<2, 3, float>> grid3d( make2Din3DHybridTestGrid<FoamGrid<2, 3, float> >() );
std::cout << " Calling gridcheck" << std::endl;
gridcheck(*grid3d);
std::cout << " Calling checkIntersectionIterator" << std::endl;
checkIntersectionIterator(*grid3d);
}
}
// //////////////////////////////////
// Error handler
......
......@@ -25,7 +25,8 @@ ToUniquePtr<GridType> make2Din3DHybridTestGrid()
// The list of grid vertex positions
int numVertices = 16;
double vertices[16][3] = {{0, 0, 0},
using ctype = typename GridType::ctype;
ctype vertices[16][3] = {{0, 0, 0},
{0.5, 0, 0},
{0.5, 0.5, 0},
{0, 0.5, 0},
......@@ -44,7 +45,7 @@ ToUniquePtr<GridType> make2Din3DHybridTestGrid()
// Create the grid vertices
for (int i=0; i<numVertices; i++) {
Dune::FieldVector<double,3> pos;
Dune::FieldVector<ctype,3> pos;
pos[0] = vertices[i][0];
pos[1] = vertices[i][1];
pos[2] = vertices[i][2];
......
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