Class xlifepp::ShapeValues#
-
class ShapeValues#
-
Collaboration diagram for xlifepp::ShapeValues:
Public Functions
-
ShapeValues()#
-
default constructor
-
ShapeValues(const RefElement&, bool der1 = true, bool der2 = false)#
-
constructor with associated ReferenceElement size
-
void Argyris2dMap(const ShapeValues &rsv, const GeomMapData &gd, bool der1, bool der2)#
-
maps Reference Element shape functions onto current Geometric Element (Argyris)
2D Argyris transformation mapping ReferenceElement shape functions (s) unto current element from Kirby R.C.
A general approach to transforming finite elements.The SMAI journal of computational mathematics, Tome 4 (2018),197-224.doi:10.5802/smai-jcm.33. same notation as Morley map, see XLiFE++ doc for details for derivatives: dw = MJ^{-t}ds and d2w = MJ^{-t}J^{-t}ds
rsv: reference ShapeValues object (contains values and derivatives of reference shape functions) gd: geometric data (contains the inverse of jacobian) der: order of derivatives required This function fills w,dw,d2w attached to the current ShapeValues object note: dw, d2w has to be sized before !!!
-
inline void assign(const ShapeValues&)#
-
fast assign of shapevalues into current shapevalues
-
void changeSign(const std::vector<real_t>&, dimen_t, bool der1, bool der2)#
-
change sign of shape functions according to a sign vector
change sign of shape functions and its derivatives according to a sign vector wi, dxwi, dywi, dzwi, dxxwi, .
. becomes -wi, -dxwi, -dywi, -dzwi, -dxxwi if sign(i)<0 sign: sign vector of size nbdofs dimf: dimension of shape functions
-
void contravariantPiolaMap(const ShapeValues&, const GeomMapData&, bool der1, bool der2)#
-
maps Reference Element shape functions onto current Geometric Element (contravariant Piola)
map ReferenceElement vector shape functions and its derivatives unto current element using contravariant Piola map (J the jacobian of the map from reference element onto element) w = J/|J| * v for all shape functions dw = J/|J| * J^{-T} * dv for all shape function derivatives used for div conforming element
Note: when transformation is a mapping from 1d->2d or 2d->3d invJ = (JT*J)^{-1}*J{T} given by inverseJacobianMatrix and the Piola map reads w = J/sqrt|Jt*J| * v and dw = J/sqrt|Jt*J| * invJ^{T} * dv gd: geometric data (contains the jacobian and other geometric stuff, assumed to be up to date) der: order of derivatives required
Note
restricted to 1 order geometric element
-
void covariantPiolaMap(const ShapeValues&, const GeomMapData&, bool der1, bool der2)#
-
maps Reference Element shape functions onto current Geometric Element (covariant Piola)
map ReferenceElement vector shape functions and its derivatives unto current element using covariant Piola map (J the jacobian of th map from reference element onto element) w = J^{-T} * v for all shape functions dw = J^{-T} * J^{-T} * dv for all shape function derivatives used for curl conforming element Transformation when mapping from 1d->2d or 2d->3d is the same replacing J^{-T} by (invJ){T} with invJ = J*(JT*J)^{-1} (see inverseJacobian) rsv: reference ShapeValues object (contains values and derivatives of reference shape functions) gd: geometric data (contains the jacobian and other geometric stuff, assumed to be up to date) der: order of derivatives required
note: restrict to 1 order geometric element
-
void extendToVector(dimen_t d)#
-
extend scalar shape function values to vector shape function values
Extend scalar shape function values to a d-vector shape function values values w are extended to (w,0) (0,w) in 2D and (w,0,0) (0,w,0) (0,0,w) in 3D in 2D values [dxw;dyw] are extended to [(dxw,0) (0 dxw); (dyw,0) (0,dyw)] [dxxw;dyyw;dxyw] are extended to [(dxxw,0) (0 dxxw); (dyyw,0) (0,dyyw); (dxyw,0) (0,dxyw)] in 3D values [dxxw;dyyw;dxyw;dzzw;dxzw;dyzw] are extended to [(dxxw,0,0) (0,dxxw,0) (0,0,dxxw); (dyyw,0,0) (0,dyyw,0) (0,0,dyyw); (dxyw,0,0) (0,dxyw,0) (0,0,dxyw); (dzzw,0,0) (0,dzzw,0) (0,0,dzzw); (dxzw,0,0) (0,dxzw,0) (0,0,dxzw); (dyzw,0,0) (0,dyzw,0) (0,0,dyzw)] create a new ShapeValues object.
-
inline bool isEmpty() const#
-
returns true if empty
-
void map(const ShapeValues&, const GeomMapData&, bool der1, bool der2)#
-
maps Reference Element shape functions onto current Geometric Element
map ReferenceElement shape functions (derivatives) unto current element compute dw = J^{-t} * rsv.dw for all shape functions
rsv: reference ShapeValues object (contains values and derivatives of reference shape functions) gd: geometric data (contains the inverse of jacobian) der: order of derivatives required This function fills w and dw attached to the current ShapeValues object note: dw has to be sized before !!! TODO: adapt algorithm to avoid copy of w and dw
Note
when transformation is a mapping from 1d->2d or 2d->3d invJ = (Jt*J)^{-1}*Jt given also by inverseJacobianMatrix
-
void Morley2dMap(const ShapeValues&, const GeomMapData&, bool der1, bool der2)#
-
maps Reference Element shape functions onto current Geometric Element (Morley)
2D Morley transformation mapping ReferenceElement shape functions (s) unto current element from Kirby R.C.
A general approach to transforming finite elements.The SMAI journal of computational mathematics, Tome 4 (2018),197-224.doi:10.5802/smai-jcm.33. w1 = s1-a2s5-a3s6 w2 = s2-a1s4+a3s6 w3 = s3+a1s4+a2s5 w4=d1s4 w5=d2s5 w6=d3s6 a1 = (Q1)_12/L1 a2 = (Q2)_12/L2 a3 = (Q3)_12/L3 di=(Qi)_11 Qi = [ni ti]Jt[nui taui] (ni, ti) outward normal and tangent vector (pi/2 rotation of normal) on edge i of the reference triangle (nui taui) outward normal and tangent vector (pi/2 rotation of normal) on edge i of the current triangle Li length of edge i of the current triangle here edge i is the edge which does not contain vi vertex i=1 : n1=0.5*sqrt(2)(1,1), t1=0.5*sqrt(2)(-1,1) => Q1_11=0.5(g1,g2).nu1 Q1_12=0.5(g1,g2).tau1 with g1=J11-J12, g2=J21-J22 i=2 : n2=(-1,0), t2=(0,-1) => Q2_11=-(g1,g2).nu1 Q2_12=-(g1,g2).tau1 with g1=J11, g2=J21 i=3 : n3=(0,-1), t3=(1,0) => Q3_11=(g1,g2).nu1 Q3_12=(g1,g2).tau1 with g1=J12, g2=J22
for derivatives: dw = MJ^{-t}ds and d2w = MJ^{-t}J^{-t}ds
rsv: reference ShapeValues object (contains values and derivatives of reference shape functions) gd: geometric data (contains the inverse of jacobian) der: order of derivatives required This function fills w,dw,d2w attached to the current ShapeValues object note: dw, d2w has to be sized before !!!
-
void set(const real_t)#
-
set all shape functions to const value
Public Members
-
std::vector<std::vector<real_t>> d2w#
-
2nd derivatives of shape functions at a given point (dxx,dyy,dxy,[dzz,dxz, dyz])
-
std::vector<std::vector<real_t>> dw#
-
derivatives of shape functions at a given point
-
std::vector<real_t> w#
-
shape functions at a given point
Friends
-
friend std::ostream &operator<<(std::ostream&, const ShapeValues&)#
-
print shape functions and derivatives to output file stream
print operator
-
ShapeValues()#