|
| BSplinePreBasis (const GridView &gridView, const std::vector< double > &knotVector, unsigned int order, bool makeOpen=true) |
| Construct a B-spline basis for a given grid view and set of knot vectors. More...
|
|
| BSplinePreBasis (const GridView &gridView, const FieldVector< double, dim > &lowerLeft, const FieldVector< double, dim > &upperRight, const std::array< unsigned int, dim > &elements, unsigned int order, bool makeOpen=true) |
| Construct a B-spline basis for a given grid view with uniform knot vectors. More...
|
|
void | initializeIndices () |
| Initialize the global indices. More...
|
|
const GridView & | gridView () const |
| Obtain the grid view that the basis is defined on. More...
|
|
void | update (const GridView &gv) |
| Update the stored grid view, to be called if the grid has changed. More...
|
|
Node | makeNode () const |
| Create tree node. More...
|
|
IndexSet | makeIndexSet () const |
| Create tree node index set. More...
|
|
size_type | size (const SizePrefix prefix) const |
| Return number of possible values for next position in multi index. More...
|
|
size_type | dimension () const |
| Get the total dimension of the space spanned by this basis. More...
|
|
size_type | maxNodeSize () const |
| Get the maximal number of DOFs associated to node for any element. More...
|
|
template<typename It > |
It | indices (const Node &node, It it) const |
| Maps from subtree index set [0..size-1] to a globally unique multi index in global basis. More...
|
|
unsigned int | size () const |
| Total number of B-spline basis functions. More...
|
|
unsigned int | size (size_t d) const |
| Number of shape functions in one direction. More...
|
|
void | evaluateFunction (const FieldVector< typename GV::ctype, dim > &in, std::vector< FieldVector< R, 1 > > &out, const std::array< unsigned, dim > ¤tKnotSpan) const |
| Evaluate all B-spline basis functions at a given point. More...
|
|
void | evaluateJacobian (const FieldVector< typename GV::ctype, dim > &in, std::vector< FieldMatrix< R, 1, dim > > &out, const std::array< unsigned, dim > ¤tKnotSpan) const |
| Evaluate Jacobian of all B-spline basis functions. More...
|
|
template<size_type k> |
void | evaluate (const typename std::array< int, k > &directions, const FieldVector< typename GV::ctype, dim > &in, std::vector< FieldVector< R, 1 > > &out, const std::array< unsigned, dim > ¤tKnotSpan) const |
| Evaluate Derivatives of all B-spline basis functions. More...
|
|
|
static std::array< unsigned int, dim > | getIJK (typename GridView::IndexSet::IndexType idx, std::array< unsigned int, dim > elements) |
| Compute integer element coordinates from the element index. More...
|
|
static void | evaluateFunction (const typename GV::ctype &in, std::vector< R > &out, const std::vector< R > &knotVector, unsigned int order, unsigned int currentKnotSpan) |
| Evaluate all one-dimensional B-spline functions for a given coordinate direction. More...
|
|
static void | evaluateFunctionFull (const typename GV::ctype &in, DynamicMatrix< R > &out, const std::vector< R > &knotVector, unsigned int order, unsigned int currentKnotSpan) |
| Evaluate all one-dimensional B-spline functions for a given coordinate direction. More...
|
|
static void | evaluateAll (const typename GV::ctype &in, std::vector< R > &out, bool evaluateJacobian, std::vector< R > &outJac, bool evaluateHessian, std::vector< R > &outHess, const std::vector< R > &knotVector, unsigned int order, unsigned int currentKnotSpan) |
| Evaluate the second derivatives of all one-dimensional B-spline functions for a given coordinate direction. More...
|
|
template<typename GV, class MI>
class Dune::Functions::BSplinePreBasis< GV, MI >
Pre-basis for B-spline basis.
- Template Parameters
-
GV | The GridView that the space is defined on |
MI | Type to be used for multi-indices |
The BSplinePreBasis can be used to embed a BSplineBasis in a larger basis for the construction of product spaces.
template<typename GV , class MI >
Construct a B-spline basis for a given grid view and set of knot vectors.
The grid must match the knot vectors, i.e.:
- The grid must be structured and Cartesian, and have cube elements only
- The number of elements in each direction must match the number of knot spans in that direction
- In fact, the element spacing in any direction must match the knot spacing in that direction (disregarding knot multiplicities)
- When ordering the grid elements according to their indices, the resulting order must be lexicographical, with the x-index increasing fastest.
Unfortunately, not all of these conditions can be checked for automatically.
- Parameters
-
knotVector | A single knot vector, which will be used for all coordinate directions |
order | B-spline order, will be used for all coordinate directions |
makeOpen | If this is true, then knots are prepended and appended to the knot vector to make the knot vector 'open'. i.e., start and end with 'order+1' identical knots. Basis functions from such knot vectors are interpolatory at the end of the parameter interval. |
- Todo:
- maybe test whether the knot vector is already open?
template<typename GV , class MI >
Construct a B-spline basis for a given grid view with uniform knot vectors.
The grid must match the knot vectors, i.e.:
- The grid must be structured and Cartesian, and have cube elements only
- Bounding box and number of elements of the grid must match the corresponding arguments given to this constructor.
- The element spacing must be uniform
- When ordering the grid elements according to their indices, the resulting order must be lexicographical, with the x-index increasing fastest.
Unfortunately, not all of these conditions can be checked for automatically.
- Parameters
-
gridView | The grid we are defining the basis on |
lowerLeft | Lower left corner of the structured grid |
upperRight | Upper right corner of the structured grid |
elements | Number of elements in each coordinate direction |
order | B-spline order, will be used for all coordinate directions |
makeOpen | If this is true, then knots are prepended and appended to the knot vector to make the knot vector 'open'. i.e., start and end with 'order+1' identical knots. Basis functions from such knot vectors are interpolatory at the end of the parameter interval. |
- Todo:
- maybe test whether the knot vector is already open?
template<typename GV , class MI >
static void Dune::Functions::BSplinePreBasis< GV, MI >::evaluateFunction |
( |
const typename GV::ctype & |
in, |
|
|
std::vector< R > & |
out, |
|
|
const std::vector< R > & |
knotVector, |
|
|
unsigned int |
order, |
|
|
unsigned int |
currentKnotSpan |
|
) |
| |
|
inlinestatic |
Evaluate all one-dimensional B-spline functions for a given coordinate direction.
This implementations was based on the explanations in the book of Cottrell, Hughes, Bazilevs, "Isogeometric Analysis"
- Parameters
-
| in | Scalar(!) coordinate where to evaluate the functions |
[out] | out | Vector containing the values of all B-spline functions at 'in' |
- Todo:
- We only hand out function values for those basis functions whose support overlaps the current knot span. However, in the preceding loop we still computed all values_. This won't scale.
template<typename GV , class MI >
static void Dune::Functions::BSplinePreBasis< GV, MI >::evaluateFunctionFull |
( |
const typename GV::ctype & |
in, |
|
|
DynamicMatrix< R > & |
out, |
|
|
const std::vector< R > & |
knotVector, |
|
|
unsigned int |
order, |
|
|
unsigned int |
currentKnotSpan |
|
) |
| |
|
inlinestatic |
Evaluate all one-dimensional B-spline functions for a given coordinate direction.
This implementations was based on the explanations in the book of Cottrell, Hughes, Bazilevs, "Isogeometric Analysis"
- Todo:
- This method is a hack! I computes the derivatives of ALL B-splines, even the ones that are zero on the current knot span. I need it as an intermediate step to get the derivatives working. It will/must be removed as soon as possible.
- Parameters
-
| in | Scalar(!) coordinate where to evaluate the functions |
[out] | out | Vector containing the values of all B-spline functions at 'in' |