3 #ifndef DUNE_ALBERTA_NODEPROJECTION_HH
4 #define DUNE_ALBERTA_NODEPROJECTION_HH
6 #include <dune/common/shared_ptr.hh>
24 template<
class Proj,
class Impl >
47 : projection_( projection )
68 ProjectionPtr projection_;
76 template<
class Proj,
class Impl >
95 This &operator= (
const This &other );
98 bool hasProjection (
const ElementInfo &elementInfo,
const int face )
const
100 return asImpl().hasProjection( elementInfo, face );
105 return asImpl().hasProjection( elementInfo );
108 Projection
projection (
const ElementInfo &elementInfo,
const int face )
const
110 return asImpl().projection( elementInfo, face );
113 Projection
projection (
const ElementInfo &elementInfo )
const
115 return asImpl().projection( elementInfo );
121 return static_cast< const Impl &
>( *this );
130 template<
class Proj,
class Impl >
131 class ProjectionFactory
132 :
public ProjectionFactoryInterface< Proj, Impl >
135 typedef ProjectionFactoryInterface< Proj, Impl > Base;
146 bool hasProjection (
const ElementInfo &elementInfo,
const int face )
const;
147 bool hasProjection (
const ElementInfo &elementInfo )
const;
149 Projection projection (
const ElementInfo &elementInfo,
const int face )
const;
150 Projection projection (
const ElementInfo &elementInfo )
const;
160 :
public ProjectionFactory< DuneBoundaryProjection< dim >, DuneGlobalBoundaryProjectionFactory< dim > >
172 : projection_( projection )
185 Projection
projection (
const ElementInfo &elementInfo,
const int face )
const
190 Projection
projection (
const ElementInfo &elementInfo )
const
196 const Projection projection_;
205 :
public ALBERTA NODE_PROJECTION
208 : boundaryIndex_( boundaryIndex )
218 return boundaryIndex_;
222 unsigned int boundaryIndex_;
230 template<
int dim,
class Projection >
243 Projection projection_;
247 : Base( boundaryIndex ),
248 projection_( projection )
261 const This *nodeProjection =
static_cast< const This *
>( info->active_projection );
263 assert( nodeProjection != NULL );
264 nodeProjection->projection_( elementInfo, local, global );
272 #endif // #if HAVE_ALBERTA
274 #endif // #ifndef DUNE_ALBERTA_NODEPROJECTION_HH
Projection::ProjectionPtr DuneProjectionPtr
Definition: albertagrid/projection.hh:169
Interface class for vertex projection at the boundary.
Definition: boundaryprojection.hh:23
bool hasProjection(const ElementInfo &elementInfo, const int face) const
Definition: albertagrid/projection.hh:175
ALBERTA REAL_B LocalVector
Definition: misc.hh:46
Dune::shared_ptr< const Projection > ProjectionPtr
Definition: albertagrid/projection.hh:44
ALBERTA REAL_D GlobalVector
Definition: misc.hh:47
friend class ProjectionFactory< Proj, Impl >
Definition: albertagrid/projection.hh:81
static const int dimWorld
Definition: misc.hh:43
#define ALBERTA
Definition: albertaheader.hh:27
Definition: albertagrid/projection.hh:231
Base::Projection Projection
Definition: albertagrid/projection.hh:138
bool hasProjection(const ElementInfo &elementInfo, const int face) const
Definition: albertagrid/projection.hh:98
Definition: albertagrid/projection.hh:204
static const int dimension
Definition: albertagrid/projection.hh:238
FieldVector< Real, dimWorld > GlobalCoordinate
Definition: albertagrid/projection.hh:41
Definition: albertagrid/projection.hh:159
static ElementInfo createFake(const MeshPointer &mesh, const Element *element, int level, int type=0)
Dune::DuneBoundaryProjection< dimWorld > Projection
Definition: albertagrid/projection.hh:43
Projection projection(const ElementInfo &elementInfo) const
Definition: albertagrid/projection.hh:113
NodeProjection(unsigned int boundaryIndex, const Projection &projection)
Definition: albertagrid/projection.hh:246
Base::ElementInfo ElementInfo
Definition: albertagrid/projection.hh:167
Definition: albertagrid/projection.hh:77
DuneBoundaryProjection(const ProjectionPtr &projection)
Definition: albertagrid/projection.hh:46
Alberta::ElementInfo< dimension > ElementInfo
Definition: albertagrid/projection.hh:40
Projection projection(const ElementInfo &elementInfo, const int face) const
Definition: albertagrid/projection.hh:185
Alberta::ElementInfo< dimension > ElementInfo
Definition: albertagrid/projection.hh:88
static const int dimension
Definition: albertagrid/projection.hh:86
Base::ElementInfo ElementInfo
Definition: albertagrid/projection.hh:139
Definition: grapecommon.hh:49
const Projection & projection() const
Definition: albertagrid/projection.hh:62
const Impl & asImpl() const
Definition: albertagrid/projection.hh:119
unsigned int boundaryIndex() const
Definition: albertagrid/projection.hh:216
BasicNodeProjection(unsigned int boundaryIndex)
Definition: albertagrid/projection.hh:207
Proj Projection
Definition: albertagrid/projection.hh:84
Definition: albertagrid/projection.hh:25
static const int dimension
Definition: albertagrid/projection.hh:38
Definition: albertagrid/projection.hh:33
virtual ~BasicNodeProjection()
Definition: albertagrid/projection.hh:213
Projection projection(const ElementInfo &elementInfo, const int face) const
Definition: albertagrid/projection.hh:108
Alberta::ElementInfo< dimension > ElementInfo
Definition: albertagrid/projection.hh:240
provides a wrapper for ALBERTA's el_info structure
DuneGlobalBoundaryProjectionFactory(const DuneProjectionPtr &projection)
Definition: albertagrid/projection.hh:171
Include standard header files.
Definition: agrid.hh:59
bool hasProjection(const ElementInfo &elementInfo) const
Definition: albertagrid/projection.hh:103
ProjectionFactory()
Definition: albertagrid/projection.hh:142
bool hasProjection(const ElementInfo &elementInfo) const
Definition: albertagrid/projection.hh:180
Base::Projection Projection
Definition: albertagrid/projection.hh:166
Projection projection(const ElementInfo &elementInfo) const
Definition: albertagrid/projection.hh:190
void operator()(const ElementInfo &elementInfo, const LocalVector local, GlobalVector global) const
Definition: albertagrid/projection.hh:51