IFEM  90A354
LRSplineFields2D.h
Go to the documentation of this file.
1 // $Id$
2 //==============================================================================
12 //==============================================================================
13 
14 #ifndef _LRSPLINE_FIELDS_2D_H
15 #define _LRSPLINE_FIELDS_2D_H
16 
17 #include "Fields.h"
18 
19 class ASMu2D;
20 
21 namespace LR {
22  class Element;
23  class LRSplineSurface;
24 }
25 
26 
34 class LRSplineFields2D : public Fields
35 {
36 public:
43  LRSplineFields2D(const ASMu2D* patch, const RealArray& v,
44  char basis = 1, int nf = 0, const char* name = nullptr);
45 
52  LRSplineFields2D(const LR::LRSplineSurface* srf, const RealArray& v,
53  int ncmp, bool rational,
54  const char* name = nullptr);
55 
57  virtual ~LRSplineFields2D() {}
58 
59  // Methods to evaluate the field
60  //==============================
61 
65  bool valueNode(size_t node, Vector& vals) const;
66 
70  bool valueFE(const ItgPoint& x, Vector& vals) const;
71 
75  bool valueCoor(const Vec4& x, Vector& vals) const;
76 
80  bool gradFE(const ItgPoint& x, Matrix& grad) const;
81 
85  virtual bool hessianFE(const ItgPoint& x, Matrix3D& H) const;
86 
87 protected:
88  const LR::LRSplineSurface* basis;
89  const LR::LRSplineSurface* surf;
90 
91  bool is_rational;
92 };
93 
94 #endif
Base class for vector fields.
std::vector< Real > RealArray
A real-valued array without algebraic operations.
Definition: ImmersedBoundaries.h:29
Driver for assembly of unstructured 2D spline FE models.
Definition: ASMu2D.h:50
Base class for vector fields.
Definition: Fields.h:35
unsigned char nf
Number of field components.
Definition: Fields.h:101
Class representing an integration point.
Definition: ItgPoint.h:25
Class for LR spline-based finite element vector fields in 2D.
Definition: LRSplineFields2D.h:35
bool valueCoor(const Vec4 &x, Vector &vals) const
Computes the value at a given global coordinate.
Definition: LRSplineFields2D.C:107
bool gradFE(const ItgPoint &x, Matrix &grad) const
Computes the gradient for a given local coordinate.
Definition: LRSplineFields2D.C:116
virtual bool hessianFE(const ItgPoint &x, Matrix3D &H) const
Computes the hessian for a given local coordinate.
Definition: LRSplineFields2D.C:145
const LR::LRSplineSurface * surf
Spline geometry description.
Definition: LRSplineFields2D.h:89
bool valueNode(size_t node, Vector &vals) const
Computes the value in a given node/control point.
Definition: LRSplineFields2D.C:68
bool valueFE(const ItgPoint &x, Vector &vals) const
Computes the value at a given local coordinate.
Definition: LRSplineFields2D.C:78
LRSplineFields2D(const ASMu2D *patch, const RealArray &v, char basis=1, int nf=0, const char *name=nullptr)
The constructor sets the number of space dimensions and fields.
Definition: LRSplineFields2D.C:24
bool is_rational
Whether or not surfaces are rational.
Definition: LRSplineFields2D.h:91
const LR::LRSplineSurface * basis
Spline basis description.
Definition: LRSplineFields2D.h:88
virtual ~LRSplineFields2D()
Empty destructor.
Definition: LRSplineFields2D.h:57
Simple class for representing a point in 3D space and time.
Definition: Vec3.h:209
A vector class with some added algebraic operations.
Definition: matrix.h:64
Utilities for LR-splines.
Definition: AdaptiveSetup.h:22