IFEM 90A354
LagrangeField2D.h
Go to the documentation of this file.
1// $Id$
2//==============================================================================
12//==============================================================================
13
14#ifndef _LAGRANGE_FIELD_2D_H
15#define _LAGRANGE_FIELD_2D_H
16
17#include "FieldBase.h"
18
19class ASMs2DLag;
20
21
30{
31public:
38 LagrangeField2D(const ASMs2DLag* patch, const RealArray& v,
39 char basis = 1, char cmp = 1, const char* name = nullptr);
41 virtual ~LagrangeField2D() {}
42
43 // Methods to evaluate the field
44 //==============================
45
48 double valueNode(size_t node) const override;
49
52 double valueFE(const ItgPoint& x) const override;
53
57 bool gradFE(const ItgPoint& x, Vector& grad) const override;
58
59protected:
61 using IntMat = std::vector<std::vector<int>>;
63 int p1;
64 int p2;
65};
66
67#endif
Base class for scalar fields.
std::vector< Real > RealArray
A real-valued array without algebraic operations.
Definition ImmersedBoundaries.h:32
Driver for assembly of structured 2D Lagrange FE models.
Definition ASMs2DLag.h:27
Base class for scalar fields.
Definition FieldBase.h:30
Class representing an integration point.
Definition ItgPoint.h:25
Class for Lagrange-based finite element scalar fields in 2D.
Definition LagrangeField2D.h:30
double valueFE(const ItgPoint &x) const override
Computes the value at a given local coordinate.
Definition LagrangeField2D.C:56
std::vector< std::vector< int > > IntMat
Convenience type.
Definition LagrangeField2D.h:61
double valueNode(size_t node) const override
Computes the value in a given node/control point.
Definition LagrangeField2D.C:50
bool gradFE(const ItgPoint &x, Vector &grad) const override
Computes the gradient for a given local coordinate.
Definition LagrangeField2D.C:76
int p2
Element order in second parameter direction.
Definition LagrangeField2D.h:64
virtual ~LagrangeField2D()
Empty destructor.
Definition LagrangeField2D.h:41
int p1
Element order in first parameter direction.
Definition LagrangeField2D.h:63
IntMat mnpc
Matrix of element nodes.
Definition LagrangeField2D.h:62
Matrix coord
Matrix of nodal coordinates.
Definition LagrangeField2D.h:60
A vector class with some added algebraic operations.
Definition matrix.h:64