#include #include #include #include #include #include #include #include #include using namespace AMDiS; template void test() { // use T as coordinate type using HostGrid = Dune::YaspGrid<2, Dune::EquidistantCoordinates>; HostGrid hostGrid({T(1), T(1)}, {8,8}); AdaptiveGrid grid(hostGrid); // use T as range type for basis using namespace Dune::Functions::BasisFactory; #if DUNE_VERSION_LT(DUNE_FUNCTIONS,2,7) GlobalBasis basis{grid.leafGridView(), power<1>(lagrange<1>(), flatLexicographic())}; #else GlobalBasis basis{grid.leafGridView(), power<1>(lagrange<1,T>(), flatLexicographic())}; #endif using Basis = decltype(basis); // use T as coefficient type using Param = DefaultProblemTraits; msg("Test<{}>", __PRETTY_FUNCTION__); ProblemStat prob("ellipt", grid, basis); prob.initialize(INIT_ALL); prob.boundaryManager()->setBoxBoundary({1,1,2,2}); prob.addMatrixOperator(sot(T(1)), 0, 0); prob.addVectorOperator(zot(T(1)), 0); prob.addDirichletBC(BoundaryType{1}, 0,0, T(0)); AdaptInfo adaptInfo("adapt"); msg(" test copy constructor of problem"); auto prob2(prob); AdaptStationary adaptStat2("adapt", prob2, adaptInfo); adaptStat2.adapt(); msg(" test move constructor of problem"); auto prob3(std::move(prob2)); AdaptStationary adaptStat3("adapt", prob3, adaptInfo); adaptStat3.adapt(); } int main(int argc, char** argv) { Environment env(argc, argv); #if !AMDIS_HAS_PETSC || PETSC_USE_REAL_SINGLE test(); #endif #if !AMDIS_HAS_PETSC || PETSC_USE_REAL_DOUBLE test(); #endif #if !AMDIS_HAS_PETSC test(); #endif #if HAVE_QUADMATH && (!AMDIS_HAS_PETSC || PETSC_USE_REAL___FLOAT128) && (!AMDIS_HAS_EIGEN) test(); #endif return 0; }