G+Smo
24.08.0
Geometry + Simulation Modules
|
A univariate Lagrange basis.
T | coefficient type |
Public Types | |
typedef memory::shared_ptr < gsMPBESBSplineBasis > | Ptr |
Shared pointer for gsMPBESBSplineBasis. | |
typedef memory::unique_ptr < gsMPBESBSplineBasis > | uPtr |
Unique pointer for gsMPBESBSplineBasis. | |
Public Member Functions | |
gsMatrix< index_t > | active (const gsMatrix< T > &u) const |
Returns the indices of active (nonzero) functions at points u, as a list of indices. More... | |
void | active_into (const index_t patch, const gsMatrix< T > &u, gsMatrix< index_t > &result) const |
Returns the indices of active (non-zero) basis functions of patch at points u, as a list of indices, in result. More... | |
gsTensorBSplineBasis< d, T > & | basis (size_t i) |
Clone function. Used to make a copy of a derived basis. | |
const gsBasis< T > & | basis (const index_t k) const |
Helper which casts and returns the k-th piece of this function set as a gsBasis. | |
unsigned | basisFunctionsOnSide (const patchSide &ps) const |
Returns the amount of basis functions on a given side of a given patch. | |
void | boundary (std::vector< index_t > &indices, index_t offset=0) const |
uPtr | clone () |
Clone methode. Produceds a deep copy inside a uPtr. | |
virtual void | compute (const gsMatrix< T > &in, gsFuncData< T > &out) const |
Computes function data. More... | |
short_t | degree (const index_t patch, const short_t i) const |
Returns the polynomial degree of direction i of patch. | |
void | degreeElevate (index_t amount=1, bool updateBasis=true) |
void | degreeIncrease (index_t amount=1, index_t dir=-1, bool updateBasis=true) |
gsMatrix< T > | deriv (const gsMatrix< T > &u) const |
Evaluate the derivatives,. More... | |
gsMatrix< T > | deriv2 (const gsMatrix< T > &u) const |
Evaluates the second derivatives of active (i.e., non-zero) functions at points u. More... | |
std::string | detail () const |
Clone function. Used to make a copy of a derived basis. More... | |
short_t | dim () const |
Returns the dimension d of the parameter space. | |
short_t | domainDim () const |
Clone function. Used to make a copy of a derived basis. | |
gsMatrix< T > | eval (const gsMatrix< T > &u) const |
Evaluate the function,. More... | |
std::vector< gsMatrix< T > > | evalAllDers (const gsMatrix< T > &u, int n, bool sameElement=false) const |
Evaluate all derivatives upto order n,. More... | |
gsGeometry< T > * | exportPatch (const index_t i, gsMatrix< T > const &localCoef) const |
gsMultiPatch< T > | exportToPatches (gsMatrix< T > const &localCoef) const |
const gsFunction< T > & | function (const index_t k) const |
Helper which casts and returns the k-th piece of this function set as a gsFunction. | |
BasisType const & | getBase (index_t i) const |
getter for (const) m_bases[i] | |
BasisType & | getBase (index_t i) |
getter for m_bases[i] | |
const std::vector< BasisType * > | getBases () const |
getter for m_bases | |
std::vector< BasisType * > | getBasesCopy () const |
getter for m_bases | |
index_t | getIncrSmoothnessDegree () const |
getter for m_incrSmoothnessDegree | |
gsMappedSingleBasis< d, T > & | getMappedSingleBasis (const index_t i) const |
gsWeightMapper< T > const & | getMapper () const |
getter for m_mapper | |
gsWeightMapper< T > * | getMapPointer () const |
getter for m_mapper | |
T | getParametricDistanceOfVertex (const patchCorner &pc, const patchSide &ps) const |
gives back the parametric c^0 distance of the edge ps starting from corner pc | |
index_t | getPatch (index_t const localIndex) |
See gsMappedBasis::_getPatchIndex. | |
gsBoxTopology const & | getTopol () const |
getter for m_topol | |
T | getWeight (const patchSide &ps) const |
void | global_coef_to_local_coef (gsMatrix< T > const &globalCoefs, gsMatrix< T > &localCoefs) const |
gsMPBESBSplineBasis () | |
Default empty constructor. | |
void | innerBoundaries (std::vector< index_t > &indices, index_t offset=0) const |
bool | isSpecialVertex (const patchCorner &pc) const |
gives back true, if the given patchCorner is a special vertex | |
void | local_coef_to_global_coef (gsMatrix< T > const &localCoefs, gsMatrix< T > &globalCoefs) const |
index_t | localSize () const |
Returns the number of local basis functions in the basis. | |
index_t | localSize (const index_t index) const |
Returns the number of local basis functions of the patch with given index in the basis. | |
domainIter | makeDomainIterator (const index_t patch, const boxSide &s) const |
gives back the domain iterator of the boundary side s of a given patch | |
short_t | maxDegree () const |
Returns the maximal polynomial degree of the patches. | |
size_t | nPatches () const |
returns the amount of patches of the multi patch | |
void | numActive_into (const index_t patch, const gsMatrix< T > &u, gsVector< index_t > &result) const |
Returns the number of active (nonzero) basis functions at points u in result. | |
std::ostream & | print (std::ostream &os) const |
Prints the object to the stream. | |
void | refine (const index_t patch, gsMatrix< T > const &boxes, bool updateBasis=true) |
void | refine_withCoefs (gsMatrix< T > &coefs, const index_t patch, gsMatrix< T > const &boxes, bool updateBasis=true) |
void | refineElements (const index_t patch, std::vector< index_t > const &boxes, bool updateBasis=true) |
void | refineElements_withCoefs (gsMatrix< T > &coefs, const index_t patch, std::vector< index_t > const &boxes, bool updateBasis=true) |
void | repairPatches (index_t startFromPatch=-1) |
void | setC0 (patchCorner pc) |
bool | setWeight (const patchSide &ps, const T weight) |
index_t | size (const index_t index) const |
void | smoothCornerEdge (const patchCorner &pc, const patchSide &ps, bool updateBasis=true) |
void | smoothEverything () |
virtual short_t | targetDim () const |
Dimension of the target space. More... | |
void | uniformRefine (index_t numKnots=1, index_t mul=1, bool updateBasis=true) |
void | uniformRefine_withCoefs (gsMatrix< T > &localCoefs, index_t numKnots=1, index_t mul=1, bool updateBasis=true) |
void | updateTopol () |
updates the mapping of this basis (f.e. after a knot insertion) | |
Evaluation functions | |
void | eval_into (const index_t patch, const gsMatrix< T > &u, gsMatrix< T > &result) const |
Evaluates nonzero basis functions of patch at point u into result. More... | |
void | deriv_into (const index_t patch, const gsMatrix< T > &u, gsMatrix< T > &result) const |
void | deriv2_into (const index_t patch, const gsMatrix< T > &u, gsMatrix< T > &result) const |
void | evalAllDers_into (const index_t patch, const gsMatrix< T > &u, const index_t n, std::vector< gsMatrix< T > > &result, bool sameElement=false) const |
Evaluate the nonzero basis functions of patch and their derivatives up to order n at points u into result. | |
gsPiecewiseFunction< T > | basisFunction (index_t global_BF) |
void | evalSingle_into (const index_t patch, const index_t global_BF, const gsMatrix< T > &u, gsMatrix< T > &result) const |
Evaluate the global_BF-th basis function on patch at points u into result. | |
void | derivSingle_into (const index_t patch, const index_t global_BF, const gsMatrix< T > &u, gsMatrix< T > &result) const |
void | deriv2Single_into (const index_t patch, const index_t global_BF, const gsMatrix< T > &u, gsMatrix< T > &result) const |
gsMatrix< T > | evalSingle (const index_t patch, const index_t global_BF, const gsMatrix< T > &u) const |
Evaluate a single basis function i at points u. | |
gsMatrix< T > | derivSingle (const index_t patch, const index_t global_BF, const gsMatrix< T > &u) const |
Evaluate a single basis function i derivative at points u. | |
gsMatrix< T > | deriv2Single (const index_t patch, const index_t global_BF, const gsMatrix< T > &u) const |
Evaluate the second derivative of a single basis function i at points u. | |
void | evalAllDersSingle_into (const index_t patch, const index_t global_BF, const gsMatrix< T > &u, const index_t n, gsMatrix< T > &result) const |
Evaluate the basis function global_BF at patch and its derivatives up to order n at points u into result. | |
Static Public Attributes | |
static const short_t | Dim |
Dimension of the parameter domain. | |
Protected Member Functions | |
bool | _check () const |
Checks the gsMappedBasis for consistency. | |
index_t | _getFirstLocalIndex (index_t const patch) const |
index_t | _getLastLocalIndex (index_t const patch) const |
index_t | _getLocalIndex (index_t const patch, index_t const patchIndex) const |
index_t | _getPatch (index_t const localIndex) const |
index_t | _getPatchIndex (const index_t localIndex) const |
void | _initVertices () |
initializes the m_vertices field | |
void | _setDistanceOfAllVertices () |
initializes the m_distances field | |
void | _setMapping () |
create a new mapping of the local basisfunctions | |
T | findParameter (patchSide const &ps, patchCorner const &pc, unsigned nrBasisFuncs) const |
BasisType * | getBasePointer (index_t i) |
getter for m_bases[i] | |
Protected Attributes | |
std::vector< BasisType * > | m_bases |
Vector of local bases. | |
std::vector< distances > | m_distances |
vector of distances objects, that store C^0 distances from special vertices on the edges | |
short_t | m_incrSmoothnessDegree |
smoothness degree that is tried to achive over patch interfaces | |
gsWeightMapper< T > * | m_mapper |
Map between the local basis functions and the newly created ones. | |
unsigned | m_minDist |
minimal C^0 distance from special (extraordinary) vertices, specified in basisfunctions | |
std::vector< std::pair < patchSide, T > > | m_patchSideWeights |
vector storing the weights for interfaces | |
std::vector < gsMappedSingleBasis< d, T > > | m_sb |
Underlying bases per patch. | |
gsBoxTopology | m_topol |
Topology, specifying the relation (connections) between the patches. | |
std::vector< std::pair < patchCorner, bool > > | m_vertices |
vector storing all the inner vertices, with a flag if it is an Extraordinary vertex or an ordinary vertex. | |
Private Member Functions | |
bool | _checkTopologyWithBases () const |
Checks the gsMappedBasis for consistency. | |
void | repairPatches (std::vector< gsMatrix< T > * > &coefs, index_t startFromPatch=-1) |
gets the local index of the first basis function of the patch with the given number.
[in] | patch | : the number of the patch |
gets the local index of the last basis function of the patch with the given number.
[in] | patch | : the number of the patch |
|
inlineprotectedinherited |
gets the local index of the basis function of the patch with the given number.
[in] | patch | : the number of the patch |
[in] | patchIndex | : the index of the basis function on the patch |
gets the number of the patch, where the local basis function with the given index is on.
[in] | localIndex | : the accumulated index of the basis function |
gets the patchIndex of the basis function specified by its localIndex. This is the index of this basis function in the basis of this patch.
[in] | localIndex | : the accumulated index of the basis function |
Returns the indices of active (nonzero) functions at points u, as a list of indices.
|
inherited |
Returns the indices of active (non-zero) basis functions of patch at points u, as a list of indices, in result.
[in] | u | gsMatrix containing evaluation points. Each column represents one evaluation point. |
[out] | result | For every column i of u, a column containing the indices of the active basis functions at evaluation point u.col(i). |
gets all indices of global basis functions on the boundary upto a given offset
|
virtualinherited |
Computes function data.
This function evaluates the functions and their derivatives at the points in and writes them in the corresponding fields of out. Which field to write (and what to compute) is controlled by the out.flags (see also gsFuncData).
The input points in are expected to be compatible with the implementation/representation of the function, i.e. they should be points inside the domain of definitition of the function
[in] | in | |
[out] | out |
Reimplemented in gsGeometry< T >, and gsConstantFunction< T >.
|
inherited |
degree elevates all the bases preserving smoothness
[in] | amount | : the amount of elevation the bases will go through |
[in] | updateBasis | : if true, a new mapping will be constructed for the new basis functions, only set to false if one wants to apply more changes to the bases before calculating a new mapping |
degree elevates all the bases preserving multiplicity
[in] | amount | : the amount of elevation the bases will go through |
[in] | updateBasis | : if true, a new mapping will be constructed for the new basis functions, only set to false if one wants to apply more changes to the bases before calculating a new mapping |
Evaluate the derivatives,.
Evaluates the second derivatives of active (i.e., non-zero) functions at points u.
See documentation for deriv2_into() (the one without input parameter coefs) for details.
[in] | u | Evaluation points in columns. |
|
inlineinherited |
Clone function. Used to make a copy of a derived basis.
Prints the object as a string with extended details.
Evaluate the function,.
|
inherited |
Evaluates nonzero basis functions of patch at point u into result.
Let...
d denote the dimension of the parameter domain.
k denote the number of active (i.e., non-zero) basis functions (see active_into()). n denote the number of evaluation points.
The n evaluation points u are given in a gsMatrix of size d x n. Each column of u represents one evaluation point.
The gsMatrix result contains the computed function values in the following form:
Column j of result corresponds to one evaluation point (specified by the j-th column of u). The column contains the values of all active functions "above" each other.
For example, for scalar basis functions Bi : (x,y,z)-> R, a colum represents
(B1, B2, ... , Bn)^T,
where the order the basis functions Bi is as returned by active() and active_into().
|
inherited |
Evaluate all derivatives upto order n,.
|
inherited |
exports the patch i of this geometry (with coefs) to a Geometry object of the underlying basis. The ownership of this Geometry will go to the caller of this function.
[in] | localCoef | : the coefficients to the local basis functions |
|
inherited |
exports this geometry (with coefs) to a gsMultiPatch object.
[in] | localCoef | : the coefficients to the local basis functions |
|
protectedvirtual |
finds the parametric c^0 distance of the edge ps starting from corner pc if the number of c^0 basis functions is given in nrBasisFuncs
Implements gsMPBESBasis< d, T >.
|
inlineinherited |
gives back the gsMappedSingleBasis object set to the patch i, which ressembles the composite basis on one patch
|
inherited |
|
inlineinherited |
converts the global coefficients to the local ones
[in] | globalCoefs | : the coefficients to the global basis functions |
[out] | localCoefs | : the coefficients to the local basis functions |
gets all indices of global basis functions on the inner boundary upto a given offset
|
inlineinherited |
converts the local coefficients to the global ones
[in] | localCoefs | : the coefficients to the local basis functions |
[out] | globalCoefs | : the coefficients to the global basis functions |
inserts the given boxes in the specified patch. The concrete implementation is left to the implementing classes of this abstract parent class.
[in] | patch | : the patch number we look at |
[in] | boxes | : the boxes to be inserted |
[in] | updateBasis | : if true, a new mapping will be constructed for the new basis functions, only set to false if one wants to insert more boxes |
Implements gsMPBESBasis< d, T >.
|
virtual |
inserts the given boxes in the specified patch, while also updating the given coefficients. The concrete implementation is left to the implementing classes of this abstract parent class.
[in,out] | localCoefs | : the coefficients to the local basis functions |
[in] | patch | : the patch number we look at |
[in] | boxes | : the boxes to be inserted |
[in] | updateBasis | : if true, a new mapping will be constructed for the new basis functions, only set to false if one wants to insert more boxes |
Implements gsMPBESBasis< d, T >.
|
virtual |
inserts the given boxes in the specified patch. The concrete implementation is left to the implementing classes of this abstract parent class.
[in] | patch | : the patch number we look at |
[in] | boxes | : the boxes to be inserted |
[in] | updateBasis | : if true, a new mapping will be constructed for the new basis functions, only set to false if one wants to insert more boxes |
Implements gsMPBESBasis< d, T >.
|
virtual |
inserts the given boxes in the specified patch, while also updating the given coefficients. The concrete implementation is left to the implementing classes of this abstract parent class.
[in,out] | localCoefs | : the coefficients to the local basis functions |
[in] | patch | : the patch number we look at |
[in] | boxes | : the boxes to be inserted |
[in] | updateBasis | : if true, a new mapping will be constructed for the new basis functions, only set to false if one wants to insert more boxes |
Implements gsMPBESBasis< d, T >.
|
privatevirtual |
Adjusts the patches to match each other at the interfaces by knot insertion (will be called automatically by refinement functions)
Implements gsMPBESBasis< d, T >.
|
inherited |
Adjusts the patches to match each other at the interfaces by knot insertion (will be called automatically by refinement functions)
|
inherited |
sets a patchCorner to be a special vertex, which means edges connected to this corner will have a c^0 continuity
|
inherited |
Returns the approximate number of (global) basis functions in the patch with given index all the sizes summed up should give the total number of (global) basis functions the default argument -1 will give the total number of basis functions for all patches
|
inherited |
smooths a given edge connected to the corner back to the the minimal amount of C^0 continuity, specified by m_minDist.
[in] | pc | : patchCorner, specifying the corner which should be smoothed |
[in] | ps | : patchSide, specifying the edge, connected to the corner, which should be smoothed along |
[in] | updateBasis | : if true, a new mapping will be constructed for the new basis functions, only set to false if one wants to insert more boxes |
|
inherited |
smooths all edges back to the the minimal amount of C^0 continuity, specified by m_minDist.
|
inlinevirtualinherited |
Dimension of the target space.
Reimplemented in gsPatchIdField< T >, gsGeometry< T >, gsParamField< T >, gsNormalField< T >, gsMultiBasis< T >, gsMultiBasis< real_t >, gsMultiPatch< T >, gsMultiPatch< real_t >, gsFsiLoad< T >, gsMaterialMatrixEvalSingle< T, out >, gsMaterialMatrixIntegrateSingle< T, out >, gsFunctionExpr< T >, gsJacDetField< T >, gsDetFunction< T >, gsConstantFunction< T >, gsShellStressFunction< T >, gsGradientField< T >, gsPiecewiseFunction< T >, gsSquaredDistance< T >, gsAffineFunction< T >, gsPreCICEFunction< T >, gsMappedSingleSpline< d, T >, gsBasisFun< T >, gsAbsError< T >, gsGeometrySlice< T >, gsGeometryTransform< T >, gsFuncCoordinate< T >, and gsCauchyStressFunction< T >.
makes a uniform refinement of all the bases, with a defined number of new knots inserted in every knot span.
[in] | numKnots | : the amount of knots which are inserted in every knot span |
[in] | updateBasis | : if true, a new mapping will be constructed for the new basis functions, only set to false if one wants to insert more boxes |
|
inherited |
makes a uniform refinement of all the bases, with a defined number of new knots inserted in every knot span.
[in,out] | localCoefs | : the coefficients to the local basis functions |
[in] | numKnots | : the amount of knots which are inserted in every knot span |
[in] | updateBasis | : if true, a new mapping will be constructed for the new basis functions, only set to false if one wants to insert more boxes |