See explanation at Setting up blocked data structures
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <iostream>
#include <dune/common/filledarray.hh>
#include <dune/common/parallel/mpihelper.hh>
#include <dune/grid/yaspgrid.hh>
int main(
int argc,
char** argv)
{
try{
Dune::MPIHelper::instance(argc, argv);
constexpr
unsigned int dim = 2;
Dune::FieldVector<double,dim> L(5.0);
std::array<int,dim> N(Dune::filledArray<dim,int>(64));
typedef Dune::YaspGrid<dim> Grid;
Grid grid(L,N);
using DF = double;
using GV = decltype(grid.leafGridView());
FEM fem(grid.leafGridView());
SCALAR_GFS U1(grid.leafGridView(),fem); U1.name("U1");
SCALAR_GFS U2(grid.leafGridView(),fem); U2.name("U2");
{
VBE,
LexiographicOrderingTag> GFS;
GFS gfs(U1,U2);
}
{
EntityOrderingTag,
SCALAR_GFS, SCALAR_GFS> GFS;
GFS gfs(U1,U2);
}
return 0;
}
catch (Dune::Exception &
e){
std::cerr <<
"Dune reported error: " <<
e << std::endl;
return 1;
}
catch (...){
std::cerr << "Unknown exception thrown!" << std::endl;
return 1;
}
}
int main(int argc, char **argv)
Definition: recipe-blocking.cc:42