|
IFEM
90A354
|
Class for LR spline-based finite element scalar fields in 2D. More...
#include <LRSplineField2D.h>


Public Member Functions | |
| LRSplineField2D (const ASMu2D *patch, const RealArray &v, char basis=1, char cmp=1, const char *name=nullptr) | |
| The constructor sets the number of space dimensions and fields. More... | |
| LRSplineField2D (const LR::LRSplineSurface *srf, const RealArray &v, bool is_rational, const char *name=nullptr) | |
| Construct directly from surface. More... | |
| virtual | ~LRSplineField2D () |
| Empty destructor. | |
| virtual double | valueNode (size_t node) const |
| Computes the value in a given node/control point. More... | |
| virtual double | valueFE (const ItgPoint &x) const |
| Computes the value at a given local coordinate. More... | |
| virtual double | valueCoor (const Vec4 &x) const |
| Computes the value at a given global coordinate. More... | |
| virtual bool | gradFE (const ItgPoint &x, Vector &grad) const |
| Computes the gradient for a given local coordinate. More... | |
| virtual bool | hessianFE (const ItgPoint &x, Matrix &H) const |
| Computes the hessian for a given local coordinate. More... | |
Public Member Functions inherited from FieldBase | |
| virtual | ~FieldBase () |
| Empty destructor. | |
| size_t | getNoElm () const |
| Returns the number of elements. | |
| size_t | getNoNodes () const |
| Returns the number of nodal/control points. | |
Public Member Functions inherited from Field | |
| virtual | ~Field () |
| Empty destructor. | |
| const char * | getFieldName () const |
| Returns the name of field. | |
| virtual bool | valueGrid (RealArray &val, const int *npe) const |
| Computes the value at a grid of visualization points. More... | |
| virtual bool | gradCoor (const Vec4 &x, Vector &grad) const |
| Computes the gradient for a given global/physical coordinate. More... | |
Protected Attributes | |
| const LR::LRSplineSurface * | basis |
| Spline basis description. | |
| const LR::LRSplineSurface * | surf |
| Spline geometry description. | |
| bool | is_rational |
| Whether or not surfaces are rational. | |
Protected Attributes inherited from FieldBase | |
| size_t | nelm |
| Number of elements/knot-spans. | |
| size_t | nno |
| Number of nodes/control points. | |
| Vector | values |
| Nodal field values. | |
Protected Attributes inherited from Field | |
| std::string | fname |
| Name of the field. | |
Additional Inherited Members | |
Static Public Member Functions inherited from Field | |
| static Field * | create (const ASMbase *pch, const RealArray &v, char basis=1, char cmp=1, const char *name=nullptr) |
| Creates a dynamically allocated field object. More... | |
Protected Member Functions inherited from FieldBase | |
| FieldBase (const char *name=nullptr) | |
| The constructor sets the field name. More... | |
Protected Member Functions inherited from Field | |
| Field (const char *name=nullptr) | |
| The constructor sets the field name. More... | |
Class for LR spline-based finite element scalar fields in 2D.
This class implements the methods required to evaluate a 2D LR spline scalar field at a given point in parametrical or physical coordinates.
| LRSplineField2D::LRSplineField2D | ( | const ASMu2D * | patch, |
| const RealArray & | v, | ||
| char | basis = 1, |
||
| char | cmp = 1, |
||
| const char * | name = nullptr |
||
| ) |
The constructor sets the number of space dimensions and fields.
| [in] | patch | The spline patch on which the field is to be defined |
| [in] | v | Array of control point field values |
| [in] | basis | Basis to use from patch |
| [in] | cmp | Component to use from source field. Pass 0 to use vector as-is. |
| [in] | name | Name of spline field |
References basis, utl::vector< T >::begin(), ASMbase::getNoFields(), ASMu2D::getNoNodes(), FieldBase::nelm, FieldBase::nno, utl::vector< T >::resize(), and FieldBase::values.
| LRSplineField2D::LRSplineField2D | ( | const LR::LRSplineSurface * | srf, |
| const RealArray & | v, | ||
| bool | is_rational, | ||
| const char * | name = nullptr |
||
| ) |
Construct directly from surface.
| [in] | srf | The spline surface to use |
| [in] | v | Array of control point field values |
| is_rational | True if surface is rational | |
| [in] | name | Name of spline field |
References FieldBase::values.
Computes the gradient for a given local coordinate.
| [in] | x | Local coordinate of evaluation point |
| [out] | grad | Gradient of solution in a given local coordinate |
Implements Field.
References basis, LRSplineField::evalBasis(), LRSplineField::evalMapping(), is_rational, utl::matrix< T >::multiply(), utl::vector< T >::push_back(), utl::vector< T >::reserve(), surf, and FieldBase::values.
Computes the hessian for a given local coordinate.
| [in] | x | Local coordinate of evaluation point |
| [out] | H | Hessian of solution in a given local coordinate |
Reimplemented from Field.
References basis, LRSplineField::evalBasis(), LRSplineField::evalMapping(), is_rational, utl::matrix3d< T >::multiply(), utl::matrix< T >::resize(), surf, and FieldBase::values.
|
virtual |
|
virtual |
Computes the value at a given local coordinate.
| [in] | x | Local coordinate of evaluation point |
Implements Field.
References basis, ASMu2D::computeBasisNurbs(), utl::vector< T >::dot(), is_rational, utl::vector< T >::push_back(), utl::vector< T >::reserve(), ItgPoint::u, ItgPoint::v, and FieldBase::values.
Referenced by valueCoor().
|
virtual |
Computes the value in a given node/control point.
| [in] | node | Node number |
Implements Field.
References FieldBase::nno, and FieldBase::values.