G+Smo
24.08.0
Geometry + Simulation Modules
|
A scalar of vector field defined on a m_parametric geometry.
A gsField is, generally speaking, some mathematical function that is defined on a domain of interest (the name "field" is motivated by, e.g., "scalar field" or "vector field").
The gsField combines the following:
Note that the geometry representation of a single patch can be extracted by calling the member function gsField::patch.
The "local field" on a single patch can be extracted by calling gsField::function.
Public Member Functions | |
const gsMatrix< T > & | coefficientVector (int i=0) const |
Returns the coefficient vector (if it exists) corresponding to the function field for patch i. More... | |
short_t | dim () const |
Returns the dimension of the physical domain (e.g., if the domain is a surface in three-dimensional space, it returns 3). | |
T | distanceDG (gsFunctionSet< T > const &func, bool isFunc_param=false, int=1000) const |
T | distanceH1 (gsFunctionSet< T > const &func, bool isFunc_param=false, int=1000) const |
T | distanceH1 (gsFunctionSet< T > const &func, gsMultiBasis< T > const &B, bool isFunc_param=false, int=1000) const |
T | distanceH2 (gsFunctionSet< T > const &func, bool isFunc_param=false) const |
T | distanceL2 (gsField< T > const &field, int numEvals=1000) const |
Computes the L2-distance between the two fields, on the physical domain. | |
T | distanceL2 (gsFunctionSet< T > const &func, bool isFunc_param=false, int numEvals=1000) const |
Computes the L2-distance between the field and a function func on the physical domain. | |
T | distanceL2 (gsFunctionSet< T > const &func, gsMultiBasis< T > const &B, bool isFunc_param=false, int numEvals=1000) const |
const gsFunctionSet< T > & | fields () const |
Returns the fields (defined per patch) | |
const gsFunction< T > & | function (int i=0) const |
Returns the gsFunction of patch i. | |
short_t | geoDim () const |
Returns the dimension of the physical domain (e.g., if the domain is a surface in three-dimensional space, it returns 3). | |
const gsGeometry< T > & | igaFunction (int i=0) const |
Attempts to return an Isogeometric function for patch i. | |
bool | isParametric () const |
bool | isParametrized () const |
GISMO_DEPRECATED index_t | nPatches () const |
Returns the number of patches. | |
int | nPieces () const |
Returns the number of pieces. | |
short_t | parDim () const |
Returns the dimension of the parameter domain (e.g., if the domain is a surface in three-dimensional space, it returns 2). | |
const gsGeometry< T > & | patch (int i=0) const |
Returns the gsGeometry of patch i. | |
const gsMultiPatch< T > & | patches () const |
Returns gsMultiPatch containing the geometric information on the domain. | |
gsMatrix< T > | point (const gsMatrix< T > &u, int i=0) const |
Maps points u from the parameter domain to the physical domain. More... | |
std::ostream & | print (std::ostream &os) const |
Prints the object as a string. | |
gsMatrix< T > | value (const gsMatrix< T > &u, int i=0) const |
Evaluation of the field at points u. More... | |
Private Attributes | |
gsFunctionSet< T >::Ptr | m_fields |
Vector containing "local fields" for each patch/subdomain. More... | |
bool | m_parametric |
True iff this is an isogeometric field. More... | |
const gsFunctionSet< T > * | m_patches |
The isogeometric field is defined on this multipatch domain. | |
|
inline |
Returns the coefficient vector (if it exists) corresponding to the function field for patch i.
Returns the coefficients of the field corresponding to the i-th patch. This is only possible in the case when the field is defined in terms of basis functions (ie. it derives from gsGeometry).
T distanceDG | ( | gsFunctionSet< T > const & | func, |
bool | isFunc_param = false , |
||
int | = 1000 |
||
) | const |
Computes the DG-distance between the field and a function func on the physical domain
T distanceH1 | ( | gsFunctionSet< T > const & | func, |
bool | isFunc_param = false , |
||
int | = 1000 |
||
) | const |
Computes the H1-seminorm of the diff. between the field and a function func on the physical domain
T distanceH1 | ( | gsFunctionSet< T > const & | func, |
gsMultiBasis< T > const & | B, | ||
bool | isFunc_param = false , |
||
int | = 1000 |
||
) | const |
Computes the H1-seminorm of the diff. between the field and a function func on the physical domain, using mesh from B
T distanceH2 | ( | gsFunctionSet< T > const & | func, |
bool | isFunc_param = false |
||
) | const |
Computes the H2-seminorm of the diff. between the field and a function func on the physical domain, using mesh from B
T distanceL2 | ( | gsFunctionSet< T > const & | func, |
gsMultiBasis< T > const & | B, | ||
bool | isFunc_param = false , |
||
int | numEvals = 1000 |
||
) | const |
Computes the L2-distance between the field and a function func on the physical domain, using mesh from B
|
inline |
True if the field function is defined on parametric coordinates (i.e. the same coordinate system as the patches)
|
inline |
True if the field function is parametrized by a set of basis functions in parametric coordinates (i.e. the same coordinate system as the patches)
Maps points u from the parameter domain to the physical domain.
[in] | u | Evaluation points as gsMatrix of size d x n. d denotes the dimension of the parameter domain (i.e., d = parDim()). n denotes the number of evaluation points. Each column of u corresponds to one evaluation point. |
[in] | i | Index of the considered patch/subdomain. |
Evaluation of the field at points u.
[in] | u | Evaluation points as gsMatrix of size d x n. d denotes the dimension of the parameter domain (i.e., d = parDim()). n denotes the number of evaluation points. Each column of u corresponds to one evaluation point. |
[in] | i | Index of the considered patch/subdomain. |
|
private |
Vector containing "local fields" for each patch/subdomain.
For each patch/subdomain, the "local field" is represented by a gsFunction. This local field can be accessed with gsField::function.
|
private |
True iff this is an isogeometric field.
If m_parametric is true, the evaluation points for calling gsField::value have to be placed in the parameter domain.
If m_parametric is false, then the evaluation points are in the physical domain. This applies to, e.g., given exact solutions which are defined on the physical domain.