DataTransferTest3d.cpp 1.19 KB
 Müller, Felix committed Feb 26, 2019 1 `````` `````` Praetorius, Simon committed Apr 26, 2019 2 ``````#include `````` Müller, Felix committed Feb 26, 2019 3 4 5 6 ``````#include "DataTransferTest.hpp" int main(int argc, char** argv) { `````` Praetorius, Simon committed Apr 26, 2019 7 8 `````` Environment env(argc, argv); `````` Praetorius, Simon committed Jan 11, 2021 9 ``````#if HAVE_DUNE_UGGRID `````` Müller, Felix committed Feb 26, 2019 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 `````` using Grid = Dune::UGGrid<3>; #else using Grid = Dune::YaspGrid<3>; #endif using Domain = typename Dune::FieldVector; // polynomial of order 1 auto p1 = [](const Domain& x) -> double { return {0.5 + 0.25*(x[0]+x[2])}; }; // polynomial of order 2 auto p2 = [](const Domain& x) -> double { return {0.5 + 0.25*(2*std::pow(x[0],2) + x[0]*x[1] - std::pow(x[2],2))}; }; // polynomial of order 3 auto p3 = [](const Domain& x) -> double { return {0.5 + 0.25*(2*std::pow(x[0],3) + x[0]*x[1] - std::pow(x[2],3))}; }; // analytic function auto f = [](const Domain& x) -> double { return {0.5 + 0.25*(std::sin(2*pi*x[0]) + 0.25*std::cos(6*pi*x[2]))}; }; AMDIS_TEST( (unchanged_test< Lagrange3 >({f})) ); AMDIS_TEST( (coarsen_test< Lagrange3 >({f})) ); AMDIS_TEST( (refine_test< Lagrange3 >({p3})) ); AMDIS_TEST( (unchanged_test< TaylorHood >({f,f,f,f})) ); AMDIS_TEST( (coarsen_test< TaylorHood >({f,f,f,f})) ); AMDIS_TEST( (refine_test< TaylorHood >({p2,p2,p2,p1})) ); return report_errors(); }``````