|
dune-pdelab 2.9
|
Loading...
Searching...
No Matches
recipe-blocking.cc
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>
#include <dune/pdelab.hh>
{
// Initialize Mpi
Dune::MPIHelper::instance(argc, argv);
// need a grid in order to test grid functions
Dune::FieldVector<double,dim> L(5.0);
Grid grid(L,N);
using DF = double;
// instantiate finite element maps
FEM fem(grid.leafGridView());
//Set up constraints
// [Scalar grid function space]
// Set up scalar grid function space
typedef Dune::PDELab::GridFunctionSpace<GV, FEM, Constraints, Dune::PDELab::ISTL::VectorBackend<>> SCALAR_GFS;
SCALAR_GFS U1(grid.leafGridView(),fem); U1.name("U1");
SCALAR_GFS U2(grid.leafGridView(),fem); U2.name("U2");
{
// [Lexiographic blocked type]
// Use lexiographical blocked ordering
// Set up power grid function space
using VBE = Dune::PDELab::ISTL::VectorBackend<Dune::PDELab::ISTL::Blocking::fixed>; // blocking vector backend
dim, // block size
VBE, // blocked vector backend
LexiographicOrderingTag> GFS;
GFS gfs(U1,U2);
}
{
// [Entity blocked type]
// Use entity blocked ordering
// Setting up a composite grid function space with the same scalar grid function space in both components
using VBE = Dune::PDELab::ISTL::VectorBackend<Dune::PDELab::ISTL::Blocking::fixed>; // blocking vector backend
EntityOrderingTag,
SCALAR_GFS, SCALAR_GFS> GFS;
GFS gfs(U1,U2);
}
}
int main(int argc, char **argv)
static constexpr size_type N()
static DUNE_EXPORT MPIHelper & instance()
LeafGridView leafGridView() const
Definition istl/descriptors.hh:48
Dirichlet Constraints construction.
Definition conforming.hh:38
Definition qkfem.hh:20
base class for tuples of grid function spaces base class that holds implementation of the methods thi...
Definition compositegridfunctionspace.hh:53
base class for tuples of grid function spaces product of identical grid function spaces base class th...
Definition powergridfunctionspace.hh:49
Indicate blocking of the unknowns by grid entity.
Definition gridfunctionspace/tags.hh:53
Indicate lexicographic ordering of the unknowns of non-leaf grid function spaces.
Definition gridfunctionspace/tags.hh:63
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8