G+Smo  25.01.0
Geometry + Simulation Modules
 
Loading...
Searching...
No Matches
gsL2Projection< T > Struct Template Reference

Detailed Description

template<class T>
struct gismo::gsL2Projection< T >

Class that performs an L2 projection.

Template Parameters
Tcoefficient type

Static Public Member Functions

static T project (const gsBasis< T > &projectionBasis, const gsBasis< T > &integrationBasis, const gsGeometry< T > &geometryMap, const gsFunction< T > &sourceFunction, gsMatrix< T > &coefs, const gsOptionList &options=gsOptionList())
 Project a function onto a basis.
 
static T project (const gsBasis< T > &projectionBasis, const gsBasis< T > &integrationBasis, const gsGeometry< T > &geometryMap, gsMatrix< T > &coefs, const gsOptionList &options=gsOptionList())
 Project a geometry onto a basis (single patch)
 
static T project (const gsBasis< T > &projectionBasis, const gsGeometry< T > &geometryMap, const gsFunction< T > &sourceFunction, gsMatrix< T > &coefs, const gsOptionList &options=gsOptionList())
 Project a function onto a basis.
 
static T project (const gsBasis< T > &projectionBasis, const gsGeometry< T > &geometryMap, gsMatrix< T > &coefs, const gsOptionList &options=gsOptionList())
 Project a geometry onto a basis (single patch)
 
static T project (const gsFunctionSet< T > &projectionBasis, const gsMultiBasis< T > &integrationBasis, const gsMultiPatch< T > &geometryMap, const gsFunctionSet< T > &sourceFunction, gsMatrix< T > &coefs, const gsOptionList &options=gsOptionList())
 Project a function onto a basis.
 
static T project (const gsMultiBasis< T > &integrationBasis, const gsFunctionSet< T > &projectionBasis, const gsMultiPatch< T > &geometryMap, gsMatrix< T > &coefs, const gsOptionList &options=gsOptionList())
 Project a geometry onto a basis (multi-patch)
 
static T project (const gsMultiBasis< T > &projectionBasis, const gsMultiPatch< T > &geometryMap, const gsFunctionSet< T > &sourceFunction, gsMatrix< T > &coefs, const gsOptionList &options=gsOptionList())
 Project a function onto a basis.
 
static T project (const gsMultiBasis< T > &projectionBasis, const gsMultiPatch< T > &geometryMap, gsMatrix< T > &coefs, const gsOptionList &options=gsOptionList())
 Project a geometry onto a basis (multi-patch)
 
static GISMO_DEPRECATED T projectFunction (const gsMultiBasis< T > &basis, const gsFunctionSet< T > &source, const gsMultiPatch< T > &geometry, gsMatrix< T > &result)
 Projects a function on a basis.
 
static GISMO_DEPRECATED T projectFunction (const gsMultiBasis< T > &basis, const gsFunctionSet< T > &source, const gsMultiPatch< T > &geometry, gsMultiPatch< T > &result)
 Projects a function on a basis.
 
static GISMO_DEPRECATED T projectFunction (const gsMultiBasis< T > &intbasis, const gsMappedBasis< 2, T > &basis, const gsFunctionSet< T > &source, const gsMultiPatch< T > &geometry, gsMatrix< T > &result)
 Projects a function on a basis.
 
static GISMO_DEPRECATED T projectGeometry (const gsBasis< T > &basis, const gsGeometry< T > &geometry, gsMatrix< T > &result)
 Projects a source geometry onto basis and returns it in result.
 
static GISMO_DEPRECATED T projectGeometry (const gsMultiBasis< T > &basis, const gsFunctionSet< T > &geometry, gsMatrix< T > &result)
 Projects a source geometry onto basis and returns it in result.
 
static GISMO_DEPRECATED T projectGeometry (const gsMultiBasis< T > &basis, const gsFunctionSet< T > &geometry, gsMultiPatch< T > &result)
 Projects a source geometry onto basis and returns it in result.
 
static GISMO_DEPRECATED T projectGeometry (const gsMultiBasis< T > &intbasis, const gsMappedBasis< 2, T > &basis, const gsFunctionSet< T > &geometry, gsMatrix< T > &result)
 Projects a source geometry onto basis and returns it in result.
 
static GISMO_DEPRECATED T projectGeometryBoundaries (const gsMultiBasis< T > &basis, const gsMultiPatch< T > &geometry, gsMultiPatch< T > &result)
 Projects a source geometry onto basis and returns it in result. Fixes the boundaries.
 
static GISMO_DEPRECATED T projectGeometryPenalty (const gsMultiBasis< T > &basis, const gsMultiPatch< T > &geometry, gsMultiPatch< T > &result, T penalty=1e3)
 Projects a source geometry onto basis and returns it in result. Penalizes interfaces and boundaries.
 

Static Protected Member Functions

static T _project (const gsMultiBasis< T > &integrationBasis, const gsFunctionSet< T > &projectionBasis, const gsFunctionSet< T > &geometryMap, const gsFunctionSet< T > &sourceFunction, gsMatrix< T > &coefs, const gsOptionList &options)
 Projects a source function onto a projection basis using a geometry map.
 

Member Function Documentation

◆ _project()

template<typename T >
T _project ( const gsMultiBasis< T > &  integrationBasis,
const gsFunctionSet< T > &  projectionBasis,
const gsFunctionSet< T > &  geometryMap,
const gsFunctionSet< T > &  sourceFunction,
gsMatrix< T > &  coefs,
const gsOptionList options 
)
staticprotected

Projects a source function onto a projection basis using a geometry map.

This function computes the coefficients of the projection of a given source function onto a projection basis. The projection is performed using a geometry map, which maps the integration domain to the physical domain.

Parameters
integrationBasisThe basis used for numerical integration.
projectionBasisThe basis functions used for the projection.
geometryMapThe geometry map that maps the integration domain to the physical domain.
sourceFunctionThe source function to be projected.
coefsThe output matrix that stores the computed coefficients of the projection.
optionsThe options that control the projection process.
Returns
the projection error.

◆ project() [1/8]

template<class T >
static T project ( const gsBasis< T > &  projectionBasis,
const gsBasis< T > &  integrationBasis,
const gsGeometry< T > &  geometryMap,
const gsFunction< T > &  sourceFunction,
gsMatrix< T > &  coefs,
const gsOptionList options = gsOptionList() 
)
inlinestatic

Project a function onto a basis.

Parameters
[in]projectionBasisThe basis to project on
[in]integrationBasisThe basis used for numerical integration.
[in]geometryMapThe geometry
[in]sourceFunctionThe source function
coefsThe coefficients of the new geometry on projectionBasis
Returns
The L2 error of the projection

◆ project() [2/8]

template<class T >
static T project ( const gsBasis< T > &  projectionBasis,
const gsBasis< T > &  integrationBasis,
const gsGeometry< T > &  geometryMap,
gsMatrix< T > &  coefs,
const gsOptionList options = gsOptionList() 
)
inlinestatic

Project a geometry onto a basis (single patch)

Parameters
[in]projectionBasisThe basis to project on
[in]integrationBasisThe basis used for numerical integration.
[in]geometryMapThe geometry
coefsThe coefficients of the new geometry on projectionBasis
Returns
The L2 error of the projection

◆ project() [3/8]

template<class T >
static T project ( const gsBasis< T > &  projectionBasis,
const gsGeometry< T > &  geometryMap,
const gsFunction< T > &  sourceFunction,
gsMatrix< T > &  coefs,
const gsOptionList options = gsOptionList() 
)
inlinestatic

Project a function onto a basis.

Parameters
[in]projectionBasisThe basis to project on
[in]geometryMapThe geometry
[in]sourceFunctionThe source function
coefsThe coefficients of the new geometry on projectionBasis
Returns
The L2 error of the projection

◆ project() [4/8]

template<class T >
static T project ( const gsBasis< T > &  projectionBasis,
const gsGeometry< T > &  geometryMap,
gsMatrix< T > &  coefs,
const gsOptionList options = gsOptionList() 
)
inlinestatic

Project a geometry onto a basis (single patch)

Parameters
[in]projectionBasisThe basis to project on
[in]geometryMapThe geometry
coefsThe coefficients of the new geometry on projectionBasis
Returns
The L2 error of the projection

◆ project() [5/8]

template<class T >
static T project ( const gsFunctionSet< T > &  projectionBasis,
const gsMultiBasis< T > &  integrationBasis,
const gsMultiPatch< T > &  geometryMap,
const gsFunctionSet< T > &  sourceFunction,
gsMatrix< T > &  coefs,
const gsOptionList options = gsOptionList() 
)
inlinestatic

Project a function onto a basis.

Parameters
[in]projectionBasisThe basis to project on
[in]integrationBasisThe basis used for numerical integration.
[in]geometryMapThe geometry
[in]sourceFunctionThe source function
coefsThe coefficients of the new geometry on projectionBasis
Returns
The L2 error of the projection

◆ project() [6/8]

template<class T >
static T project ( const gsMultiBasis< T > &  integrationBasis,
const gsFunctionSet< T > &  projectionBasis,
const gsMultiPatch< T > &  geometryMap,
gsMatrix< T > &  coefs,
const gsOptionList options = gsOptionList() 
)
inlinestatic

Project a geometry onto a basis (multi-patch)

Parameters
[in]projectionBasisThe basis to project on
[in]integrationBasisThe basis used for numerical integration.
[in]geometryMapThe geometry
coefsThe coefficients of the new geometry on projectionBasis
Returns
The L2 error of the projection

◆ project() [7/8]

template<class T >
static T project ( const gsMultiBasis< T > &  projectionBasis,
const gsMultiPatch< T > &  geometryMap,
const gsFunctionSet< T > &  sourceFunction,
gsMatrix< T > &  coefs,
const gsOptionList options = gsOptionList() 
)
inlinestatic

Project a function onto a basis.

Parameters
[in]projectionBasisThe basis to project on
[in]geometryMapThe geometry
[in]sourceFunctionThe source function
coefsThe coefficients of the new geometry on projectionBasis
Returns
The L2 error of the projection

◆ project() [8/8]

template<class T >
static T project ( const gsMultiBasis< T > &  projectionBasis,
const gsMultiPatch< T > &  geometryMap,
gsMatrix< T > &  coefs,
const gsOptionList options = gsOptionList() 
)
inlinestatic

Project a geometry onto a basis (multi-patch)

Parameters
[in]projectionBasisThe basis to project on
[in]geometryMapThe geometry
coefsThe coefficients of the new geometry on projectionBasis
Returns
The L2 error of the projection

◆ projectFunction() [1/3]

template<typename T >
T projectFunction ( const gsMultiBasis< T > &  basis,
const gsFunctionSet< T > &  source,
const gsMultiPatch< T > &  geometry,
gsMatrix< T > &  result 
)
static

Projects a function on a basis.

Parameters
[in]basisThe basis to project on
[in]sourceThe source function
[in]geometryThe geometry to evaluate the function on
resultThe coefficients of the function
Returns
The L2 error of the projection

◆ projectFunction() [2/3]

template<typename T >
T projectFunction ( const gsMultiBasis< T > &  basis,
const gsFunctionSet< T > &  source,
const gsMultiPatch< T > &  geometry,
gsMultiPatch< T > &  result 
)
static

Projects a function on a basis.

Parameters
[in]basisThe basis to project on
[in]sourceThe source function
[in]geometryThe geometry to evaluate the function on
resultThe function as a multipatch
Returns
The L2 error of the projection

◆ projectFunction() [3/3]

template<typename T >
T projectFunction ( const gsMultiBasis< T > &  intbasis,
const gsMappedBasis< 2, T > &  basis,
const gsFunctionSet< T > &  source,
const gsMultiPatch< T > &  geometry,
gsMatrix< T > &  result 
)
static

Projects a function on a basis.

Parameters
[in]intbasisThe basis used for quadrature
[in]basisThe basis to project on
[in]sourceThe source function
[in]geometryThe geometry to evaluate the function on
resultThe function as a multipatch
Returns
The L2 error of the projection

◆ projectGeometry() [1/4]

template<typename T >
T projectGeometry ( const gsBasis< T > &  basis,
const gsGeometry< T > &  geometry,
gsMatrix< T > &  result 
)
static

Projects a source geometry onto basis and returns it in result.

Parameters
[in]basisThe basis to project on
[in]geometryThe geometry
resultThe coefficients of the new geometry on basis
Returns
The L2 error of the projection

◆ projectGeometry() [2/4]

template<typename T >
T projectGeometry ( const gsMultiBasis< T > &  basis,
const gsFunctionSet< T > &  geometry,
gsMatrix< T > &  result 
)
static

Projects a source geometry onto basis and returns it in result.

Parameters
[in]basisThe basis to project on
[in]geometryThe geometry
resultThe coefficients of the new geometry on basis
Returns
The L2 error of the projection

◆ projectGeometry() [3/4]

template<typename T >
T projectGeometry ( const gsMultiBasis< T > &  basis,
const gsFunctionSet< T > &  geometry,
gsMultiPatch< T > &  result 
)
static

Projects a source geometry onto basis and returns it in result.

Parameters
[in]basisThe basis to project on
[in]geometryThe geometry
resultThe new geometry
Returns
The L2 error of the projection

◆ projectGeometry() [4/4]

template<typename T >
T projectGeometry ( const gsMultiBasis< T > &  intbasis,
const gsMappedBasis< 2, T > &  basis,
const gsFunctionSet< T > &  geometry,
gsMatrix< T > &  result 
)
static

Projects a source geometry onto basis and returns it in result.

Parameters
[in]intbasisThe basis used for quadrature
[in]basisThe mapped basis to project on
[in]geometryThe geometry
resultThe coefficients of the new geometry on basis
Returns
The L2 error of the projection

◆ projectGeometryBoundaries()

template<typename T >
T projectGeometryBoundaries ( const gsMultiBasis< T > &  basis,
const gsMultiPatch< T > &  geometry,
gsMultiPatch< T > &  result 
)
static

Projects a source geometry onto basis and returns it in result. Fixes the boundaries.

Parameters
[in]basisThe basis to project on
[in]geometryThe geometry
resultThe coefficients of the new geometry on basis
Returns
The L2 error of the projection

◆ projectGeometryPenalty()

template<typename T >
T projectGeometryPenalty ( const gsMultiBasis< T > &  basis,
const gsMultiPatch< T > &  geometry,
gsMultiPatch< T > &  result,
penalty = 1e3 
)
static

Projects a source geometry onto basis and returns it in result. Penalizes interfaces and boundaries.

Parameters
[in]basisThe basis to project on
[in]geometryThe geometry
resultThe coefficients of the new geometry on basis
[in]penaltyThe penalty factor
Returns
The L2 error of the projection