Toast++  1.0.2 (r.539)
Forward and inverse modelling in optical tomography
element.h
1 // -*-C++-*-
2 // ==========================================================================
3 // Module libfe
4 // File element.h
5 // Declaration of classes Element, Element2D, Element3D
6 //
7 // Inheritance:
8 // ------------
9 // Element ----> Element2D
10 // ----> Element3D
11 // ==========================================================================
12 
13 #ifndef __ELEMENT_H
14 #define __ELEMENT_H
15 
16 #define NCOEFFS 3 // number of coefficients
17 #define MUA 0 // absorption coeff id
18 #define P2 1 // `parameter 2' id
19 #define MUS 1 // alias for P2: scattering coeff
20 #define KAPPA 1 // alias for P2: diffusion coeff
21 #define REFIND 2 // refractive index id
22 #define C_ALL 3 // `all coefficients'
23 
30 #define ELID_NONE 0
31 #define ELID_TRI3OLD 1
32 #define ELID_RCT4 2
33 #define ELID_TET4 3
34 #define ELID_WDG6 4
35 #define ELID_VOX8 5
36 #define ELID_TRI6 6
37 #define ELID_TET10 7
38 #define ELID_TRI6_IP 8
39 #define ELID_TRI10 9
40 #define ELID_TRI10_IP 10
41 #define ELID_TET10_IP 11
42 #define ELID_WDG18INF 12
43 #define ELID_QUAD4 13
44 #define ELID_PIX4 14
45 #define ELID_TRI3 15
46 #define ELID_TRI3D3 16
47 #define ELID_TRI3D6 17
48 #define ELID_VOX27 18
49 #define ELID_LINE2D2 19
50 
51 
52 
58 #define ELCAPS_CURVED_BOUNDARY 0x1
60 #define ELCAPS_SUBSAMPLING 0x2
62 
63 
64 class Surface;
65 class Element;
66 class Mesh;
67 
69  int level; // subdivision level (>= 0)
70  Element *sibling; // sibling neighbour for dual splits
71  bool is_sibling0; // distinguish the two siblings
72 };
73 
74 // ==========================================================================
75 // class Element
76 // ==========================================================================
84 class FELIB Element {
85 
86  friend class ElementList;
87  friend class Mesh;
88 
89 public:
90 
94  Element ();
95 
99  Element (const Element& el);
100 
104  virtual ~Element ();
105 
109  virtual Element *Copy() = 0;
110 
120  virtual void Initialise (const NodeList& nlist);
121 
129  virtual void PostInitialisation (const NodeList& nlist) {}
130 
142  void operator= (const Element& el);
143  // basic element assignment
144 
149  virtual BYTE Type () const = 0;
150 
155  virtual BYTE VtkType () const { return 0; }
156 
161  virtual unsigned long GetCaps () const = 0;
162 
168  virtual int Dimension () const = 0;
169 
174  virtual int nNode () const = 0;
175 
183  virtual int nSide () const = 0;
184 
191  virtual int nSideNode (int side) const = 0;
192 
204  virtual int SideNode (int side, int node) const = 0;
205 
212  virtual bool IsNode (int node);
213 
222  int IsSide (int nn, int *nd);
223 
233  virtual bool IsSideNode (int side, int node);
234 
244  bool IsBoundarySide (int side) {
245  RANGE_CHECK (side >= 0 && side < nSide());
246  return bndside[side];
247  }
248 
258  { return bndel; }
259 
271  { return interfaceel; }
272 
282  virtual Point Local (const NodeList& nlist, const Point& glob)
283  const = 0;
284 
291  virtual Point NodeLocal (int node) const = 0;
292 
302  virtual Point SurfToLocal (int side, const Point &p) const
303  { ERROR_UNDEF; return Point(); }
304 
312  virtual void MapToSide (int side, Point &loc) const;
313 
320  virtual Point SideCentre (int side) const;
321 
330  Element *SideNeighbour (int side) const;
331 
340  int SideNeighbourIndex (int side) const;
341 
351  Point Global (const NodeList &nlist, const Point& loc) const;
352 
361  virtual RDenseMatrix Elgeom (const NodeList& nlist) const;
362 
371  virtual RVector DirectionCosine (int side, RDenseMatrix &jacin) = 0;
372 
379  virtual const RVector &LNormal (int side) const = 0;
380 
387  virtual double Size() const = 0;
388 
397  virtual double SideSize (int side, const NodeList &nlist) const
398  { ERROR_UNDEF; return 0; }
399 
407  virtual double DetJ (const Point &loc, const NodeList *nlist = 0) const
408  { ERROR_UNDEF; return 0.0; }
409 
421  virtual bool LContains (const Point& loc, bool pad = true) const = 0;
422 
430  virtual bool GContains (const Point& glob, const NodeList &nlist) const;
431 
446  virtual int BndSideList (const NodeList& nlist, int *list);
447 
448  void InitNeighbourSupport ();
449  void InitSubdivisionSupport ();
450 
457  int SubdivisionLevel () const;
458 
459  virtual void Subdivide (Mesh *mesh)
460  { ERROR_UNDEF; }
461 
469  virtual RVector LocalShapeF (const Point &loc) const = 0;
470 
480  virtual RDenseMatrix LocalShapeD (const Point &loc) const = 0;
481 
490  virtual RVector GlobalShapeF (const NodeList &nlist, const Point &glob)
491  const { return LocalShapeF (Local (nlist, glob)); }
492 
502  virtual RDenseMatrix GlobalShapeD (const NodeList &nlist,
503  const Point &glob) const
504  { return LocalShapeD (Local (nlist, glob)); }
505 
521  virtual int QuadRule (int order, const double **wght, const Point **absc)
522  const { ERROR_UNDEF; return 0; }
523 
531  virtual double IntF (int i) const = 0;
532 
540  virtual RSymMatrix IntFF () const = 0;
541 
551  virtual double IntFF (int i, int j) const = 0;
552 
564  virtual double IntFFF (int i, int j, int k) const = 0;
565 
566 #ifdef UNDEF
567  // MS 29.6.99 Removed because incompatible with quadratic shape functions
568 
569  virtual void IntFFF (double &iii, double &iij, double &ijk) const = 0;
570  // returns the values of the FFF tensor for:
571  // all indices equal (iii)
572  // two indices equal (iij)
573  // all indices different (ijk)
574 #endif
575 
587  virtual RSymMatrix IntPFF (const RVector& P) const = 0;
588 
602  virtual double IntPFF (int i, int j, const RVector& P) const = 0;
603 
613  virtual RSymMatrix IntDD () const = 0;
614 
626  virtual double IntDD (int i, int j) const = 0;
627 
637  virtual RVector IntFD (int i, int j) const
638  { ERROR_UNDEF; return RVector(); }
639 
651  virtual double IntFDD (int i, int j, int k) const = 0;
652 
664  virtual RSymMatrix IntPDD (const RVector& P) const = 0;
665 
679  virtual double IntPDD (int i, int j, const RVector &P) const = 0;
680 
694  virtual RVector BndIntF () const
695  { ERROR_UNDEF; return 0; }
696 
707  virtual double BndIntFSide (int i, int sd)
708  { ERROR_UNDEF; return 0; }
709 
723  virtual RSymMatrix BndIntFF () const = 0;
724 
738  virtual double BndIntFF (int i, int j) = 0;
739 
752  virtual double BndIntFFSide (int i, int j, int sd) = 0;
753 
766  virtual RSymMatrix BndIntPFF (const RVector &P) const = 0;
767 
782  virtual double BndIntPFF (int i, int j, const RVector &P) const = 0;
783 
784  // ===============================================================
785  // Integrals including mixed derivatives
786 
796  virtual double Intd (int i, int k) const
797  { ERROR_UNDEF; return 0.0; }
798 
810  virtual double IntFd (int i, int j, int k) const
811  { ERROR_UNDEF; return 0.0; }
812 
823  virtual double IntPd (const RVector &P, int j, int k) const
824  { ERROR_UNDEF; return 0.0; }
825 
836  virtual RSymMatrix Intdd() const
837  { ERROR_UNDEF; return RSymMatrix(); }
838 
850  virtual double IntFdd (int i, int j, int k, int l, int m) const
851  { ERROR_UNDEF; return 0; }
852 
853  virtual double IntPdd (const RVector &p, int j, int k, int l, int m) const
854  { ERROR_UNDEF; return 0; }
855  // Int f(r) du_j/dx_l du_k/dx_m dr
856  // where f(r) is given as a nodal vector
857 
858  virtual double IntFfd (int i, int j, int k, int l) const
859  { ERROR_UNDEF; return 0; }
860  // Int [u_i u_j du_k/dx_l] dr
861 
862  virtual double IntPfd (const RVector &p, int j, int k, int l) const
863  { ERROR_UNDEF; return 0; }
864  // Int f(r) u_j du_k/dx_l dr
865  // where f(r) is given as a nodal vector
866 
867  //------------- integrate functions on unit sphere --------------
868  virtual double IntUnitSphereP (const NodeList& nlist, const RVector& P) const
869  { ERROR_UNDEF; return 0.0; }
870  // Returns integral of f(r) over unitsphere patch
871  // only implemented for Tri3D3, Tri3D6
872 
873  virtual double IntUnitSphereFF (const NodeList& nlist, const int i, const int j) const
874  { ERROR_UNDEF; return 0.0; }
875  // Returns integral of u_i(r)*u_j(r) over unitsphere patch
876  // only implemented for Tri3D3, Tri3D6
877 
878  virtual double IntUnitSpherePFF (const NodeList& nlist, const int i, const int j, const RVector& P) const
879  { ERROR_UNDEF; return 0.0; }
880  // Returns integral of f(r)* u_i(r)*u_j(r) over unitsphere patch
881  // only implemented for Tri3D3, Tri3D6
882 
883  //---------------
884  virtual RVector BndIntFX (int side, double (*func)(const Point&),
885  const NodeList &nlist) const;
886  // Calculates Int [u_i(r) func(r) dr]
887  // along side 'side' of the triangle
888  // where func is a scalar-valued user supplied function evaluated
889  // at a global coordinate r
890 
891  virtual RVector BndIntFCos (int side, const Surface *surf,
892  const RVector &cntcos, double sigma, double sup,
893  const NodeList &nlist) const;
894  // Given a surface 'surf' and a cosine profile defined by its
895  // parametrised centre 'cntcos', scale 'sigma' and support radius 'sup'
896  // return the boundary integral of u_i(xi) * cos(xi) over side sd for all
897  // associated nodes i
898 
899  virtual RVector BndIntFCos (int side, const RVector &cntcos, double a,
900  const NodeList &nlist) const
901  { ERROR_UNDEF; return RVector(); }
902  // Calculate integral of product of cosine (centered at 'cntcos' and
903  // support radius a) with shape functions along 'side'
904 
905  virtual RVector BndIntFDelta (int side, const Surface *surf,
906  const RVector &pos, const NodeList &nlist) const;
907  // Given a surface 'surf' and delta function defined by its parametrised
908  // position 'pos', return boundary integral of u_i(xi) * delta(pos-xi)
909  // over side 'side' for all associated nodes i
910 
911  int GetSubsampleFD (int &n, double *&wght, Point *&absc,
912  RVector *&F, RDenseMatrix *&D, const NodeList &nlist) const;
913  // returns the abscissae and weights for element subsampling, and
914  // the values of the shape functions and derivatives at those points
915  // 'n' is the size of the arrays on input (may be changed on output
916  // if size was insufficient). return value is the number of subsamples
917 
918  int GetBndSubsampleFD (int side, int &n, double *&wght, Point *&absc,
919  RVector *&F, RDenseMatrix *&D, const NodeList &nlist) const;
920  // returns the abscissae (in global coordinates) and weights for element
921  // boundary subsampling along 'side', and the values of the shape functions
922  // and derivatives at those points. 'n' is the size of the arrays on input
923  // (may be changed on output if size was insufficient). return value is the
924  // number of subsamples
925 
926  virtual int GetLocalSubsampleAbsc (const Point *&absc) const
927  { return 0; }
928  // returns abscissae in local coords for numerical integration by uniform
929  // subsampling. Return value is the number of samples returned in 'absc'
930 
931  virtual int GetBndSubsampleAbsc (int side, const Point *&absc) const
932  { return 0; }
933  // returns abscissae for numerical integration by uniform
934  // subsampling over boundary side in local coordinates of the surface
935  // element. Note that abscissae are of dimension dim-1. To convert to
936  // local element coordinates, use SurfToLocal.
937  // Return value is the number of samples returned in 'absc'
938 
939  virtual RDenseMatrix StrainDisplacementMatrix (const Point &glob) const
940  { ERROR_UNDEF; return RDenseMatrix(); }
941  // Returns the strain displacement matrix of the element at global point
942  // 'glob'
943  // In 3D, the matrix is of dimension 6 x 3n (n: number of nodes):
944  // B = [B1, B2, ... Bn] with
945  //
946  // |dNi/dx 0 0 |
947  // | 0 dNi/dy 0 |
948  // Bi = | 0 0 dNi/dz|
949  // |dNi/dy dNi/dx 0 |
950  // | 0 dNi/dz dNi/dy|
951  // |dNi/dz 0 dNi/dx|
952 
953  virtual RDenseMatrix ElasticityStiffnessMatrix (const RDenseMatrix &D)
954  const
955  { ERROR_UNDEF; return RDenseMatrix(); }
956  // Returns the element elasticity stiffness matrix K, given
957  // strain matrix D: K = \int_el B^T D B dr
958  // where B is strain displacement matrix
959 
960  virtual RDenseMatrix ElasticityStiffnessMatrix (double E,
961  double nu) const
962  { ERROR_UNDEF; return RDenseMatrix(); }
963  // Returns the element elasticity stiffness matrix K for isotropic case,
964  // given material properties E (Young's modulus) and nu (Poisson's ratio)
965  // Strain matrix is calculated as
966  // |d1 d2 d2 0 0 0 |
967  // |d2 d1 d2 0 0 0 | d1 = E(1-nu)/((1+nu)(1-2nu))
968  // D = |d2 d2 d1 0 0 0 | with d2 = E nu/((1+nu)(1-2nu))
969  // |0 0 0 d3 0 0 | d3 = E/(2(1+nu))
970  // |0 0 0 0 d3 0 |
971  // |0 0 0 0 0 d3|
972 
973  RDenseMatrix ElasticStrainDisplacement (const RVector &loc,
974  const RDenseMatrix &gder) const;
975  // Returns strain-displacement matrix for 2D plane elasticity
976  // at local position loc, given global shape function derivatives gder
977  // See NAG finel routine B2C2
978  // only implemented for 2D yet
979 
980  virtual RDenseMatrix IsotropicElasticityMatrix (double E, double nu) const
981  { ERROR_UNDEF; return RDenseMatrix(); }
982  // returns a 6x6 symmetric elasticity matrix for isotropic materials,
983  // given Young's modulus E and Poisson's ratio nu
984 
985  virtual RVector InitialStrainVector (double E, double nu, const RVector &e0)
986  { ERROR_UNDEF; return RVector(); }
987  // returns a element strain vector (rhs) for initial nodal strain given
988  // in e0
989 
990  virtual RVector ThermalExpansionVector (double E, double nu,
991  double alpha, double dT)
992  { ERROR_UNDEF; return RVector(); }
993  // returns element strain vector (rhs) given element thermal expansion
994  // coefficient alpha and temperature change dT
995 
996  virtual RVector DThermalExpansionVector (double E, double nu)
997  { ERROR_UNDEF; return RVector(); }
998  // returns derivative of thermal expansion vector with respect to
999  // expansion coefficient (assuming temperature change 1)
1000 
1001  virtual int GlobalIntersection (const NodeList &nlist,
1002  const Point &p1, const Point &p2, Point **list) = 0;
1003  // same as 'Intersection' but p1 and p2 given in global coords
1004  // The return list however is still in local coords
1005 
1006  virtual int Intersection (const Point &/*p1*/, const Point &/*p2*/,
1007  Point** /*pi*/) = 0;
1008  // abstract; derived classes create a list of points where the line defined
1009  // by p1 and p2 intersects the element (in local coordinates) or starts/ends
1010  // within the element. Returns the length of the list
1011 
1012  virtual RDenseMatrix LocaltoGlobalMat () const
1013  { ERROR_UNDEF; return RDenseMatrix(); }
1014  // abstract - local to global matrix
1015 
1016  virtual RDenseMatrix GlobaltoLocalMat () const
1017  { ERROR_UNDEF; return RDenseMatrix(); }
1018  // abstract - global to local matrix
1019 
1020  virtual RDenseMatrix FTAMat () const
1021  { ERROR_UNDEF; return RDenseMatrix(); }
1022  // abstract - transform k-space matrix
1023 
1024  friend std::istream& operator>> (std::istream& i, Element &el);
1025  friend std::ostream& operator<< (std::ostream& o, const Element &el);
1026  // standard method for reading/writing an element from/to a stream
1027 
1028  int *Node;
1029  // list of absolute node numbers for the element's vertices
1030 
1031  //int Region;
1032  int Region() const {return region;} // region id for segmented meshes
1033  void SetRegion(int nr) {region = nr;} // set region id
1034 
1035  virtual void SplitSide (Mesh *mesh, int side, int newnode,
1036  Element *nbr1, Element *nbr2, Element *el1, Element *el2)
1037  { ERROR_UNDEF; }
1038 
1039  virtual void Bisect (Mesh *mesh, int side, int newnode,
1040  Element *nbr1, Element *nbr2, Element *el1, Element *el2)
1041  { ERROR_UNDEF; }
1042 
1043  virtual void MergeAndResplit (Mesh *mesh, int side, int newnode,
1044  Element *nbr1, Element *nbr2, Element *el1, Element *el2)
1045 
1046  { ERROR_UNDEF; }
1047 
1048  ElementSubdivisionData *subdivdata;
1049 
1050  Element **sdnbhr;
1051  // List of side neighbours for the element.
1052  // A NULL entry indicates no neighbour (boundary side)
1053  // Note: this list is only created if Mesh::PopulateNeighbourLists is
1054  // called.
1055 
1056  int *sdnbhridx;
1057  // list of side neighbour indices for the element
1058  // A -1 entry indicates no neighbour (boundary side)
1059  // Note: this list is only created if Mesh::PopulateNeighbourLists is
1060  // called.
1061 
1062 protected:
1063 
1064  bool *bndside;
1065  // boundary flag for each side of the element. A side is a boundary
1066  // side if all its nodes are boundary nodes
1067 
1068  bool bndel;
1069  // boundary flag for the element. The element is a boundary element if
1070  // it contains one or more boundary sides
1071 
1072  bool interfaceel;
1073  // interface flag for the element. The element is an interface element if
1074  // it contains one or more interface sides
1075 
1076  int region; // region number (-1 = no region)
1077 };
1078 
1079 
1080 // ==========================================================================
1081 // class Element_Structured
1082 // base class for regular element types (to build structured grids)
1083 //
1084 // Inheritance:
1085 // ------------
1086 // Element
1087 // ---> Element_Structured
1088 // ==========================================================================
1089 
1097 class FELIB Element_Structured: public Element {
1098 public:
1099  Element_Structured (): Element () {}
1100  Element_Structured (const Element_Structured &el): Element (el) {}
1101  virtual ~Element_Structured () {}
1102 };
1103 
1104 
1105 // ==========================================================================
1106 // class Element_Unstructured
1107 // base class for unstructured element types
1108 //
1109 // Inheritance:
1110 // ------------
1111 // Element
1112 // ---> Element_Unstructured
1113 // ==========================================================================
1114 
1121 class FELIB Element_Unstructured: public Element {
1122 public:
1123  Element_Unstructured (): Element () {}
1125  virtual ~Element_Unstructured () {}
1126  virtual void Initialise (const NodeList& nlist);
1127  virtual void PostInitialisation (const NodeList& nlist);
1128  inline double Size() const { return size; }
1129  void operator= (const Element_Unstructured& el);
1130 
1131  virtual bool GContains (const Point& glob, const NodeList& nlist)
1132  const;
1133 
1134  inline RSymMatrix IntDD () const { return intdd; }
1135  inline double IntDD (int i, int j) const { return intdd.Get(i,j); }
1136  inline RSymMatrix BndIntFF () const { return intbff; }
1137  inline double BndIntFF (int i, int j) { return intbff.Get(i,j); }
1138 
1139 protected:
1140  virtual double ComputeSize (const NodeList&) const = 0;
1141  // computes element size
1142  // called by `Initialise' to set `size'
1143 
1144  virtual RSymMatrix ComputeIntDD (const NodeList &nlist) const = 0;
1145  // Returns integral over element of product of shape derivatives:
1146  // DD = Int_el { D_i(r) D_j(r) } dr
1147  // called by `Initialise' to set `intdd'
1148 
1149 
1150  virtual RSymMatrix ComputeBndIntFF (const NodeList& nlist) const = 0;
1151  // Returns line integral of product of two shape functions along sides of
1152  // the element which belong to the mesh boundary
1153  // If the element does not contain any boundary sides then the returned
1154  // matrix is empty.
1155 
1156  double size;
1157  // stores element size (area in 2D, volume in 3D)
1158  // set by Initialise
1159 
1160  RSymMatrix intdd;
1161  // stores integral over element of product of shape derivatives
1162  // Int_el { D_i(r) D_j(r) } dr
1163  // set by Initialise
1164 
1165  RSymMatrix intbff;
1166  // stores surface integral over boundary sides of the element of shape
1167  // functions: Int_bnd { F_i(r) F_j(r) } ds
1168 
1169  Point bbmin, bbmax;
1170  // bounding box of element in global coordinates
1171  // set by Initialise
1172 };
1173 
1174 
1175 // ==========================================================================
1176 // class Element_Structured_2D
1177 //
1178 // Inheritance:
1179 // ------------
1180 // Element
1181 // ---> Element_Structured
1182 // ---> Element_Structured_2D
1183 // ==========================================================================
1184 
1189 public:
1192  : Element_Structured (el) {}
1193  virtual ~Element_Structured_2D () {}
1194  virtual int Dimension (void) const { return 2; }
1195 };
1196 
1197 
1198 // ==========================================================================
1199 // class Element_Structured_3D
1200 //
1201 // Inheritance:
1202 // ------------
1203 // Element
1204 // ---> Element_Structured
1205 // ---> Element_Structured_3D
1206 // ==========================================================================
1207 
1212 public:
1215  : Element_Structured (el) {}
1216  virtual ~Element_Structured_3D () {}
1217  virtual int Dimension (void) const { return 3; }
1218 };
1219 
1220 
1221 // ==========================================================================
1222 // class Element_Unstructured_2D
1223 //
1224 // Inheritance:
1225 // ------------
1226 // Element
1227 // ---> Element_Unstructured
1228 // ---> Element_Unstructured_2D
1229 // ==========================================================================
1230 
1235 public:
1238  : Element_Unstructured (el) {}
1239  virtual ~Element_Unstructured_2D () {}
1240  virtual int Dimension (void) const { return 2; }
1241 };
1242 
1243 
1244 // ==========================================================================
1245 // class Element_Unstructured_3D
1246 //
1247 // Inheritance:
1248 // ------------
1249 // Element
1250 // ---> Element_Unstructured
1251 // ---> Element_Unstructured_3D
1252 // ==========================================================================
1253 
1258 public:
1261  : Element_Unstructured (el) {}
1262  virtual ~Element_Unstructured_3D () {}
1263  virtual int Dimension (void) const { return 3; }
1264 
1265  RDenseMatrix IsotropicElasticityMatrix (double E, double nu) const;
1266  // returns a 6x6 symmetric elasticity matrix for isotropic materials,
1267  // given Young's modulus E and Poisson's ratio nu
1268 };
1269 
1270 typedef Element *PElement;
1271 
1272 // ==========================================================================
1273 // Nonmember functions
1274 // ==========================================================================
1275 
1276 
1277 #endif // !__ELEMENT_H
Definition: ndlist.h:14
Base class for all structured (regular) element types.
Definition: element.h:1097
Templated vector class.
Definition: vector.h:39
double Size() const
Returns the element size.
Definition: element.h:1128
Definition: node.h:39
virtual double IntFdd(int i, int j, int k, int l, int m) const
Integral of the product of a shape function and two partial shape function derivatives over the eleme...
Definition: element.h:850
Definition: surface.h:21
Definition: ellist.h:18
virtual double IntPd(const RVector &P, int j, int k) const
Integral of the product of a nodal function and a partial shape function derivative over the element...
Definition: element.h:823
int Dimension() const
Mesh dimension.
Definition: mesh.h:181
bool HasInterfaceSide()
Checks if the element contains any internal interface sides.
Definition: element.h:270
virtual bool GContains(const Point &glob, const NodeList &nlist) const
Checks if a global point coordinate is inside the element.
virtual int Dimension(void) const
Returns the spatial dimension of the element.
Definition: element.h:1194
Base class for all 3-D unstructured element types.
Definition: element.h:1257
virtual int Dimension(void) const
Returns the spatial dimension of the element.
Definition: element.h:1217
Finite-element mesh management.
Definition: mesh.h:145
virtual BYTE VtkType() const
Returns the VTK element type identifier, or 0 if the element doesn't have a VTK representation.
Definition: element.h:155
virtual RVector GlobalShapeF(const NodeList &nlist, const Point &glob) const
Returns the values of the shape functions at a global point.
Definition: element.h:490
Definition: point.h:18
Base class for all 3-D structured element types.
Definition: element.h:1211
Element()
Creates a new element with no nodes.
virtual double IntFd(int i, int j, int k) const
Integral of the product of a shape function and a partial shape function derivative over the element...
Definition: element.h:810
Definition: element.h:68
virtual double BndIntFSide(int i, int sd)
Surface integral of a shape function over one of the sides of the element.
Definition: element.h:707
void operator=(const Element &el)
Element assignment.
virtual double Intd(int i, int k) const
Integral of partial shape function derivative over the element.
Definition: element.h:796
virtual RDenseMatrix GlobalShapeD(const NodeList &nlist, const Point &glob) const
Returns the values of the shape function derivatives at a global point.
Definition: element.h:502
bool IsBoundarySide(int side)
Checks if a side is on the mesh surface.
Definition: element.h:244
virtual RVector IntFD(int i, int j) const
Integral of a product of a shape function and a shape function derivative over the element...
Definition: element.h:637
virtual RVector BndIntF() const
Boundary integral of all shape functions over all boundary sides of the element.
Definition: element.h:694
bool HasBoundarySide()
Checks if the element contains any surface sides.
Definition: element.h:257
Base class for finite element types.
Definition: element.h:84
virtual double DetJ(const Point &loc, const NodeList *nlist=0) const
Returns determinant of Jacobian at a given point inside the element in the local frame.
Definition: element.h:407
Base class for all 2-D unstructured element types.
Definition: element.h:1234
virtual void Initialise(const NodeList &nlist)
Element initialisation.
virtual double SideSize(int side, const NodeList &nlist) const
Returns the size of an element side.
Definition: element.h:397
virtual int Dimension(void) const
Returns the spatial dimension of the element.
Definition: element.h:1263
double IntDD(int i, int j) const
Integral of a product of two shape function derivatives over the element.
Definition: element.h:1135
Base class for all unstructured element types.
Definition: element.h:1121
virtual Point SurfToLocal(int side, const Point &p) const
Maps a point from surface coordinates to local element coordinates.
Definition: element.h:302
virtual RSymMatrix Intdd() const
Integral of the product of two partial shape function derivatives over the element.
Definition: element.h:836
Dense matrix class.
Definition: crmatrix.h:38
double BndIntFF(int i, int j)
Boundary integral of a product of two shape functions over all boundary sides of the element...
Definition: element.h:1137
Base class for all 2-D structured element types.
Definition: element.h:1188
RSymMatrix BndIntFF() const
Boundary integral of all products of two shape functions over all boundary sides of the element...
Definition: element.h:1136
virtual int Dimension(void) const
Returns the spatial dimension of the element.
Definition: element.h:1240
virtual void PostInitialisation(const NodeList &nlist)
Element setup after mesh initialisation.
Definition: element.h:129
virtual int QuadRule(int order, const double **wght, const Point **absc) const
Returns the weights and abscissae of quadrature rules over the element.
Definition: element.h:521
RSymMatrix IntDD() const
Integrals of all products of two shape function derivatives over the element.
Definition: element.h:1134