diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index f22a624f481378fa39c4f29a617197418ced7db3..d3206b905d6adf7910e7ff823f8c0cb96da96b0e 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -5,4 +5,4 @@ add_subdirectory("io") add_subdirectory("material") add_subdirectory("multidomain") add_subdirectory("porousmediumflow") -add_subdirectory("implicit") +add_subdirectory("discretization") diff --git a/test/discretization/CMakeLists.txt b/test/discretization/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..a2f10ebf0abf26b8dd0a0bdf6787b6a36c8df9fc --- /dev/null +++ b/test/discretization/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory("cellcentered") diff --git a/test/discretization/cellcentered/CMakeLists.txt b/test/discretization/cellcentered/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..5ac953e3e293c32368913d8e9cdcd511ad2c184d --- /dev/null +++ b/test/discretization/cellcentered/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory("tpfa") diff --git a/test/discretization/cellcentered/tpfa/CMakeLists.txt b/test/discretization/cellcentered/tpfa/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..56fa30fedeaf0377736cecef3c0a15073ddd6893 --- /dev/null +++ b/test/discretization/cellcentered/tpfa/CMakeLists.txt @@ -0,0 +1,2 @@ +add_dumux_test(test_tpfafvgeometry test_tpfafvgeometry test_tpfafvgeometry.cc + ${CMAKE_CURRENT_BINARY_DIR}/test_tpfafvgeometry) diff --git a/test/implicit/test_fvelementgeometry.cc b/test/discretization/cellcentered/tpfa/test_tpfafvgeometry.cc similarity index 87% rename from test/implicit/test_fvelementgeometry.cc rename to test/discretization/cellcentered/tpfa/test_tpfafvgeometry.cc index ab4e30f4e0367c66b979db651a5c104b6fc1accb..f92d6c215b3f7c475495b1bfd5b8ffdd31557a47 100644 --- a/test/implicit/test_fvelementgeometry.cc +++ b/test/discretization/cellcentered/tpfa/test_tpfafvgeometry.cc @@ -32,10 +32,10 @@ #include <dune/grid/common/mcmgmapper.hh> #include <dumux/implicit/cellcentered/tpfa/properties.hh> -#include <dumux/implicit/cellcentered/tpfa/globalfvgeometry.hh> -#include <dumux/implicit/fvelementgeometry.hh> -#include <dumux/implicit/subcontrolvolume.hh> -#include <dumux/implicit/subcontrolvolumeface.hh> +#include <dumux/discretization/cellcentered/tpfa/globalfvgeometry.hh> +#include <dumux/discretization/cellcentered/tpfa/fvelementgeometry.hh> +#include <dumux/discretization/cellcentered/tpfa/subcontrolvolume.hh> +#include <dumux/discretization/cellcentered/tpfa/subcontrolvolumeface.hh> namespace Dumux { @@ -91,8 +91,7 @@ int main (int argc, char *argv[]) try using GlobalPosition = Dune::FieldVector<Scalar, dimworld>; using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume); using SubControlVolumeFace = typename GET_PROP_TYPE(TypeTag, SubControlVolumeFace); - using FVElementGeometryVector = typename GET_PROP_TYPE(TypeTag, FVElementGeometryVector); - + using GlobalFVGeometry = typename GET_PROP_TYPE(TypeTag, GlobalFVGeometry); using Problem = typename GET_PROP_TYPE(TypeTag, Problem); // make a grid @@ -104,15 +103,16 @@ int main (int argc, char *argv[]) try Problem problem(leafGridView); - FVElementGeometryVector fvGeometries(leafGridView); - fvGeometries.update(problem); + GlobalFVGeometry global(leafGridView); + global.update(problem); // iterate over elements. For every element get fv geometry and loop over scvs and scvfaces for (const auto& element : elements(leafGridView)) { auto eIdx = problem.elementMapper().index(element); std::cout << std::endl << "Checking fvGeometry of element " << eIdx << std::endl; - auto fvGeometry = fvGeometries.fvGeometry(eIdx); + auto fvGeometry = localView(global); + fvGeometry.bind(element); auto range = scvs(fvGeometry); NoopFunctor<SubControlVolume> op; @@ -121,7 +121,7 @@ int main (int argc, char *argv[]) try for (auto&& scv : scvs(fvGeometry)) { - std::cout << "-- scv center at: " << scv.center() << std::endl; + std::cout << "-- scv " << scv.index() << " center at: " << scv.center() << std::endl; } auto range2 = scvfs(fvGeometry); @@ -131,7 +131,7 @@ int main (int argc, char *argv[]) try for (auto&& scvf : scvfs(fvGeometry)) { - std::cout << "-- scvf center at: " << scvf.center(); + std::cout << "-- scvf " << scvf.index() << " ip at: " << scvf.ipGlobal(); if (scvf.boundary()) std::cout << " (on boundary)."; std::cout << std::endl; } diff --git a/test/implicit/CMakeLists.txt b/test/implicit/CMakeLists.txt deleted file mode 100644 index 33078f426d90f1b85dd44ac8a818e337388538d3..0000000000000000000000000000000000000000 --- a/test/implicit/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -add_dumux_test(test_fvelementgeometry test_fvelementgeometry test_fvelementgeometry.cc - ${CMAKE_CURRENT_BINARY_DIR}/test_fvelementgeometry) -set(CMAKE_BUILD_TYPE Debug)