21 #ifndef bempp_raviart_thomas_0_vector_space_hpp
22 #define bempp_raviart_thomas_0_vector_space_hpp
24 #include "../common/common.hpp"
28 #include "dof_assignment_mode.hpp"
30 #include "../grid/grid_segment.hpp"
31 #include "../grid/grid_view.hpp"
32 #include "../common/types.hpp"
33 #include "../fiber/raviart_thomas_0_shapeset.hpp"
35 #include <boost/scoped_ptr.hpp>
38 #include <tbb/mutex.h>
53 template <
typename BasisFunctionType>
78 const shared_ptr<const Grid>&
grid,
79 bool putDofsOnBoundaries =
false);
104 const shared_ptr<const Grid>& grid,
106 bool putDofsOnBoundaries =
false,
107 int dofMode = EDGE_ON_SEGMENT);
126 return RAVIART_THOMAS_0_VECTOR;
136 ElementVariant variant);
144 std::vector<GlobalDofIndex>& dofs,
145 std::vector<BasisFunctionType>& dofWeights)
const;
146 virtual void global2localDofs(
147 const std::vector<GlobalDofIndex>& globalDofs,
148 std::vector<std::vector<LocalDof> >& localDofs,
149 std::vector<std::vector<BasisFunctionType> >& localDofWeights)
const;
151 const std::vector<FlatLocalDofIndex>& flatLocalDofs,
152 std::vector<LocalDof>& localDofs)
const;
170 const char* fileName,
171 const std::vector<unsigned int>& clusterIdsOfGlobalDofs)
const;
173 const char* fileName,
174 const std::vector<unsigned int>& clusterIdsOfGlobalDofs,
175 DofType dofType)
const;
179 void assignDofsImpl();
184 boost::scoped_ptr<Impl> m_impl;
186 bool m_putDofsOnBoundaries;
188 std::auto_ptr<GridView> m_view;
190 std::vector<std::vector<GlobalDofIndex> > m_local2globalDofs;
191 std::vector<std::vector<BasisFunctionType> > m_local2globalDofWeights;
192 std::vector<std::vector<LocalDof> > m_global2localDofs;
193 std::vector<LocalDof> m_flatLocal2localDofs;
194 std::vector<BoundingBox<CoordinateType> > m_globalDofBoundingBoxes;
195 mutable shared_ptr<Space<BasisFunctionType> > m_discontinuousSpace;
196 mutable tbb::mutex m_discontinuousSpaceMutex;
Shapeset composed of the lowest-order Raviart-Thomas functions.
Definition: raviart_thomas_0_shapeset.hpp:60
virtual void getGlobalDofBoundingBoxes(std::vector< BoundingBox< CoordinateType > > &bboxes) const
Retrieve bounding boxes of global degrees of freedom.
Definition: raviart_thomas_0_vector_space.cpp:499
virtual shared_ptr< const Space< BasisFunctionType > > discontinuousSpace(const shared_ptr< const Space< BasisFunctionType > > &self) const
Return a shared pointer to an appropriate counterpart to this space, with basis functions extending o...
Definition: raviart_thomas_0_vector_space.cpp:123
virtual size_t flatLocalDofCount() const
Total number of local degrees of freedom on all elements.
Definition: raviart_thomas_0_vector_space.cpp:430
Fiber::ScalarTraits< BasisFunctionType >::ComplexType ComplexType
Equivalent to std::complex<CoordinateType>.
Definition: space.hpp:93
virtual int codomainDimension() const
Dimension of the codomain of the functions.
Definition: raviart_thomas_0_vector_space.cpp:158
virtual void getGlobalDofs(const Entity< 0 > &element, std::vector< GlobalDofIndex > &dofs, std::vector< BasisFunctionType > &dofWeights) const
Map local degrees of freedom residing on an element to global degrees of freedom. ...
Definition: raviart_thomas_0_vector_space.cpp:436
virtual bool spaceIsCompatible(const Space< BasisFunctionType > &other) const
Return true if other is compatible to this space, i.e. the global dofs of the two spaces agree with e...
Definition: raviart_thomas_0_vector_space.cpp:93
Function space.
Definition: assembled_potential_operator.hpp:35
RaviartThomas0VectorSpace(const shared_ptr< const Grid > &grid, bool putDofsOnBoundaries=false)
Constructor.
Definition: raviart_thomas_0_vector_space.cpp:65
Bounding box with a reference point.
Definition: bounding_box.hpp:13
virtual size_t globalDofCount() const
Number of global degrees of freedom.
Definition: raviart_thomas_0_vector_space.cpp:424
Fiber::ScalarTraits< BasisFunctionType >::RealType CoordinateType
Type used to represent coordinates.
Definition: space.hpp:91
Collection of shape functions defined on a reference element.
Definition: default_local_assembler_for_operators_on_surfaces_utilities.hpp:34
virtual const CollectionOfShapesetTransformations & basisFunctionValue() const
Transformation mapping shape functions to basis functions.
Definition: raviart_thomas_0_vector_space.cpp:146
virtual void flatLocal2localDofs(const std::vector< FlatLocalDofIndex > &flatLocalDofs, std::vector< LocalDof > &localDofs) const
Map flat indices of local degrees of freedom to local degrees of freedom.
Definition: raviart_thomas_0_vector_space.cpp:469
shared_ptr< const Grid > grid() const
Shared pointer to the grid on which the functions from this space are defined.
Definition: space.hpp:183
virtual void getFlatLocalDofPositions(std::vector< Point3D< CoordinateType > > &positions) const
Retrieve the reference positions of local degrees of freedom ordered by their flat index...
Definition: raviart_thomas_0_vector_space.cpp:488
virtual void getGlobalDofPositions(std::vector< Point3D< CoordinateType > > &positions) const
Retrieve the reference positions of global degrees of freedom.
Definition: raviart_thomas_0_vector_space.cpp:479
Segment of a grid.
Definition: grid_segment.hpp:46
virtual void dumpClusterIds(const char *fileName, const std::vector< unsigned int > &clusterIdsOfGlobalDofs) const
Write a VTK file showing the distribution of global or flat local degrees of freedom into clusters...
Definition: raviart_thomas_0_vector_space.cpp:641
virtual ElementVariant elementVariant(const Entity< 0 > &element) const
Return the variant of element element.
Definition: raviart_thomas_0_vector_space.cpp:182
virtual void getFlatLocalDofBoundingBoxes(std::vector< BoundingBox< CoordinateType > > &bboxes) const
Retrieve bounding boxes of local degrees of freedom ordered by their flat index.
Definition: raviart_thomas_0_vector_space.cpp:506
virtual bool isDiscontinuous() const
Return true if each basis function of this space extends over only a single element, false otherwise.
Definition: raviart_thomas_0_vector_space.cpp:138
virtual void dumpClusterIdsEx(const char *fileName, const std::vector< unsigned int > &clusterIdsOfGlobalDofs, DofType dofType) const
Write a VTK file showing the distribution of global or flat local degrees of freedom into clusters...
Definition: raviart_thomas_0_vector_space.cpp:649
Space spanned by the lowest order Raviart-Thomas functions.
Definition: raviart_thomas_0_vector_space.hpp:54
virtual void getFlatLocalDofNormals(std::vector< Point3D< CoordinateType > > &normals) const
Retrieve the unit vectors normal to the grid at the positions of global degrees of freedom...
Definition: raviart_thomas_0_vector_space.cpp:601
virtual bool isBarycentric() const
Return true if space is based on a barycentric refinement.
Definition: raviart_thomas_0_vector_space.hpp:119
Abstract wrapper of an entity of codimension 0.
Definition: entity.hpp:81
virtual void getGlobalDofNormals(std::vector< Point3D< CoordinateType > > &normals) const
Retrieve the unit vectors normal to the grid at the positions of global degrees of freedom...
Definition: raviart_thomas_0_vector_space.cpp:558
virtual int domainDimension() const
Dimension of the grid on which functions from this space are defined.
Definition: raviart_thomas_0_vector_space.cpp:152
virtual SpaceIdentifier spaceIdentifier() const
Return the identifier of the space.
Definition: raviart_thomas_0_vector_space.hpp:125
virtual void setElementVariant(const Entity< 0 > &element, ElementVariant variant)
Set the variant of element element to variant.
Definition: raviart_thomas_0_vector_space.cpp:197
virtual const Fiber::Shapeset< BasisFunctionType > & shapeset(const Entity< 0 > &element) const
Reference to the shapeset attached to the specified element.
Definition: raviart_thomas_0_vector_space.cpp:165