Skip to content
Snippets Groups Projects
Commit 1615ae66 authored by Karsten Rink's avatar Karsten Rink Committed by Dmitri Naumov
Browse files

added tests

parent 10509c5c
No related branches found
No related tags found
No related merge requests found
......@@ -189,11 +189,16 @@ int main(int argc, char* argv[])
grid.getElementsInVolume(min_vol, max_vol);
auto const* element =
MeshLib::ProjectPointOnMesh::getProjectedElement(elems, *node);
(*node)[2] =
(element != nullptr)
? MeshLib::ProjectPointOnMesh::getElevation(*element, *node)
: getClosestPointElevation(*node, ground_truth->getNodes(),
max_dist);
if (element != nullptr)
{
(*node)[2] =
MeshLib::ProjectPointOnMesh::getElevation(*element, *node);
}
else
{
(*node)[2] = getClosestPointElevation(
*node, ground_truth->getNodes(), max_dist);
}
}
}
......@@ -202,6 +207,7 @@ int main(int argc, char* argv[])
// node weighted by 1
if (lowpass_arg.isSet())
{
INFO("lowpass");
const std::size_t nNodes(mesh->getNumberOfNodes());
std::vector<MeshLib::Node*> nodes(mesh->getNodes());
......
......@@ -946,3 +946,21 @@ AddTest(
line_60_heat_line_60_heat_ts_0_t_0.000000.xdmf line_60_heat_line_60_heat_ts_0_t_0.000000.xdmf temperature temperature 1e-13 0
line_60_heat_line_60_heat_ts_0_t_0.000000.xdmf line_60_heat_line_60_heat_ts_0_t_0.000000.xdmf heat_flux heat_flux 1e-13 0
)
MeshTest(
NAME MapMeshToMesh_Test
PATH MeshGeoToolsLib/Hamburg
WORKING_DIRECTORY ${Data_SOURCE_DIR}/MeshGeoToolsLib/Hamburg
EXECUTABLE MeshMapping
EXECUTABLE_ARGS -i plain.vtu -o ${Data_BINARY_DIR}/MeshGeoToolsLib/Hamburg/meshmapping.vtu -m 00-surface.vtu -d 150
DIFF_DATA meshmapping.vtu meshmapping.vtu 8e-3
)
MeshTest(
NAME MapMeshToRaster_Test
PATH MeshGeoToolsLib/Hamburg
WORKING_DIRECTORY ${Data_SOURCE_DIR}/MeshGeoToolsLib/Hamburg
EXECUTABLE MeshMapping
EXECUTABLE_ARGS -i plain.vtu -o ${Data_BINARY_DIR}/MeshGeoToolsLib/Hamburg/rastermapping.vtu -r 00-raster.asc -s 100
DIFF_DATA rastermapping.vtu rastermapping.vtu 1e-14
)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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