3#ifndef DUNE_PDELAB_BOILERPLATE_PDELAB_HH
4#define DUNE_PDELAB_BOILERPLATE_PDELAB_HH
38#include<dune/grid/albertagrid.hh>
39#include <dune/grid/albertagrid/dgfparser.hh>
45#include<dune/alugrid/grid.hh>
46#include <dune/alugrid/dgf.hh>
49#include <dune/grid/io/file/gmshreader.hh>
54#include <dune/istl/solvercategory.hh>
59#include <dune/pdelab/common/function.hh>
60#include <dune/pdelab/common/functionutilities.hh>
61#include <dune/pdelab/common/topologyutility.hh>
62#include <dune/pdelab/common/vtkexport.hh>
63#include <dune/pdelab/backend/istl.hh>
64#include <dune/pdelab/constraints/conforming.hh>
65#include <dune/pdelab/constraints/hangingnode.hh>
66#include <dune/pdelab/constraints/p0.hh>
67#include <dune/pdelab/constraints/p0ghost.hh>
68#include <dune/pdelab/constraints/common/constraints.hh>
69#include <dune/pdelab/gridfunctionspace/gridfunctionspace.hh>
70#include <dune/pdelab/gridfunctionspace/gridfunctionspaceutilities.hh>
71#include <dune/pdelab/gridfunctionspace/interpolate.hh>
72#include <dune/pdelab/gridoperator/gridoperator.hh>
73#include <dune/pdelab/gridoperator/onestep.hh>
74#include <dune/pdelab/stationary/linearproblem.hh>
75#include <dune/pdelab/finiteelementmap/pkfem.hh>
76#include <dune/pdelab/finiteelementmap/p0fem.hh>
77#include <dune/pdelab/finiteelementmap/opbfem.hh>
78#include <dune/pdelab/finiteelementmap/qkfem.hh>
79#include <dune/pdelab/finiteelementmap/qkdg.hh>
80#include <dune/pdelab/adaptivity/adaptivity.hh>
81#include <dune/pdelab/instationary/onestep.hh>
82#include <dune/pdelab/common/instationaryfilenamehelper.hh>
83#include <dune/pdelab/newton/newton.hh>
95 typedef typename T::ctype ctype;
96 static const int dim = T::dimension;
97 static const int dimworld = T::dimensionworld;
102 FieldVector<ctype,dimworld> lowerLeft(0.0);
103 FieldVector<ctype,dimworld> upperRight(1.0);
104 std::array<unsigned int,dim> elements; elements.fill(cells);
106 StructuredGridFactory<T> factory;
109 gridp = factory.createCubeGrid(lowerLeft,upperRight,elements);
111 gridp = factory.createSimplexGrid(lowerLeft,upperRight,elements);
114 DUNE_THROW(GridError, className<StructuredGrid>()
115 <<
"::StructuredGrid(): grid type must be simplex or cube ");
121 std::array<double,dimworld> lower_left, std::array<double,dimworld> upper_right,
122 std::array<unsigned int,dim> cells)
124 FieldVector<ctype,dimworld> lowerLeft;
125 FieldVector<ctype,dimworld> upperRight;
126 std::array<unsigned int,dim> elements;
129 for (
size_t i=0; i<dimworld; i++)
131 lowerLeft[i] = lower_left[i];
132 upperRight[i] = upper_right[i];
134 for (
size_t i=0; i<dim; i++)
136 elements[i] = cells[i];
139 StructuredGridFactory<T> factory;
142 gridp = factory.createCubeGrid(lowerLeft,upperRight,elements);
144 gridp = factory.createSimplexGrid(lowerLeft,upperRight,elements);
147 DUNE_THROW(GridError, className<StructuredGrid>()
148 <<
"::StructuredGrid(): grid type must be simplex or cube ");
153 std::shared_ptr<T> getSharedPtr ()
165 const T& getGrid ()
const
177 return gridp.operator->();
180 const T& operator*()
const
185 const T* operator->()
const
187 return gridp.operator->();
192 std::shared_ptr<T> gridp;
197 class StructuredGrid<YaspGrid<dim> >
202 typedef YaspGrid<dim> Grid;
211 std::cout <<
"StructuredGrid(): element type " << meshtype <<
" is ignored" << std::endl;
215 std::array<int,dimworld> N(Dune::filledArray<dimworld, int>(cells));
216 std::bitset<dimworld> B(
false);
219 gridp = std::shared_ptr<Grid>(
new Grid(L,N,B,overlap,Dune::MPIHelper::getCollectiveCommunication()));
224 std::array<double,dimworld> lower_left, std::array<double,dimworld> upper_right,
225 std::array<unsigned int,dim> cells,
int overlap=1)
228 for(
int d = 0; d < dimworld; ++d)
229 if(std::abs(lower_left[d]) > std::abs(upper_right[d])*1e-10)
230 DUNE_THROW(GridError, className<StructuredGrid>()
231 <<
"::createCubeGrid(): The lower coordinates "
232 "must be at the origin for YaspGrid.");
236 std::cout <<
"StructuredGrid(): element type " << meshtype <<
" is ignored" << std::endl;
240 std::array<int,dimworld> N;
241 std::bitset<dimworld> B(
false);
242 for (
size_t i=0; i<dimworld; i++)
244 L[i] = upper_right[i];
249 gridp = std::shared_ptr<Grid>(
new Grid(L,N,B,overlap,Dune::MPIHelper::getCollectiveCommunication()));
254 std::array<double,dimworld> lower_left, std::array<double,dimworld> upper_right,
255 std::array<unsigned int,dim> cells, std::array<bool,dim> periodic,
int overlap=1)
258 for(
int d = 0; d < dimworld; ++d)
259 if(std::abs(lower_left[d]) > std::abs(upper_right[d])*1e-10)
260 DUNE_THROW(GridError, className<StructuredGrid>()
261 <<
"::createCubeGrid(): The lower coordinates "
262 "must be at the origin for YaspGrid.");
266 std::cout <<
"StructuredGrid(): element type " << meshtype <<
" is ignored" << std::endl;
270 std::array<int,dimworld> N;
271 std::bitset<dimworld> B(
false);
272 for (
size_t i=0; i<dimworld; i++)
274 L[i] = upper_right[i];
280 gridp = std::shared_ptr<Grid>(
new Grid(L,N,B,overlap,Dune::MPIHelper::getCollectiveCommunication()));
284 std::shared_ptr<Grid> getSharedPtr ()
296 const Grid& getGrid ()
const
308 return gridp.operator->();
311 const Grid& operator*()
const
316 const Grid* operator->()
const
318 return gridp.operator->();
322 std::shared_ptr<Grid> gridp;
327 class UnstructuredGrid
332 typedef typename T::ctype ctype;
333 static const int dim = T::dimension;
334 static const int dimworld = T::dimensionworld;
337 UnstructuredGrid (std::string filename,
bool verbose =
true,
bool insert_boundary_segments=
true)
341 gridp = std::shared_ptr<T>(factory.
createGrid());
345 std::shared_ptr<T> getSharedPtr ()
357 const T& getGrid ()
const
369 return gridp.operator->();
372 const T& operator*()
const
377 const T* operator->()
const
379 return gridp.operator->();
383 std::shared_ptr<T> gridp;
392 template<
typename GV,
typename C,
typename R,
unsigned int degree,
unsigned int dim, Dune::GeometryType::BasicType gt>
396 template<
typename GV,
typename C,
typename R,
unsigned int degree,
unsigned int dim>
400 typedef PkLocalFiniteElementMap<GV,C,R,degree> FEM;
402 CGFEMBase (
const GV& gridview)
404 femp = std::shared_ptr<FEM>(
new FEM(gridview));
407 FEM& getFEM() {
return *femp;}
408 const FEM& getFEM()
const {
return *femp;}
411 std::shared_ptr<FEM> femp;
414 template<
typename GV,
typename C,
typename R,
unsigned int degree,
unsigned int dim>
418 typedef QkLocalFiniteElementMap<GV,C,R,degree> FEM;
420 CGFEMBase (
const GV& gridview)
422 femp = std::shared_ptr<FEM>(
new FEM(gridview));
425 FEM& getFEM() {
return *femp;}
426 const FEM& getFEM()
const {
return *femp;}
429 std::shared_ptr<FEM> femp;
441 template<
typename Gr
id,
unsigned int degree, Dune::GeometryType::BasicType gt, MeshType mt, SolverCategory::Category st,
typename BCType,
typename GV =
typename Gr
id::LeafGr
idView>
445 template<
typename Gr
id,
typename BCType,
typename GV>
449 typedef HangingNodesDirichletConstraints<Grid,HangingNodesConstraintsAssemblers::SimplexGridP1Assembler,BCType> CON;
451 CGCONBase (Grid& grid,
const BCType& bctype,
const GV& gv)
453 conp = std::shared_ptr<CON>(
new CON(grid,
true,bctype));
456 CGCONBase (Grid& grid,
const BCType& bctype)
458 conp = std::shared_ptr<CON>(
new CON(grid,
true,bctype));
461 template<
typename GFS>
462 void postGFSHook (
const GFS& gfs) {}
463 CON& getCON() {
return *conp;}
464 const CON& getCON()
const {
return *conp;}
465 template<
typename GFS,
typename DOF>
466 void make_consistent (
const GFS& gfs, DOF& x)
const {}
468 std::shared_ptr<CON> conp;
471 template<
typename Gr
id,
typename BCType,
typename GV>
475 typedef HangingNodesDirichletConstraints<Grid,HangingNodesConstraintsAssemblers::CubeGridQ1Assembler,BCType> CON;
477 CGCONBase (Grid& grid,
const BCType& bctype,
const GV& gv)
479 conp = std::shared_ptr<CON>(
new CON(grid,
true,bctype));
482 CGCONBase (Grid& grid,
const BCType& bctype)
484 conp = std::shared_ptr<CON>(
new CON(grid,
true,bctype));
487 template<
typename GFS>
488 void postGFSHook (
const GFS& gfs) {}
489 CON& getCON() {
return *conp;}
490 const CON& getCON()
const {
return *conp;}
491 template<
typename GFS,
typename DOF>
492 void make_consistent (
const GFS& gfs, DOF& x)
const {}
494 std::shared_ptr<CON> conp;
497 template<
typename Gr
id,
unsigned int degree, Dune::GeometryType::BasicType gt,
typename BCType,
typename GV>
501 typedef ConformingDirichletConstraints CON;
503 CGCONBase (Grid& grid,
const BCType& bctype,
const GV& gv)
505 conp = std::shared_ptr<CON>(
new CON());
508 CGCONBase (Grid& grid,
const BCType& bctype)
510 conp = std::shared_ptr<CON>(
new CON());
513 template<
typename GFS>
514 void postGFSHook (
const GFS& gfs) {}
515 CON& getCON() {
return *conp;}
516 const CON& getCON()
const {
return *conp;}
517 template<
typename GFS,
typename DOF>
518 void make_consistent (
const GFS& gfs, DOF& x)
const {}
520 std::shared_ptr<CON> conp;
523 template<
typename Gr
id,
unsigned int degree, Dune::GeometryType::BasicType gt,
typename BCType,
typename GV>
527 typedef OverlappingConformingDirichletConstraints CON;
529 CGCONBase (Grid& grid,
const BCType& bctype,
const GV& gv)
531 conp = std::shared_ptr<CON>(
new CON());
534 CGCONBase (Grid& grid,
const BCType& bctype)
536 conp = std::shared_ptr<CON>(
new CON());
539 template<
typename GFS>
540 void postGFSHook (
const GFS& gfs) {}
541 CON& getCON() {
return *conp;}
542 const CON& getCON()
const {
return *conp;}
543 template<
typename GFS,
typename DOF>
544 void make_consistent (
const GFS& gfs, DOF& x)
const
547 ISTL::ParallelHelper<GFS> helper(gfs);
548 helper.maskForeignDOFs(Backend::native(x));
549 Dune::PDELab::AddDataHandle<GFS,DOF> adddh(gfs,x);
550 if (gfs.gridView().comm().size()>1)
554 std::shared_ptr<CON> conp;
557 template<
typename Gr
id,
unsigned int degree, Dune::GeometryType::BasicType gt,
typename BCType,
typename GV>
562 CGCONBase (Grid& grid,
const BCType& bctype)
564 conp = std::shared_ptr<CON>(
new CON);
567 template<
typename GFS>
568 CON& getCON() {
return *conp;}
569 const CON& getCON()
const {
return *conp;}
570 template<
typename GFS,
typename DOF>
571 void make_consistent (
const GFS& gfs, DOF& x)
const {}
573 std::shared_ptr<CON> conp;
578 template<
typename T,
typename N,
unsigned int degree,
typename BCType,
580 typename VBET=ISTL::VectorBackend<> >
586 typedef typename T::LeafGridView GV;
587 typedef typename T::ctype ctype;
588 static const int dim = T::dimension;
589 static const int dimworld = T::dimensionworld;
591 typedef CGFEMBase<GV,ctype,N,degree,dim,gt> FEMB;
592 typedef CGCONBase<Grid,degree,gt,mt,st,BCType> CONB;
594 typedef typename FEMB::FEM FEM;
595 typedef typename CONB::CON CON;
598 typedef GridFunctionSpace<GV,FEM,CON,VBE> GFS;
601 using DOF = Backend::Vector<GFS,N>;
603 typedef typename GFS::template ConstraintsContainer<N>::Type CC;
604 typedef VTKGridFunctionAdapter<DGF> VTKF;
607 CGSpace (Grid& grid,
const BCType& bctype)
610 gfsp = std::shared_ptr<GFS>(
new GFS(gv,femb.getFEM(),conb.getCON()));
611 gfsp->name(
"cgspace");
614 conb.postGFSHook(*gfsp);
615 ccp = std::shared_ptr<CC>(
new CC());
620 return femb.getFEM();
623 const FEM& getFEM()
const
625 return femb.getFEM();
635 const GFS& getGFS ()
const
647 const CC& getCC ()
const
652 void assembleConstraints (
const BCType& bctype)
658 void clearConstraints ()
663 void setConstrainedDOFS (DOF& x, NT nt)
const
666 conb.make_consistent(*gfsp,x);
669 void setNonConstrainedDOFS (DOF& x, NT nt)
const
672 conb.make_consistent(*gfsp,x);
675 void copyConstrainedDOFS (
const DOF& xin, DOF& xout)
const
678 conb.make_consistent(*gfsp,xout);
681 void copyNonConstrainedDOFS (
const DOF& xin, DOF& xout)
const
684 conb.make_consistent(*gfsp,xout);
691 std::shared_ptr<GFS> gfsp;
692 std::shared_ptr<CC> ccp;
696 template<
typename T,
typename N,
unsigned int degree,
typename BCType,
699 class CGSpace<T, N,
degree, BCType,
gt, mt, SolverCategory::nonoverlapping, VBET> {
704 typedef typename T::LeafGridView GV;
705 typedef typename T::ctype ctype;
707 static const int dim = T::dimension;
708 static const int dimworld = T::dimensionworld;
710 typedef CGFEMBase<ES,ctype,N,degree,dim,gt> FEMB;
711 typedef CGCONBase<Grid,degree,gt,mt,SolverCategory::nonoverlapping,BCType> CONB;
713 typedef typename FEMB::FEM FEM;
714 typedef typename CONB::CON CON;
717 typedef GridFunctionSpace<ES,FEM,CON,VBE> GFS;
720 using DOF = Backend::Vector<GFS,N>;
722 typedef typename GFS::template ConstraintsContainer<N>::Type CC;
723 typedef VTKGridFunctionAdapter<DGF> VTKF;
726 CGSpace (Grid& grid,
const BCType& bctype)
727 : gv(grid.
leafGridView()), es(gv), femb(es), conb(grid,bctype)
729 gfsp = std::shared_ptr<GFS>(
new GFS(es,femb.getFEM(),conb.getCON()));
730 gfsp->name(
"cgspace");
734 ccp = std::shared_ptr<CC>(
new CC());
739 return femb.getFEM();
742 const FEM& getFEM()
const
744 return femb.getFEM();
754 const GFS& getGFS ()
const
766 const CC& getCC ()
const
771 void assembleConstraints (
const BCType& bctype)
777 void clearConstraints ()
782 void setConstrainedDOFS (DOF& x, NT nt)
const
785 conb.make_consistent(*gfsp,x);
788 void setNonConstrainedDOFS (DOF& x, NT nt)
const
791 conb.make_consistent(*gfsp,x);
794 void copyConstrainedDOFS (
const DOF& xin, DOF& xout)
const
797 conb.make_consistent(*gfsp,xout);
800 void copyNonConstrainedDOFS (
const DOF& xin, DOF& xout)
const
803 conb.make_consistent(*gfsp,xout);
811 std::shared_ptr<GFS> gfsp;
812 std::shared_ptr<CC> ccp;
822 template<SolverCategory::Category st>
827 class DGCONBase<SolverCategory::sequential>
830 typedef NoConstraints CON;
833 conp = std::shared_ptr<CON>(
new CON());
835 CON& getCON() {
return *conp;}
836 const CON& getCON()
const {
return *conp;}
837 template<
typename GFS,
typename DOF>
838 void make_consistent (
const GFS& gfs, DOF& x)
const {}
840 std::shared_ptr<CON> conp;
844 class DGCONBase<SolverCategory::nonoverlapping>
847 typedef P0ParallelGhostConstraints CON;
850 conp = std::shared_ptr<CON>(
new CON());
852 CON& getCON() {
return *conp;}
853 const CON& getCON()
const {
return *conp;}
854 template<
typename GFS,
typename DOF>
855 void make_consistent (
const GFS& gfs, DOF& x)
const {}
857 std::shared_ptr<CON> conp;
861 class DGCONBase<SolverCategory::overlapping>
864 typedef P0ParallelConstraints CON;
867 conp = std::shared_ptr<CON>(
new CON());
869 CON& getCON() {
return *conp;}
870 const CON& getCON()
const {
return *conp;}
871 template<
typename GFS,
typename DOF>
872 void make_consistent (
const GFS& gfs, DOF& x)
const
875 ISTL::ParallelHelper<GFS> helper(gfs);
876 helper.maskForeignDOFs(Backend::native(x));
877 Dune::PDELab::AddDataHandle<GFS,DOF> adddh(gfs,x);
878 if (gfs.gridView().comm().size()>1)
882 std::shared_ptr<CON> conp;
887 template<
typename T,
typename N,
unsigned int degree,
889 typename VBET=ISTL::VectorBackend<ISTL::Blocking::fixed,Dune::PB::PkSize<degree,T::dimension>::value> >
896 typedef typename T::LeafGridView GV;
897 typedef typename T::ctype ctype;
898 static const int dim = T::dimension;
899 static const int dimworld = T::dimensionworld;
902 typedef OPBLocalFiniteElementMap<ctype,NT,degree,dim,gt,Dune::GMPField<512>,Dune::PB::BasisType::Pk> FEM;
904 typedef OPBLocalFiniteElementMap<ctype,NT,degree,dim,gt> FEM;
906 typedef DGCONBase<st> CONB;
907 typedef typename CONB::CON CON;
909 typedef GridFunctionSpace<GV,FEM,CON,VBE> GFS;
910 using DOF = Backend::Vector<GFS,N>;
912 typedef typename GFS::template ConstraintsContainer<N>::Type CC;
913 typedef VTKGridFunctionAdapter<DGF> VTKF;
916 DGPkSpace (
const GV& gridview) : gv(gridview), conb()
918 femp = std::shared_ptr<FEM>(
new FEM());
919 gfsp = std::shared_ptr<GFS>(
new GFS(gv,*femp));
922 ccp = std::shared_ptr<CC>(
new CC());
925 FEM& getFEM() {
return *femp; }
926 const FEM& getFEM()
const {
return *femp; }
929 GFS& getGFS () {
return *gfsp; }
932 const GFS& getGFS ()
const {
return *gfsp;}
935 CC& getCC () {
return *ccp;}
938 const CC& getCC ()
const {
return *ccp;}
940 template<
class BCTYPE>
941 void assembleConstraints (
const BCTYPE& bctype)
947 void clearConstraints ()
952 void setConstrainedDOFS (DOF& x, NT nt)
const
955 conb.make_consistent(*gfsp,x);
958 void setNonConstrainedDOFS (DOF& x, NT nt)
const
961 conb.make_consistent(*gfsp,x);
964 void copyConstrainedDOFS (
const DOF& xin, DOF& xout)
const
967 conb.make_consistent(*gfsp,xout);
970 void copyNonConstrainedDOFS (
const DOF& xin, DOF& xout)
const
973 conb.make_consistent(*gfsp,xout);
979 std::shared_ptr<FEM> femp;
980 std::shared_ptr<GFS> gfsp;
981 std::shared_ptr<CC> ccp;
986 template<
typename T,
typename N,
unsigned int degree,
989 typename VBET=ISTL::VectorBackend<> >
996 typedef typename T::LeafGridView GV;
997 typedef typename T::ctype ctype;
998 static const int dim = T::dimension;
999 static const int dimworld = T::dimensionworld;
1002 typedef OPBLocalFiniteElementMap<ctype,NT,degree,dim,gt,Dune::GMPField<512>,Dune::PB::BasisType::Qk> FEM;
1004 typedef OPBLocalFiniteElementMap<ctype,NT,degree,dim,gt,N,Dune::PB::BasisType::Qk> FEM;
1006 typedef DGCONBase<st> CONB;
1007 typedef typename CONB::CON CON;
1009 typedef GridFunctionSpace<GV,FEM,CON,VBE> GFS;
1010 using DOF = Backend::Vector<GFS,N>;
1012 typedef typename GFS::template ConstraintsContainer<N>::Type CC;
1013 typedef VTKGridFunctionAdapter<DGF> VTKF;
1016 DGQkOPBSpace (
const GV& gridview) : gv(gridview), conb()
1018 femp = std::shared_ptr<FEM>(
new FEM());
1019 gfsp = std::shared_ptr<GFS>(
new GFS(gv,*femp));
1022 ccp = std::shared_ptr<CC>(
new CC());
1025 FEM& getFEM() {
return *femp; }
1026 const FEM& getFEM()
const {
return *femp; }
1029 GFS& getGFS () {
return *gfsp; }
1032 const GFS& getGFS ()
const {
return *gfsp;}
1035 CC& getCC () {
return *ccp;}
1038 const CC& getCC ()
const {
return *ccp;}
1040 template<
class BCTYPE>
1041 void assembleConstraints (
const BCTYPE& bctype)
1047 void clearConstraints ()
1052 void setConstrainedDOFS (DOF& x, NT nt)
const
1055 conb.make_consistent(*gfsp,x);
1058 void setNonConstrainedDOFS (DOF& x, NT nt)
const
1061 conb.make_consistent(*gfsp,x);
1064 void copyConstrainedDOFS (
const DOF& xin, DOF& xout)
const
1067 conb.make_consistent(*gfsp,xout);
1070 void copyNonConstrainedDOFS (
const DOF& xin, DOF& xout)
const
1073 conb.make_consistent(*gfsp,xout);
1079 std::shared_ptr<FEM> femp;
1080 std::shared_ptr<GFS> gfsp;
1081 std::shared_ptr<CC> ccp;
1086 template<
typename T,
typename N,
unsigned int degree,
1088 typename VBET=ISTL::VectorBackend<ISTL::Blocking::fixed,Dune::QkStuff::QkSize<degree,T::dimension>::value> >
1095 typedef typename T::LeafGridView GV;
1096 typedef typename T::ctype ctype;
1097 static const int dim = T::dimension;
1098 static const int dimworld = T::dimensionworld;
1100 typedef QkDGLocalFiniteElementMap<ctype,NT,degree,dim> FEM;
1101 typedef DGCONBase<st> CONB;
1102 typedef typename CONB::CON CON;
1104 typedef GridFunctionSpace<GV,FEM,CON,VBE> GFS;
1105 using DOF = Backend::Vector<GFS,N>;
1107 typedef typename GFS::template ConstraintsContainer<N>::Type CC;
1108 typedef VTKGridFunctionAdapter<DGF> VTKF;
1111 DGQkSpace (
const GV& gridview) : gv(gridview), conb()
1113 femp = std::shared_ptr<FEM>(
new FEM());
1114 gfsp = std::shared_ptr<GFS>(
new GFS(gv,*femp));
1117 ccp = std::shared_ptr<CC>(
new CC());
1120 FEM& getFEM() {
return *femp; }
1121 const FEM& getFEM()
const {
return *femp; }
1124 GFS& getGFS () {
return *gfsp; }
1127 const GFS& getGFS ()
const {
return *gfsp;}
1130 CC& getCC () {
return *ccp;}
1133 const CC& getCC ()
const {
return *ccp;}
1135 template<
class BCTYPE>
1136 void assembleConstraints (
const BCTYPE& bctype)
1142 void clearConstraints ()
1147 void setConstrainedDOFS (DOF& x, NT nt)
const
1150 conb.make_consistent(*gfsp,x);
1153 void setNonConstrainedDOFS (DOF& x, NT nt)
const
1156 conb.make_consistent(*gfsp,x);
1159 void copyConstrainedDOFS (
const DOF& xin, DOF& xout)
const
1162 conb.make_consistent(*gfsp,xout);
1165 void copyNonConstrainedDOFS (
const DOF& xin, DOF& xout)
const
1168 conb.make_consistent(*gfsp,xout);
1174 std::shared_ptr<FEM> femp;
1175 std::shared_ptr<GFS> gfsp;
1176 std::shared_ptr<CC> ccp;
1181 template<
typename T,
typename N,
unsigned int degree,
1184 typename VBET=ISTL::VectorBackend<> >
1191 typedef typename T::LeafGridView GV;
1192 typedef typename T::ctype ctype;
1193 static const int dim = T::dimension;
1194 static const int dimworld = T::dimensionworld;
1196 typedef QkDGLocalFiniteElementMap<ctype,NT,degree,dim,QkDGBasisPolynomial::lobatto> FEM;
1197 typedef DGCONBase<st> CONB;
1198 typedef typename CONB::CON CON;
1200 typedef GridFunctionSpace<GV,FEM,CON,VBE> GFS;
1201 using DOF = Backend::Vector<GFS,N>;
1203 typedef typename GFS::template ConstraintsContainer<N>::Type CC;
1204 typedef VTKGridFunctionAdapter<DGF> VTKF;
1207 DGQkGLSpace (
const GV& gridview) : gv(gridview), conb()
1209 femp = std::shared_ptr<FEM>(
new FEM());
1210 gfsp = std::shared_ptr<GFS>(
new GFS(gv,*femp));
1213 ccp = std::shared_ptr<CC>(
new CC());
1216 FEM& getFEM() {
return *femp; }
1217 const FEM& getFEM()
const {
return *femp; }
1220 GFS& getGFS () {
return *gfsp; }
1223 const GFS& getGFS ()
const {
return *gfsp;}
1226 CC& getCC () {
return *ccp;}
1229 const CC& getCC ()
const {
return *ccp;}
1231 template<
class BCTYPE>
1232 void assembleConstraints (
const BCTYPE& bctype)
1238 void clearConstraints ()
1243 void setConstrainedDOFS (DOF& x, NT nt)
const
1246 conb.make_consistent(*gfsp,x);
1249 void setNonConstrainedDOFS (DOF& x, NT nt)
const
1252 conb.make_consistent(*gfsp,x);
1255 void copyConstrainedDOFS (
const DOF& xin, DOF& xout)
const
1258 conb.make_consistent(*gfsp,xout);
1261 void copyNonConstrainedDOFS (
const DOF& xin, DOF& xout)
const
1264 conb.make_consistent(*gfsp,xout);
1270 std::shared_ptr<FEM> femp;
1271 std::shared_ptr<GFS> gfsp;
1272 std::shared_ptr<CC> ccp;
1277 template<
typename T,
typename N,
unsigned int degree,
1280 typename VBET=ISTL::VectorBackend<> >
1281 class DGLegendreSpace
1287 typedef typename T::LeafGridView GV;
1288 typedef typename T::ctype ctype;
1289 static const int dim = T::dimension;
1290 static const int dimworld = T::dimensionworld;
1292 typedef QkDGLocalFiniteElementMap<ctype,NT,degree,dim,QkDGBasisPolynomial::legendre> FEM;
1293 typedef DGCONBase<st> CONB;
1294 typedef typename CONB::CON CON;
1296 typedef GridFunctionSpace<GV,FEM,CON,VBE> GFS;
1297 using DOF = Backend::Vector<GFS,N>;
1299 typedef typename GFS::template ConstraintsContainer<N>::Type CC;
1300 typedef VTKGridFunctionAdapter<DGF> VTKF;
1303 DGLegendreSpace (
const GV& gridview) : gv(gridview), conb()
1305 femp = std::shared_ptr<FEM>(
new FEM());
1306 gfsp = std::shared_ptr<GFS>(
new GFS(gv,*femp));
1309 ccp = std::shared_ptr<CC>(
new CC());
1312 FEM& getFEM() {
return *femp; }
1313 const FEM& getFEM()
const {
return *femp; }
1316 GFS& getGFS () {
return *gfsp; }
1319 const GFS& getGFS ()
const {
return *gfsp;}
1322 CC& getCC () {
return *ccp;}
1325 const CC& getCC ()
const {
return *ccp;}
1327 template<
class BCTYPE>
1328 void assembleConstraints (
const BCTYPE& bctype)
1334 void clearConstraints ()
1339 void setConstrainedDOFS (DOF& x, NT nt)
const
1342 conb.make_consistent(*gfsp,x);
1345 void setNonConstrainedDOFS (DOF& x, NT nt)
const
1348 conb.make_consistent(*gfsp,x);
1351 void copyConstrainedDOFS (
const DOF& xin, DOF& xout)
const
1354 conb.make_consistent(*gfsp,xout);
1357 void copyNonConstrainedDOFS (
const DOF& xin, DOF& xout)
const
1360 conb.make_consistent(*gfsp,xout);
1366 std::shared_ptr<FEM> femp;
1367 std::shared_ptr<GFS> gfsp;
1368 std::shared_ptr<CC> ccp;
1373 template<
typename T,
typename N,
1375 typename VBET=ISTL::VectorBackend<> >
1382 typedef typename T::LeafGridView GV;
1383 typedef typename T::ctype ctype;
1384 static const int dim = T::dimension;
1385 static const int dimworld = T::dimensionworld;
1388 typedef DGCONBase<st> CONB;
1389 typedef typename CONB::CON CON;
1391 typedef GridFunctionSpace<GV,FEM,CON,VBE> GFS;
1392 using DOF = Backend::Vector<GFS,N>;
1394 typedef typename GFS::template ConstraintsContainer<N>::Type CC;
1395 typedef VTKGridFunctionAdapter<DGF> VTKF;
1398 P0Space (
const GV& gridview) : gv(gridview), conb()
1401 femp = std::shared_ptr<FEM>(
new FEM(geometryType));
1402 gfsp = std::shared_ptr<GFS>(
new GFS(gv,*femp));
1405 ccp = std::shared_ptr<CC>(
new CC());
1408 FEM& getFEM() {
return *femp; }
1409 const FEM& getFEM()
const {
return *femp; }
1412 GFS& getGFS () {
return *gfsp; }
1415 const GFS& getGFS ()
const {
return *gfsp;}
1418 CC& getCC () {
return *ccp;}
1421 const CC& getCC ()
const {
return *ccp;}
1423 template<
class BCTYPE>
1424 void assembleConstraints (
const BCTYPE& bctype)
1430 void clearConstraints ()
1435 void setConstrainedDOFS (DOF& x, NT nt)
const
1438 conb.make_consistent(*gfsp,x);
1441 void setNonConstrainedDOFS (DOF& x, NT nt)
const
1444 conb.make_consistent(*gfsp,x);
1447 void copyConstrainedDOFS (
const DOF& xin, DOF& xout)
const
1450 conb.make_consistent(*gfsp,xout);
1453 void copyNonConstrainedDOFS (
const DOF& xin, DOF& xout)
const
1456 conb.make_consistent(*gfsp,xout);
1462 std::shared_ptr<FEM> femp;
1463 std::shared_ptr<GFS> gfsp;
1464 std::shared_ptr<CC> ccp;
1470 template<
typename FS,
typename Functor>
1472 :
public GridFunctionBase<GridFunctionTraits<typename FS::GV, typename FS::NT,
1473 1,FieldVector<typename FS::NT,1> >
1474 ,UserFunction<FS,Functor> >
1477 typedef GridFunctionTraits<
typename FS::GV,
typename FS::NT,
1478 1,FieldVector<typename FS::NT,1> > Traits;
1481 UserFunction (
const FS& fs_,
const Functor& f_)
1491 std::vector<double> x__(x.size());
1492 for (
size_t i=0; i<x.size(); ++i) x__[i]=x_[i];
1496 inline const typename FS::GV& getGridView ()
const
1498 return fs.getGFS().gridView();
1507 template<
typename FS,
typename LOP, SolverCategory::Category st = SolverCategory::sequential>
1508 class GalerkinGlobalAssembler
1512 typedef ISTL::BCRSMatrixBackend<> MBE;
1514 typename FS::NT,
typename FS::NT,
typename FS::NT,
1515 typename FS::CC,
typename FS::CC> GO;
1518 GalerkinGlobalAssembler (
const FS& fs, LOP& lop,
const std::size_t nonzeros)
1520 gop = std::shared_ptr<GO>(
new GO(fs.getGFS(),fs.getCC(),fs.getGFS(),fs.getCC(),lop,MBE(nonzeros)));
1530 const GO& getGO ()
const
1542 return gop.operator->();
1545 const GO& operator*()
const
1550 const GO* operator->()
const
1552 return gop.operator->();
1556 std::shared_ptr<GO> gop;
1560 template<
typename FS,
typename LOP, SolverCategory::Category st = SolverCategory::sequential>
1561 class GalerkinGlobalAssemblerNewBackend
1567 typename FS::NT,
typename FS::NT,
typename FS::NT,
1568 typename FS::CC,
typename FS::CC> GO;
1571 GalerkinGlobalAssemblerNewBackend (
const FS& fs, LOP& lop,
const MBE& mbe)
1573 gop = std::shared_ptr<GO>(
new GO(fs.getGFS(),fs.getCC(),fs.getGFS(),fs.getCC(),lop,mbe));
1583 const GO& getGO ()
const
1595 return gop.operator->();
1598 const GO& operator*()
const
1603 const GO* operator->()
const
1605 return gop.operator->();
1609 std::shared_ptr<GO> gop;
1614 template<
typename FSU,
typename FSV,
typename LOP, SolverCategory::Category st>
1615 class GlobalAssembler
1619 typedef ISTL::BCRSMatrixBackend<> MBE;
1621 typename FSU::NT,
typename FSU::NT,
typename FSU::NT,
1622 typename FSU::CC,
typename FSV::CC> GO;
1625 GlobalAssembler (
const FSU& fsu,
const FSV& fsv, LOP& lop,
const std::size_t nonzeros)
1627 gop = std::shared_ptr<GO>(
new GO(fsu.getGFS(),fsu.getCC(),fsv.getGFS(),fsv.getCC(),lop,MBE(nonzeros)));
1637 const GO& getGO ()
const
1649 return gop.operator->();
1652 const GO& operator*()
const
1657 const GO* operator->()
const
1659 return gop.operator->();
1663 std::shared_ptr<GO> gop;
1667 template<
typename GO1,
typename GO2,
bool implicit = true>
1668 class OneStepGlobalAssembler
1672 typedef ISTL::BCRSMatrixBackend<> MBE;
1673 typedef Dune::PDELab::OneStepGridOperator<typename GO1::GO,typename GO2::GO,implicit> GO;
1674 typedef typename GO::Jacobian MAT;
1676 OneStepGlobalAssembler (GO1& go1, GO2& go2)
1678 gop = std::shared_ptr<GO>(
new GO(*go1,*go2));
1688 const GO& getGO ()
const
1700 return gop.operator->();
1703 const GO& operator*()
const
1708 const GO* operator->()
const
1710 return gop.operator->();
1714 std::shared_ptr<GO> gop;
1719 template<
typename FS,
typename ASS, SolverCategory::Category st = SolverCategory::sequential>
1720 class ISTLSolverBackend_CG_AMG_SSOR
1726 ISTLSolverBackend_CG_AMG_SSOR (
const FS& fs,
const ASS& ass,
unsigned maxiter_=5000,
1727 int verbose_=1,
bool reuse_=
false,
bool usesuperlu_=
true)
1729 lsp = std::shared_ptr<LS>(
new LS(maxiter_,verbose_,reuse_,usesuperlu_));
1732 LS& getLS () {
return *lsp;}
1733 const LS& getLS ()
const {
return *lsp;}
1734 LS& operator*(){
return *lsp;}
1735 LS* operator->() {
return lsp.operator->(); }
1736 const LS& operator*()
const{
return *lsp;}
1737 const LS* operator->()
const{
return lsp.operator->();}
1740 std::shared_ptr<LS> lsp;
1744 template<
typename FS,
typename ASS>
1745 class ISTLSolverBackend_CG_AMG_SSOR<FS,ASS, SolverCategory::nonoverlapping>
1751 ISTLSolverBackend_CG_AMG_SSOR (
const FS& fs,
const ASS& ass,
unsigned maxiter_=5000,
1752 int verbose_=1,
bool reuse_=
false,
bool usesuperlu_=
true)
1754 lsp = std::shared_ptr<LS>(
new LS(fs.getGFS(),maxiter_,verbose_,reuse_,usesuperlu_));
1757 LS& getLS () {
return *lsp;}
1758 const LS& getLS ()
const {
return *lsp;}
1759 LS& operator*(){
return *lsp;}
1760 LS* operator->() {
return lsp.operator->(); }
1761 const LS& operator*()
const{
return *lsp;}
1762 const LS* operator->()
const{
return lsp.operator->();}
1765 std::shared_ptr<LS> lsp;
1769 template<
typename FS,
typename ASS>
1770 class ISTLSolverBackend_CG_AMG_SSOR<FS,ASS, SolverCategory::overlapping>
1776 ISTLSolverBackend_CG_AMG_SSOR (
const FS& fs,
const ASS& ass,
unsigned maxiter_=5000,
1777 int verbose_=1,
bool reuse_=
false,
bool usesuperlu_=
true)
1779 lsp = std::shared_ptr<LS>(
new LS(fs.getGFS(),maxiter_,verbose_,reuse_,usesuperlu_));
1782 LS& getLS () {
return *lsp;}
1783 const LS& getLS ()
const {
return *lsp;}
1784 LS& operator*(){
return *lsp;}
1785 LS* operator->() {
return lsp.operator->(); }
1786 const LS& operator*()
const{
return *lsp;}
1787 const LS* operator->()
const{
return lsp.operator->();}
1790 std::shared_ptr<LS> lsp;
1794 template<
typename FS,
typename ASS, SolverCategory::Category st = SolverCategory::sequential>
1795 class ISTLSolverBackend_CG_SSOR
1799 typedef ISTLBackend_SEQ_CG_SSOR LS;
1801 ISTLSolverBackend_CG_SSOR (
const FS& fs,
const ASS& ass,
unsigned maxiter_=5000,
1802 int steps_=5,
int verbose_=1)
1804 lsp = std::shared_ptr<LS>(
new LS(maxiter_,verbose_));
1807 LS& getLS () {
return *lsp;}
1808 const LS& getLS ()
const {
return *lsp;}
1809 LS& operator*(){
return *lsp;}
1810 LS* operator->() {
return lsp.operator->(); }
1811 const LS& operator*()
const{
return *lsp;}
1812 const LS* operator->()
const{
return lsp.operator->();}
1815 std::shared_ptr<LS> lsp;
1819 template<
typename FS,
typename ASS>
1820 class ISTLSolverBackend_CG_SSOR<FS,ASS,SolverCategory::nonoverlapping>
1824 typedef ISTLBackend_NOVLP_CG_SSORk<typename ASS::GO> LS;
1826 ISTLSolverBackend_CG_SSOR (
const FS& fs,
const ASS& ass,
unsigned maxiter_=5000,
1827 int steps_=5,
int verbose_=1)
1829 lsp = std::shared_ptr<LS>(
new LS(fs.getGFS(),maxiter_,steps_,verbose_));
1832 LS& getLS () {
return *lsp;}
1833 const LS& getLS ()
const {
return *lsp;}
1834 LS& operator*(){
return *lsp;}
1835 LS* operator->() {
return lsp.operator->(); }
1836 const LS& operator*()
const{
return *lsp;}
1837 const LS* operator->()
const{
return lsp.operator->();}
1840 std::shared_ptr<LS> lsp;
1844 template<
typename FS,
typename ASS>
1845 class ISTLSolverBackend_CG_SSOR<FS,ASS,SolverCategory::overlapping>
1849 typedef ISTLBackend_OVLP_CG_SSORk<typename FS::GFS, typename FS::CC> LS;
1851 ISTLSolverBackend_CG_SSOR (
const FS& fs,
const ASS& ass,
unsigned maxiter_=5000,
1852 int steps_=5,
int verbose_=1)
1854 lsp = std::shared_ptr<LS>(
new LS(fs.getGFS(),fs.getCC(),maxiter_,steps_,verbose_));
1857 LS& getLS () {
return *lsp;}
1858 const LS& getLS ()
const {
return *lsp;}
1859 LS& operator*(){
return *lsp;}
1860 LS* operator->() {
return lsp.operator->(); }
1861 const LS& operator*()
const{
return *lsp;}
1862 const LS* operator->()
const{
return lsp.operator->();}
1865 std::shared_ptr<LS> lsp;
1871 template<
typename FS,
typename ASS, SolverCategory::Category st = SolverCategory::sequential>
1872 class ISTLSolverBackend_IterativeDefault
1876 typedef ISTLBackend_SEQ_BCGS_SSOR LS;
1878 ISTLSolverBackend_IterativeDefault (
const FS& fs,
const ASS& ass,
unsigned maxiter_=5000,
int verbose_=1)
1880 lsp = std::shared_ptr<LS>(
new LS(maxiter_,verbose_));
1883 LS& getLS () {
return *lsp;}
1884 const LS& getLS ()
const {
return *lsp;}
1885 LS& operator*(){
return *lsp;}
1886 LS* operator->() {
return lsp.operator->(); }
1887 const LS& operator*()
const{
return *lsp;}
1888 const LS* operator->()
const{
return lsp.operator->();}
1891 std::shared_ptr<LS> lsp;
1895 template<
typename FS,
typename ASS>
1896 class ISTLSolverBackend_IterativeDefault<FS,ASS,SolverCategory::nonoverlapping>
1902 ISTLSolverBackend_IterativeDefault (
const FS& fs,
const ASS& ass,
unsigned maxiter_=5000,
int verbose_=1)
1904 lsp = std::shared_ptr<LS>(
new LS(ass.getGO(),maxiter_,3,verbose_));
1907 LS& getLS () {
return *lsp;}
1908 const LS& getLS ()
const {
return *lsp;}
1909 LS& operator*(){
return *lsp;}
1910 LS* operator->() {
return lsp.operator->(); }
1911 const LS& operator*()
const{
return *lsp;}
1912 const LS* operator->()
const{
return lsp.operator->();}
1915 std::shared_ptr<LS> lsp;
1919 template<
typename FS,
typename ASS>
1920 class ISTLSolverBackend_IterativeDefault<FS,ASS,SolverCategory::overlapping>
1924 typedef ISTLBackend_OVLP_BCGS_SSORk<typename FS::GFS, typename FS::CC> LS;
1926 ISTLSolverBackend_IterativeDefault (
const FS& fs,
const ASS& ass,
unsigned maxiter_=5000,
int verbose_=1)
1928 lsp = std::shared_ptr<LS>(
new LS(fs.getGFS(),fs.getCC(),maxiter_,3,verbose_));
1931 LS& getLS () {
return *lsp;}
1932 const LS& getLS ()
const {
return *lsp;}
1933 LS& operator*(){
return *lsp;}
1934 LS* operator->() {
return lsp.operator->(); }
1935 const LS& operator*()
const{
return *lsp;}
1936 const LS* operator->()
const{
return lsp.operator->();}
1939 std::shared_ptr<LS> lsp;
1944 template<
typename FS,
typename ASS, SolverCategory::Category st = SolverCategory::sequential>
1945 class ISTLSolverBackend_ExplicitDiagonal
1951 ISTLSolverBackend_ExplicitDiagonal (
const FS& fs,
const ASS& ass,
unsigned maxiter_=5000,
int verbose_=1)
1953 lsp = std::shared_ptr<LS>(
new LS());
1956 LS& getLS () {
return *lsp;}
1957 const LS& getLS ()
const {
return *lsp;}
1958 LS& operator*(){
return *lsp;}
1959 LS* operator->() {
return lsp.operator->(); }
1960 const LS& operator*()
const{
return *lsp;}
1961 const LS* operator->()
const{
return lsp.operator->();}
1964 std::shared_ptr<LS> lsp;
1969 template<
typename FS,
typename ASS>
1970 class ISTLSolverBackend_ExplicitDiagonal<FS,ASS,SolverCategory::overlapping>
1976 ISTLSolverBackend_ExplicitDiagonal (
const FS& fs,
const ASS& ass,
unsigned maxiter_=5000,
int verbose_=1)
1978 lsp = std::shared_ptr<LS>(
new LS(fs.getGFS()));
1981 LS& getLS () {
return *lsp;}
1982 const LS& getLS ()
const {
return *lsp;}
1983 LS& operator*(){
return *lsp;}
1984 LS* operator->() {
return lsp.operator->(); }
1985 const LS& operator*()
const{
return *lsp;}
1986 const LS* operator->()
const{
return lsp.operator->();}
1989 std::shared_ptr<LS> lsp;
1994 template<
typename FS,
typename ASS>
1995 class ISTLSolverBackend_ExplicitDiagonal<FS,ASS,SolverCategory::nonoverlapping>
2001 ISTLSolverBackend_ExplicitDiagonal (
const FS& fs,
const ASS& ass,
unsigned maxiter_=5000,
int verbose_=1)
2003 lsp = std::shared_ptr<LS>(
new LS(fs.getGFS()));
2006 LS& getLS () {
return *lsp;}
2007 const LS& getLS ()
const {
return *lsp;}
2008 LS& operator*(){
return *lsp;}
2009 LS* operator->() {
return lsp.operator->(); }
2010 const LS& operator*()
const{
return *lsp;}
2011 const LS* operator->()
const{
return lsp.operator->();}
2014 std::shared_ptr<LS> lsp;
This file implements a vector space as a tensor product of a given vector space. The number of compon...
BasicType
Each entity can be tagged by one of these basic types plus its space dimension.
Definition: type.hh:129
@ cube
Cube element in any nonnegative dimension.
Definition: type.hh:131
@ simplex
Simplicial element in any nonnegative dimension.
Definition: type.hh:130
static std::unique_ptr< Grid > read(const std::string &fileName, bool verbose=true, bool insertBoundarySegments=true)
Definition: gmshreader.hh:869
Provide a generic factory class for unstructured grids.
Definition: gridfactory.hh:312
virtual std::unique_ptr< GridType > createGrid()
Finalize grid creation and hand over the grid.
Definition: gridfactory.hh:370
@ dimensionworld
The dimension of the world the grid lives in.
Definition: grid.hh:392
ct ctype
Define type used for coordinates in grid module.
Definition: grid.hh:521
convert a grid function space and a coefficient vector into a grid function
Definition: gridfunctionspaceutilities.hh:76
Standard grid operator implementation.
Definition: gridoperator.hh:36
Dune::PDELab::Backend::Matrix< MB, Domain, Range, JF > Jacobian
The type of the jacobian.
Definition: gridoperator.hh:47
Overlapping parallel conjugate gradient solver preconditioned with AMG smoothed by SSOR.
Definition: ovlpistlsolverbackend.hh:1259
Nonoverlapping parallel BiCGSTAB solver preconditioned by block SSOR.
Definition: novlpistlsolverbackend.hh:838
Nonoverlapping parallel CG solver preconditioned with AMG smoothed by SSOR.
Definition: novlpistlsolverbackend.hh:1076
Solver to be used for explicit time-steppers with (block-)diagonal mass matrix.
Definition: novlpistlsolverbackend.hh:637
Solver to be used for explicit time-steppers with (block-)diagonal mass matrix.
Definition: ovlpistlsolverbackend.hh:1011
Sequential conjugate gradient solver preconditioned with AMG smoothed by SSOR.
Definition: seqistlsolverbackend.hh:856
Solver to be used for explicit time-steppers with (block-)diagonal mass matrix.
Definition: seqistlsolverbackend.hh:661
Partition view (or entity set) of a grid view.
Definition: partitionviewentityset.hh:120
A free function to provide the demangled class name of a given object or type as a string.
A few common exception classes.
@ conforming
Output conforming data.
Definition: common.hh:71
@ nonconforming
Output non-conforming data.
Definition: common.hh:79
GeometryType geometryType(const Dune::GeometryType &t)
mapping from GeometryType to VTKGeometryType
Definition: common.hh:149
Convenience header which includes all available VTK writers.
Some generic functions for pretty printing vectors and matrices.
Implementations of the inverse operator interface.
Utility to generate an array with a certain value.
Implements a vector constructed from a given type representing a field and a compile-time given size.
#define DUNE_THROW(E, m)
Definition: exceptions.hh:216
bool gt(const T &first, const T &second, typename EpsilonType< T >::Type epsilon)
test if first greater than second
Definition: float_cmp.cc:156
auto periodic(RawPreBasisIndicator &&rawPreBasisIndicator, PIS &&periodicIndexSet)
Create a pre-basis factory that can create a periodic pre-basis.
Definition: periodicbasis.hh:195
Grid< dim, dimworld, ct, GridFamily >::LeafGridView leafGridView(const Grid< dim, dimworld, ct, GridFamily > &grid)
leaf grid view for the given grid
Definition: grid.hh:808
void constraints(const GFS &gfs, CG &cg, const bool verbose=false)
construct constraints
Definition: constraints.hh:749
void set_nonconstrained_dofs(const CG &cg, typename XG::ElementType x, XG &xg)
Definition: constraints.hh:960
void set_constrained_dofs(const CG &cg, typename XG::ElementType x, XG &xg)
construct constraints from given boundary condition function
Definition: constraints.hh:796
void copy_constrained_dofs(const CG &cg, const XG &xgin, XG &xgout)
Definition: constraints.hh:936
void copy_nonconstrained_dofs(const CG &cg, const XG &xgin, XG &xgout)
Definition: constraints.hh:987
std::size_t degree(const Node &node)
Returns the degree of node as run time information.
Definition: nodeinterface.hh:76
Helpers for dealing with MPI.
Dune namespace.
Definition: alignedallocator.hh:11
Define general, extensible interface for operators. The available implementation wraps a matrix.
Various parser methods to get data into a ParameterTree object.
Define general preconditioner interface.
Dune::FieldVector< GV::Grid::ctype, GV::dimension > DomainType
domain type in dim-size coordinates
Definition: function.hh:50
R RangeType
range type
Definition: function.hh:62
Backend using (possibly nested) ISTL BCRSMatrices.
Definition: bcrsmatrixbackend.hh:188
GV::Traits::template Codim< 0 >::Entity ElementType
codim 0 entity
Definition: function.hh:119
Category
Definition: solvercategory.hh:21
@ sequential
Category for sequential solvers.
Definition: solvercategory.hh:23
@ nonoverlapping
Category for non-overlapping solvers.
Definition: solvercategory.hh:25
@ overlapping
Category for overlapping solvers.
Definition: solvercategory.hh:27
A unique label for each type of element that can occur in a grid.
A class to construct structured cube and simplex grids using the grid factory.