1 #ifndef DUNE_ALU_BNDPROJECTION_HH
2 #define DUNE_ALU_BNDPROJECTION_HH
6 #include <dune/common/exceptions.hh>
12 template <
class Gr
idImp,
class ctype =
double >
15 typedef typename GridImp :: ALUGridVertexProjectionType BaseType;
18 typedef GridImp GridType;
20 typedef ctype coord_t[ 3 ];
22 typedef typename BaseType::BufferType BufferType;
34 using BaseType :: none;
35 using BaseType :: global;
36 using BaseType :: surface;
37 using BaseType :: segment;
46 typedef typename DuneBoundaryProjectionType :: CoordinateType
CoordinateType;
73 (*projection_)(
reinterpret_cast<const CoordinateType &
> (* (&orig[0])) );
86 DUNE_THROW(InvalidStateException,
"ALUGridBoundaryProjection::backup: pointer to projection is invalid");
93 BaseType :: setFactoryMethod( &
factory );
96 static BaseType*
factory( BufferType& os )
98 return new ThisType( DuneBoundaryProjectionType::restoreFromBuffer( os ).release(), segment );
Definition: alu3dinclude.hh:63
ALUGrid boundary projection implementation DuneBndProjection has to fulfil the DuneBoundaryProjection...
Definition: bndprojection.hh:14
int operator()(const coord_t &orig, coord_t &prj) const
(old) method projection vertices defaults to segment 0
Definition: bndprojection.hh:57
ALUGridBoundaryProjection(const DuneBoundaryProjectionType *ptr, const ProjectionType pt=BaseType::none)
constructor storing reference to boundary projection implementation
Definition: bndprojection.hh:49
BaseType ::ProjectionType ProjectionType
Definition: bndprojection.hh:32
static void registerFactory()
Definition: bndprojection.hh:91
DuneBoundaryProjectionPointerType projection_
Definition: bndprojection.hh:40
ProjectionType projectionType_
Definition: bndprojection.hh:41
ProjectionType projectionType() const
Definition: bndprojection.hh:54
void backup(BufferType &os) const
Definition: bndprojection.hh:80
GridType ::DuneBoundaryProjectionType DuneBoundaryProjectionType
type of boundary projection
Definition: bndprojection.hh:26
std::unique_ptr< const DuneBoundaryProjectionType > DuneBoundaryProjectionPointerType
Definition: bndprojection.hh:28
DuneBoundaryProjectionType ::CoordinateType CoordinateType
type of coordinate vector
Definition: bndprojection.hh:46
static BaseType * factory(BufferType &os)
Definition: bndprojection.hh:96