BEM++  2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Types | Public Member Functions | List of all members
Bempp::PiecewiseLinearScalarSpace< BasisFunctionType > Class Template Reference

Space of continuous, piecewise linear scalar functions. More...

#include </home/wojtek/Projects/BEM/bempp-sven/bempp/lib/space/piecewise_linear_scalar_space.hpp>

Inheritance diagram for Bempp::PiecewiseLinearScalarSpace< BasisFunctionType >:
Bempp::ScalarSpace< BasisFunctionType > Bempp::Space< BasisFunctionType > Bempp::PiecewiseLinearContinuousScalarSpace< BasisFunctionType > Bempp::PiecewiseLinearContinuousScalarSpaceBarycentric< BasisFunctionType > Bempp::PiecewiseLinearDiscontinuousScalarSpace< BasisFunctionType >

Public Types

typedef Space
< BasisFunctionType >
::CoordinateType 
CoordinateType
 
typedef Space
< BasisFunctionType >
::ComplexType 
ComplexType
 
- Public Types inherited from Bempp::ScalarSpace< BasisFunctionType >
typedef Base::CoordinateType CoordinateType
 
typedef
Base::CollectionOfShapesetTransformations 
CollectionOfShapesetTransformations
 
typedef
Base::CollectionOfBasisTransformations 
CollectionOfBasisTransformations
 
- Public Types inherited from Bempp::Space< BasisFunctionType >
typedef Fiber::ScalarTraits
< BasisFunctionType >
::RealType 
CoordinateType
 Type used to represent coordinates.
 
typedef Fiber::ScalarTraits
< BasisFunctionType >
::ComplexType 
ComplexType
 Equivalent to std::complex<CoordinateType>.
 
typedef
Fiber::CollectionOfShapesetTransformations
< CoordinateType
CollectionOfShapesetTransformations
 Appropriate instantiation of Fiber::CollectionOfShapesetTransformations.
 
typedef
Fiber::CollectionOfBasisTransformations
< CoordinateType
CollectionOfBasisTransformations
 Appropriate instantiation of Fiber::CollectionOfBasisTransformations.
 

Public Member Functions

 PiecewiseLinearScalarSpace (const shared_ptr< const Grid > &grid)
 
virtual int domainDimension () const
 Dimension of the grid on which functions from this space are defined.
 
virtual int codomainDimension () const
 Dimension of the codomain of the functions. More...
 
virtual ElementVariant elementVariant (const Entity< 0 > &element) const
 Return the variant of element element. More...
 
virtual void setElementVariant (const Entity< 0 > &element, ElementVariant variant)
 Set the variant of element element to variant. More...
 
virtual const Fiber::Shapeset
< BasisFunctionType > & 
shapeset (const Entity< 0 > &element) const
 Reference to the shapeset attached to the specified element.
 
virtual void getGlobalDofInterpolationPoints (arma::Mat< CoordinateType > &points) const
 Retrieve the interpolation points of the global degrees of freedom. More...
 
virtual void getNormalsAtGlobalDofInterpolationPoints (arma::Mat< CoordinateType > &normals) const
 Retrieve the unit vectors normal to the grid at the interpolation points of the global degrees of freedom. More...
 
- Public Member Functions inherited from Bempp::ScalarSpace< BasisFunctionType >
 ScalarSpace (const shared_ptr< const Grid > &grid)
 
 ScalarSpace (const ScalarSpace &other)
 Copy constructor.
 
ScalarSpaceoperator= (const ScalarSpace &other)
 Assignment operator.
 
virtual const
CollectionOfShapesetTransformations
basisFunctionValue () const
 Transformation mapping shape functions to basis functions. More...
 
virtual void getGlobalDofInterpolationDirections (arma::Mat< CoordinateType > &directions) const
 Retrieve the interpolation directions of the global degrees of freedom. More...
 
- Public Member Functions inherited from Bempp::Space< BasisFunctionType >
 Space (const shared_ptr< const Grid > &grid)
 Constructor. More...
 
 Space (const Space< BasisFunctionType > &other)
 Copy Constructor.
 
virtual ~Space ()
 Destructor.
 
Space< BasisFunctionType > & operator= (const Space< BasisFunctionType > &other)
 Assignment operator.
 
shared_ptr< GeometryFactoryelementGeometryFactory () const
 Return the GeometryFactory associated with the mesh.
 
BEMPP_DEPRECATED void assignDofs ()
 Assign global degrees of freedom to local degrees of freedom. More...
 
BEMPP_DEPRECATED bool dofsAssigned () const
 True if global degrees of freedom have been already assigned to local degrees of freedom, false otherwise. More...
 
virtual size_t flatLocalDofCount () const =0
 Total number of local degrees of freedom on all elements.
 
virtual size_t globalDofCount () const =0
 Number of global degrees of freedom.
 
virtual void getGlobalDofs (const Entity< 0 > &element, std::vector< GlobalDofIndex > &dofs) const
 Map local degrees of freedom residing on an element to global degrees of freedom. More...
 
virtual void getGlobalDofs (const Entity< 0 > &element, std::vector< GlobalDofIndex > &dofs, std::vector< BasisFunctionType > &localDofWeights) const
 Map local degrees of freedom residing on an element to global degrees of freedom. More...
 
virtual bool gridIsIdentical (const Space< BasisFunctionType > &other) const
 Return true if both spaces act on the same grid.
 
virtual SpaceIdentifier spaceIdentifier () const =0
 Return the identifier of the space.
 
virtual bool spaceIsCompatible (const Space< BasisFunctionType > &other) const =0
 Return true if other is compatible to this space, i.e. the global dofs of the two spaces agree with each other.
 
virtual void global2localDofs (const std::vector< GlobalDofIndex > &globalDofs, std::vector< std::vector< LocalDof > > &localDofs) const
 Map global degrees of freedom to local degrees of freedom. More...
 
virtual void global2localDofs (const std::vector< GlobalDofIndex > &globalDofs, std::vector< std::vector< LocalDof > > &localDofs, std::vector< std::vector< BasisFunctionType > > &localDofWeights) const
 
virtual void flatLocal2localDofs (const std::vector< FlatLocalDofIndex > &flatLocalDofs, std::vector< LocalDof > &localDofs) const =0
 Map flat indices of local degrees of freedom to local degrees of freedom. More...
 
virtual void getGlobalDofBoundingBoxes (std::vector< BoundingBox< CoordinateType > > &boundingBoxes) const
 Retrieve bounding boxes of global degrees of freedom. More...
 
virtual void getFlatLocalDofBoundingBoxes (std::vector< BoundingBox< CoordinateType > > &boundingBoxes) const
 Retrieve bounding boxes of local degrees of freedom ordered by their flat index. More...
 
virtual void getGlobalDofPositions (std::vector< Point3D< CoordinateType > > &positions) const =0
 Retrieve the reference positions of global degrees of freedom. More...
 
virtual void getFlatLocalDofPositions (std::vector< Point3D< CoordinateType > > &positions) const =0
 Retrieve the reference positions of local degrees of freedom ordered by their flat index. More...
 
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. More...
 
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. More...
 
virtual BEMPP_DEPRECATED void dumpClusterIds (const char *fileName, const std::vector< unsigned int > &clusterIdsOfGlobalDofs) const =0
 Write a VTK file showing the distribution of global or flat local degrees of freedom into clusters. More...
 
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. More...
 
virtual shared_ptr< const
Space< BasisFunctionType > > 
discontinuousSpace (const shared_ptr< const Space< BasisFunctionType > > &self) const =0
 Return a shared pointer to an appropriate counterpart to this space, with basis functions extending only over single elements. More...
 
virtual bool isDiscontinuous () const =0
 Return true if each basis function of this space extends over only a single element, false otherwise.
 
virtual bool isBarycentric () const =0
 Return true if space is based on a barycentric refinement.
 
shared_ptr< const Gridgrid () const
 Shared pointer to the grid on which the functions from this space are defined.
 
virtual BEMPP_DEPRECATED const
Fiber::Basis
< BasisFunctionType > & 
basis (const Entity< 0 > &element) const
 Reference to the shapeset attached to the specified element. More...
 
virtual BEMPP_DEPRECATED const
CollectionOfBasisTransformations
shapeFunctionValue () const
 Transformation mapping shape functions to basis functions. More...
 
virtual shared_ptr< const
Space< BasisFunctionType > > 
barycentricSpace (const shared_ptr< const Space< BasisFunctionType > > &self) const
 Return an equivalent space (in terms of global Dofs), but defined using local dofs on the barycentrically refined grid.
 
unsigned int level () const
 Return the grid level of the current space.
 
int gridDimension () const
 Return the underlying grid dimension.
 
int worldDimension () const
 Return the underlying world dimension.
 
const GridViewgridView () const
 Return the grid view of the current space.
 

Additional Inherited Members

Detailed Description

template<typename BasisFunctionType>
class Bempp::PiecewiseLinearScalarSpace< BasisFunctionType >

Space of continuous, piecewise linear scalar functions.

Member Function Documentation

template<typename BasisFunctionType >
int Bempp::PiecewiseLinearScalarSpace< BasisFunctionType >::codomainDimension ( ) const
virtual

Dimension of the codomain of the functions.

In other words, number of components of the values of the functions. (E.g. H1 space -> 1, H(curl) space on a 2D surface -> 2).

Implements Bempp::Space< BasisFunctionType >.

Reimplemented in Bempp::PiecewiseLinearContinuousScalarSpaceBarycentric< BasisFunctionType >.

template<typename BasisFunctionType >
ElementVariant Bempp::PiecewiseLinearScalarSpace< BasisFunctionType >::elementVariant ( const Entity< 0 > &  element) const
virtual

Return the variant of element element.

Possible return values:

  • 2: one-dimensional segment,
  • 3: triangular element,
  • 4: quadrilateral element.

Implements Bempp::Space< BasisFunctionType >.

Reimplemented in Bempp::PiecewiseLinearContinuousScalarSpaceBarycentric< BasisFunctionType >.

References Bempp::Entity< 0 >::type().

template<typename BasisFunctionType >
void Bempp::PiecewiseLinearScalarSpace< BasisFunctionType >::getGlobalDofInterpolationPoints ( arma::Mat< CoordinateType > &  points) const
virtual

Retrieve the interpolation points of the global degrees of freedom.

This function, along with getNormalsAtGlobalDofInterpolationPoints() and getGlobalDofInterpolationDirections(), can be used in the interpolation of functions in finite-dimensional function spaces represented with classes derived from Space. Let $V$ be a function space defined on grid $\Gamma$ with a basis $(f_i)_{i=1}^N$ of functions $f_i : \Gamma \to \mathbb{R}^n$ (or $\mathbb{C}^n$. We say that this basis is interpolatory if there exist points $x_j \in \Gamma$ and $n$-dimensional vectors $d_j$ ( $j = 1, 2, \dots, N$ such that

\[ f_i(x_j) \cdot d_j = \begin{cases} 1 &\text{for} i = j,\\ 0 &\text{otherwise}. \end{cases} \]

For any appropriate function $u$ defined on $Gamma$ the numbers $u(x_i) \cdot d_i$ can then be taken as the expansion coefficients in the basis $(f_i)_{i=1}^N$ of its interpolation. ("Appropriate" means that if, for example, the space $V$ is a space of functions tangential to the grid, then $u$ should also be tangential to the grid.)

This function fills the 2D array points whose (i, j)th element contains the ith coordinate of the interpolation point $x_j$.

Reimplemented from Bempp::Space< BasisFunctionType >.

template<typename BasisFunctionType >
void Bempp::PiecewiseLinearScalarSpace< BasisFunctionType >::getNormalsAtGlobalDofInterpolationPoints ( arma::Mat< CoordinateType > &  normals) const
virtual

Retrieve the unit vectors normal to the grid at the interpolation points of the global degrees of freedom.

This function fills the 2D array normals whose (i, j)th element contains the ith component of the unit vector normal to the grid at the interpolation point $x_j$ defined in the documentation of getGlobalDofInterpolationPoints().

Reimplemented from Bempp::Space< BasisFunctionType >.

template<typename BasisFunctionType >
void Bempp::PiecewiseLinearScalarSpace< BasisFunctionType >::setElementVariant ( const Entity< 0 > &  element,
ElementVariant  variant 
)
virtual

Set the variant of element element to variant.

The element variant determines the set of basis functions defined on the element (e.g. maximum polynomial order). Different subclasses of Space interpret the variant argument in different ways; for more information, see the documentation of these subclasses.

Note
Calling this function only makes sense for subclasses implementing adaptive function spaces. Currently there are no such subclasses.

Implements Bempp::Space< BasisFunctionType >.

Reimplemented in Bempp::PiecewiseLinearContinuousScalarSpaceBarycentric< BasisFunctionType >.


The documentation for this class was generated from the following files: