IFEM  90A354
LagrangeFields2D.h
Go to the documentation of this file.
1 // $Id$
2 //==============================================================================
12 //==============================================================================
13 
14 #ifndef _LAGRANGE_FIELDS_2D_H
15 #define _LAGRANGE_FIELDS_2D_H
16 
17 #include "Fields.h"
18 
19 class ASMs2DLag;
20 
21 
29 class LagrangeFields2D : public Fields
30 {
31 public:
37  LagrangeFields2D(const ASMs2DLag* patch, const RealArray& v,
38  char basis = 1, const char* name = nullptr);
40  virtual ~LagrangeFields2D() {}
41 
42  // Methods to evaluate the field
43  //==============================
44 
48  bool valueNode(size_t node, Vector& vals) const;
49 
53  bool valueFE(const ItgPoint& x, Vector& vals) const;
54 
58  bool gradFE(const ItgPoint& x, Matrix& grad) const;
59 
60 protected:
61  using IntMat = std::vector<std::vector<int>>;
64  int p1;
65  int p2;
66 };
67 
68 #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 structured 2D Lagrange FE models.
Definition: ASMs2DLag.h:27
Base class for vector fields.
Definition: Fields.h:35
Class representing an integration point.
Definition: ItgPoint.h:25
Class for Lagrange-based finite element vector fields in 2D.
Definition: LagrangeFields2D.h:30
IntMat mnpc
Matrix of element nodes.
Definition: LagrangeFields2D.h:63
int p2
Element order in second parameter direction.
Definition: LagrangeFields2D.h:65
std::vector< std::vector< int > > IntMat
Convenience type.
Definition: LagrangeFields2D.h:61
bool gradFE(const ItgPoint &x, Matrix &grad) const
Computes the gradient for a given local coordinate.
Definition: LagrangeFields2D.C:76
LagrangeFields2D(const ASMs2DLag *patch, const RealArray &v, char basis=1, const char *name=nullptr)
The constructor sets the number of space dimensions and fields.
Definition: LagrangeFields2D.C:21
bool valueNode(size_t node, Vector &vals) const
Computes the value in a given node/control point.
Definition: LagrangeFields2D.C:40
bool valueFE(const ItgPoint &x, Vector &vals) const
Computes the value at a given local coordinate.
Definition: LagrangeFields2D.C:51
virtual ~LagrangeFields2D()
Empty destructor.
Definition: LagrangeFields2D.h:40
Matrix coord
Matrix of nodal coordinates.
Definition: LagrangeFields2D.h:62
int p1
Element order in first parameter direction.
Definition: LagrangeFields2D.h:64
A vector class with some added algebraic operations.
Definition: matrix.h:64