Commit 2fb89998 authored by Praetorius, Simon's avatar Praetorius, Simon

demos use neumann-boundary

parent a4faf367
cmake_minimum_required(VERSION 3.0) cmake_minimum_required(VERSION 3.0)
project(dune-amdis CXX) project(dune-amdis CXX)
set(ALBERTA_ROOT /opt/software/alberta) # set(ALBERTA_ROOT /opt/software/alberta)
set(ALBERTA_INCLUDE_DIR /opt/software/alberta/include) # set(ALBERTA_INCLUDE_DIR /opt/software/alberta/include)
# set(CMAKE_PREFIX_PATH /opt/software/dune/lib/cmake) # set(CMAKE_PREFIX_PATH /opt/software/dune/lib/cmake)
# set(UG_DIR /opt/software/dune/lib/cmake/ug) # set(UG_DIR /opt/software/dune/lib/cmake/ug)
# set(Vc_DIR /opt/software/dune/lib/cmake/Vc) # 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 if(NOT (dune-common_DIR OR dune-common_ROOT OR
"${CMAKE_PREFIX_PATH}" MATCHES ".*dune-common.*")) "${CMAKE_PREFIX_PATH}" MATCHES ".*dune-common.*"))
string(REPLACE ${CMAKE_PROJECT_NAME} dune-common dune-common_DIR string(REPLACE ${CMAKE_PROJECT_NAME} dune-common dune-common_DIR
......
...@@ -39,7 +39,9 @@ if (Boost_FOUND) ...@@ -39,7 +39,9 @@ if (Boost_FOUND)
endif (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) if (MTL_FOUND)
target_include_directories("duneamdis" PUBLIC ${MTL_INCLUDE_DIRS}) target_include_directories("duneamdis" PUBLIC ${MTL_INCLUDE_DIRS})
# target_link_libraries("duneamdis" PUBLIC ${MTL_LIBRARIES}) # target_link_libraries("duneamdis" PUBLIC ${MTL_LIBRARIES})
...@@ -49,14 +51,14 @@ if (MTL_FOUND) ...@@ -49,14 +51,14 @@ if (MTL_FOUND)
foreach (feature ${CXX_ELEVEN_FEATURE_LIST}) foreach (feature ${CXX_ELEVEN_FEATURE_LIST})
target_compile_definitions("duneamdis" PUBLIC MTL_WITH_${feature}) target_compile_definitions("duneamdis" PUBLIC MTL_WITH_${feature})
endforeach () endforeach ()
if (HAVE_UMFPACK OR ENABLE_SUITESPARSE OR SuiteSparse_FOUND) if (HAVE_UMFPACK OR ENABLE_SUITESPARSE OR SuiteSparse_FOUND)
target_compile_definitions("duneamdis" PUBLIC MTL_HAS_UMFPACK) target_compile_definitions("duneamdis" PUBLIC MTL_HAS_UMFPACK)
endif () endif ()
endif (MTL_FOUND) endif (MTL_FOUND)
install(FILES install(FILES
AdaptBase.hpp AdaptBase.hpp
AdaptInfo.hpp AdaptInfo.hpp
AdaptInstationary.hpp AdaptInstationary.hpp
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
}, },
"output": { "output": {
"filename": "output/ellipt.2d", "filename": "ellipt.2d",
"output directory": "output" "output directory": "output"
} }
} }
......
set(projects2d "heat" "pfc" "stokes" "navier_stokes") set(projects2d "ellipt" "heat" "pfc" "stokes" "navier_stokes")
foreach(project ${projects2d}) foreach(project ${projects2d})
add_executable(${project}2d ${project}.cc) add_executable(${project}2d ${project}.cc)
......
...@@ -9,11 +9,12 @@ ...@@ -9,11 +9,12 @@
#include <dune/amdis/ProblemStat.hpp> #include <dune/amdis/ProblemStat.hpp>
#include <dune/amdis/Terms.hpp> #include <dune/amdis/Terms.hpp>
#include <dune/amdis/common/Literals.hpp> #include <dune/amdis/common/Literals.hpp>
#include <dune/amdis/BoundaryElementIterator.hpp>
using namespace AMDiS; using namespace AMDiS;
// 1 component with polynomial degree 1 // 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 ElliptProblem = ProblemStat<ElliptParam>;
using ElliptProblemInstat = ProblemInstat<ElliptParam>; using ElliptProblemInstat = ProblemInstat<ElliptParam>;
...@@ -57,6 +58,19 @@ int main(int argc, char** argv) ...@@ -57,6 +58,19 @@ int main(int argc, char** argv)
prob.solve(adaptInfo); prob.solve(adaptInfo);
prob.writeFiles(adaptInfo, true); 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(); AMDiS::finalize();
return 0; return 0;
} }
\ No newline at end of file
...@@ -13,27 +13,27 @@ ...@@ -13,27 +13,27 @@
using namespace AMDiS; using namespace AMDiS;
class HeatParam // class HeatParam
{ // {
template <class... Bs> // template <class... Bs>
using FeSpaceTuple = std::tuple<Bs...>; // using FeSpaceTuple = std::tuple<Bs...>;
//
template <class Mesh, int deg> // template <class Mesh, int deg>
using Lagrange = Dune::Functions::PQkNodalBasis<typename Mesh::LeafGridView, deg>; // using Lagrange = Dune::Functions::PQkNodalBasis<typename Mesh::LeafGridView, deg>;
//
public: // public:
static constexpr int dim = AMDIS_DIM; // static constexpr int dim = AMDIS_DIM;
static constexpr int dimworld = AMDIS_DOW; // static constexpr int dimworld = AMDIS_DOW;
static constexpr int nComponents = 1; // static constexpr int nComponents = 1;
//
// default values // // default values
using Mesh = Dune::UGGrid<dim>; // using Mesh = Dune::UGGrid<dim>;
using FeSpaces = FeSpaceTuple<Lagrange<Mesh, 2>>; // using FeSpaces = FeSpaceTuple<Lagrange<Mesh, 2>>;
}; // };
// 1 component with polynomial degree 1 // 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 HeatProblem = ProblemStat<HeatParam>;
using HeatProblemInstat = ProblemInstat<HeatParam>; using HeatProblemInstat = ProblemInstat<HeatParam>;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment