diff --git a/CMakeLists.txt b/CMakeLists.txt index 9969a12f59cf4b1f74e8d5fe4bab73e6bd8ab329..859fe6b347a08efe905e91e78aac8eb1aaf5dd82 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,14 +1,12 @@ cmake_minimum_required(VERSION 3.0) project(dune-amdis CXX) -set(ALBERTA_ROOT /opt/software/alberta) -set(ALBERTA_INCLUDE_DIR /opt/software/alberta/include) +# set(ALBERTA_ROOT /opt/software/alberta) +# set(ALBERTA_INCLUDE_DIR /opt/software/alberta/include) # set(CMAKE_PREFIX_PATH /opt/software/dune/lib/cmake) # set(UG_DIR /opt/software/dune/lib/cmake/ug) # set(Vc_DIR /opt/software/dune/lib/cmake/Vc) -set(MTL_DIR ${CMAKE_SOURCE_DIR}/install/MTL/share/mtl) - if(NOT (dune-common_DIR OR dune-common_ROOT OR "${CMAKE_PREFIX_PATH}" MATCHES ".*dune-common.*")) string(REPLACE ${CMAKE_PROJECT_NAME} dune-common dune-common_DIR diff --git a/dune/amdis/CMakeLists.txt b/dune/amdis/CMakeLists.txt index 1271b2a43a4c5b771886bca46475be716d6f06cc..3d0ec69a877d41ae81273377d00fdffb612d120e 100644 --- a/dune/amdis/CMakeLists.txt +++ b/dune/amdis/CMakeLists.txt @@ -39,7 +39,9 @@ if (Boost_FOUND) endif (Boost_FOUND) -find_package(MTL REQUIRED) +find_package(MTL REQUIRED + PATHS ${CMAKE_SOURCE_DIR}/install/MTL/share/mtl + /iwr/modules/mtl4/share/mtl) if (MTL_FOUND) target_include_directories("duneamdis" PUBLIC ${MTL_INCLUDE_DIRS}) # target_link_libraries("duneamdis" PUBLIC ${MTL_LIBRARIES}) @@ -49,14 +51,14 @@ if (MTL_FOUND) foreach (feature ${CXX_ELEVEN_FEATURE_LIST}) target_compile_definitions("duneamdis" PUBLIC MTL_WITH_${feature}) endforeach () - + if (HAVE_UMFPACK OR ENABLE_SUITESPARSE OR SuiteSparse_FOUND) target_compile_definitions("duneamdis" PUBLIC MTL_HAS_UMFPACK) endif () endif (MTL_FOUND) -install(FILES +install(FILES AdaptBase.hpp AdaptInfo.hpp AdaptInstationary.hpp diff --git a/init/ellipt.json.2d b/init/ellipt.json.2d index e927c98f5f82d005a884741bb484be6b39ab8f33..a8ea6cce33adc5336f39dc8bcabd17cb70408fc7 100644 --- a/init/ellipt.json.2d +++ b/init/ellipt.json.2d @@ -19,7 +19,7 @@ }, "output": { - "filename": "output/ellipt.2d", + "filename": "ellipt.2d", "output directory": "output" } } diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c25726357bb6259168f40d0a8fcfb21887e8808b..1d020f496909b4704a2b30acef29de6b24f05c07 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,5 +1,5 @@ -set(projects2d "heat" "pfc" "stokes" "navier_stokes") +set(projects2d "ellipt" "heat" "pfc" "stokes" "navier_stokes") foreach(project ${projects2d}) add_executable(${project}2d ${project}.cc) diff --git a/src/ellipt.cc b/src/ellipt.cc index 4260dc27f870efff043ed8b5e5e34bf3e1af1c1a..1f5fce693925b654a3ab3fb057b3ed69fb4bb908 100644 --- a/src/ellipt.cc +++ b/src/ellipt.cc @@ -9,11 +9,12 @@ #include <dune/amdis/ProblemStat.hpp> #include <dune/amdis/Terms.hpp> #include <dune/amdis/common/Literals.hpp> +#include <dune/amdis/BoundaryElementIterator.hpp> using namespace AMDiS; // 1 component with polynomial degree 1 -using ElliptParam = ProblemStatTraits<AMDIS_DIM, AMDIS_DOW, 1>; +using ElliptParam = DefaultTraitsMesh<Dune::AlbertaGrid<AMDIS_DIM, AMDIS_DOW>, AMDIS_DIM, AMDIS_DOW, 1>; using ElliptProblem = ProblemStat<ElliptParam>; using ElliptProblemInstat = ProblemInstat<ElliptParam>; @@ -57,6 +58,19 @@ int main(int argc, char** argv) prob.solve(adaptInfo); prob.writeFiles(adaptInfo, true); + + AMDIS_MSG("----------------------------"); + for (auto const& b : boundary_elements(*prob.getMeshView())) + AMDIS_MSG("b = " << b.geometry().center()); + + AMDIS_MSG("----------------------------"); + size_t i = 0; + for (auto const& f : boundary_facets(*prob.getMeshView())) { + AMDIS_MSG("f = " << f.geometry().center()/* << ", id = " << f.boundaryId()*/); + if (i++ >= 10) + break; + } + AMDiS::finalize(); return 0; } \ No newline at end of file diff --git a/src/heat.cc b/src/heat.cc index 5f251aca474b791fd2c5fbbb5a29a0b357391e98..ccb619f3821312e68571505510c4ac295740e49e 100644 --- a/src/heat.cc +++ b/src/heat.cc @@ -13,27 +13,27 @@ using namespace AMDiS; -class HeatParam -{ - template <class... Bs> - using FeSpaceTuple = std::tuple<Bs...>; - - template <class Mesh, int deg> - using Lagrange = Dune::Functions::PQkNodalBasis<typename Mesh::LeafGridView, deg>; - -public: - static constexpr int dim = AMDIS_DIM; - static constexpr int dimworld = AMDIS_DOW; - static constexpr int nComponents = 1; - - // default values - using Mesh = Dune::UGGrid<dim>; - using FeSpaces = FeSpaceTuple<Lagrange<Mesh, 2>>; -}; +// class HeatParam +// { +// template <class... Bs> +// using FeSpaceTuple = std::tuple<Bs...>; +// +// template <class Mesh, int deg> +// using Lagrange = Dune::Functions::PQkNodalBasis<typename Mesh::LeafGridView, deg>; +// +// public: +// static constexpr int dim = AMDIS_DIM; +// static constexpr int dimworld = AMDIS_DOW; +// static constexpr int nComponents = 1; +// +// // default values +// using Mesh = Dune::UGGrid<dim>; +// using FeSpaces = FeSpaceTuple<Lagrange<Mesh, 2>>; +// }; // 1 component with polynomial degree 1 -// using HeatParam = ProblemStatTraits<AMDIS_DIM, AMDIS_DOW, 1>; +using HeatParam = DefaultTraitsMesh<Dune::AlbertaGrid<AMDIS_DIM, AMDIS_DOW>, AMDIS_DIM, AMDIS_DOW, 2>; using HeatProblem = ProblemStat<HeatParam>; using HeatProblemInstat = ProblemInstat<HeatParam>;