v0.14.0 |
Loose implementation of some useful functions. More...
Go to the source code of this file.
Macros | |
#define | LAMBDA(E, NU) (E * NU / ((1. + NU) * (1. - 2. * NU))) |
#define | MU(E, NU) (0.5 * E / (1. + NU)) |
#define | DELTA(NU_P, NU_PZ, E_P, E_Z) |
#define | N_MBTET0(x, y, z) (1. - x - y - z) |
tetrahedral shape function More... | |
#define | N_MBTET1(x, y, z) (x) |
tetrahedral shape function More... | |
#define | N_MBTET2(x, y, z) (y) |
tetrahedral shape function More... | |
#define | N_MBTET3(x, y, z) (z) |
tetrahedral shape function More... | |
#define | diffN_MBTET0x (-1.) |
derivative of tetrahedral shape function More... | |
#define | diffN_MBTET0y (-1.) |
derivative of tetrahedral shape function More... | |
#define | diffN_MBTET0z (-1.) |
derivative of tetrahedral shape function More... | |
#define | diffN_MBTET1x (1.) |
derivative of tetrahedral shape function More... | |
#define | diffN_MBTET1y (0.) |
derivative of tetrahedral shape function More... | |
#define | diffN_MBTET1z (0.) |
derivative of tetrahedral shape function More... | |
#define | diffN_MBTET2x (0.) |
derivative of tetrahedral shape function More... | |
#define | diffN_MBTET2y (1.) |
derivative of tetrahedral shape function More... | |
#define | diffN_MBTET2z (0.) |
derivative of tetrahedral shape function More... | |
#define | diffN_MBTET3x (0.) |
derivative of tetrahedral shape function More... | |
#define | diffN_MBTET3y (0.) |
derivative of tetrahedral shape function More... | |
#define | diffN_MBTET3z (1.) |
derivative of tetrahedral shape function More... | |
#define | N_MBTRI0(x, y) (1. - x - y) |
triangle shape function More... | |
#define | N_MBTRI1(x, y) (x) |
triangle shape function More... | |
#define | N_MBTRI2(x, y) (y) |
triangle shape function More... | |
#define | diffN_MBTRI0x (-1.) |
derivative of triangle shape function More... | |
#define | diffN_MBTRI0y (-1.) |
derivative of triangle shape function More... | |
#define | diffN_MBTRI1x (1.) |
derivative of triangle shape function More... | |
#define | diffN_MBTRI1y (0.) |
derivative of triangle shape function More... | |
#define | diffN_MBTRI2x (0.) |
derivative of triangle shape function More... | |
#define | diffN_MBTRI2y (1.) |
derivative of triangle shape function More... | |
#define | N_MBQUAD0(x, y) ((1. - x) * (1. - y)) |
quad shape function More... | |
#define | N_MBQUAD1(x, y) ((x) * (1. - y)) |
quad shape function More... | |
#define | N_MBQUAD2(x, y) ((x) * (y)) |
quad shape function More... | |
#define | N_MBQUAD3(x, y) ((1. - x) * (y)) |
quad shape function More... | |
#define | diffN_MBQUAD0x(y) (-(1. - y)) |
#define | diffN_MBQUAD0y(x) (-(1. - x)) |
#define | diffN_MBQUAD1x(y) ((1. - y)) |
#define | diffN_MBQUAD1y(x) (-x) |
#define | diffN_MBQUAD2x(y) (y) |
#define | diffN_MBQUAD2y(x) (x) |
#define | diffN_MBQUAD3x(y) (-y) |
#define | diffN_MBQUAD3y(x) ((1. - x)) |
#define | N_MBHEX0(x, y, z) (N_MBQUAD0(x, y) * (1 - z)) |
#define | N_MBHEX1(x, y, z) (N_MBQUAD1(x, y) * (1 - z)) |
#define | N_MBHEX2(x, y, z) (N_MBQUAD2(x, y) * (1 - z)) |
#define | N_MBHEX3(x, y, z) (N_MBQUAD3(x, y) * (1 - z)) |
#define | N_MBHEX4(x, y, z) (N_MBQUAD0(x, y) * (z)) |
#define | N_MBHEX5(x, y, z) (N_MBQUAD1(x, y) * (z)) |
#define | N_MBHEX6(x, y, z) (N_MBQUAD2(x, y) * (z)) |
#define | N_MBHEX7(x, y, z) (N_MBQUAD3(x, y) * (z)) |
#define | diffN_MBHEX0x(y, z) (diffN_MBQUAD0x(y) * (1 - z)) |
#define | diffN_MBHEX1x(y, z) (diffN_MBQUAD1x(y) * (1 - z)) |
#define | diffN_MBHEX2x(y, z) (diffN_MBQUAD2x(y) * (1 - z)) |
#define | diffN_MBHEX3x(y, z) (diffN_MBQUAD3x(y) * (1 - z)) |
#define | diffN_MBHEX4x(y, z) (diffN_MBQUAD0x(y) * (z)) |
#define | diffN_MBHEX5x(y, z) (diffN_MBQUAD1x(y) * (z)) |
#define | diffN_MBHEX6x(y, z) (diffN_MBQUAD2x(y) * (z)) |
#define | diffN_MBHEX7x(y, z) (diffN_MBQUAD3x(y) * (z)) |
#define | diffN_MBHEX0y(x, z) (diffN_MBQUAD0y(x) * (1 - z)) |
#define | diffN_MBHEX1y(x, z) (diffN_MBQUAD1y(x) * (1 - z)) |
#define | diffN_MBHEX2y(x, z) (diffN_MBQUAD2y(x) * (1 - z)) |
#define | diffN_MBHEX3y(x, z) (diffN_MBQUAD3y(x) * (1 - z)) |
#define | diffN_MBHEX4y(x, z) (diffN_MBQUAD0y(x) * (z)) |
#define | diffN_MBHEX5y(x, z) (diffN_MBQUAD1y(x) * (z)) |
#define | diffN_MBHEX6y(x, z) (diffN_MBQUAD2y(x) * (z)) |
#define | diffN_MBHEX7y(x, z) (diffN_MBQUAD3y(x) * (z)) |
#define | diffN_MBHEX0z(x, y) (-N_MBQUAD0(x, y)) |
#define | diffN_MBHEX1z(x, y) (-N_MBQUAD1(x, y)) |
#define | diffN_MBHEX2z(x, y) (-N_MBQUAD2(x, y)) |
#define | diffN_MBHEX3z(x, y) (-N_MBQUAD3(x, y)) |
#define | diffN_MBHEX4z(x, y) (N_MBQUAD0(x, y)) |
#define | diffN_MBHEX5z(x, y) (N_MBQUAD1(x, y)) |
#define | diffN_MBHEX6z(x, y) (N_MBQUAD2(x, y)) |
#define | diffN_MBHEX7z(x, y) (N_MBQUAD3(x, y)) |
#define | N_MBEDGE0(x) (1. - (x)) |
edge shape function More... | |
#define | N_MBEDGE1(x) (x) |
edge shape function More... | |
#define | diffN_MBEDGE0 (-1.) |
derivative of edge shape function More... | |
#define | diffN_MBEDGE1 (1.) |
derivative of edge shape function More... | |
#define | N_MBTRIQ0(x, y) ((1. - x - y) * (2 * (1. - x - y) - 1.)) |
#define | N_MBTRIQ1(x, y) (x * (2. * x - 1.)) |
#define | N_MBTRIQ2(x, y) (y * (2. * y - 1.)) |
#define | N_MBTRIQ3(x, y) (4. * (1. - x - y) * x) |
#define | N_MBTRIQ4(x, y) (4. * x * y) |
#define | N_MBTRIQ5(x, y) (4. * (1. - x - y) * y) |
#define | diffN_MBTRIQ0x(x, y) (x + y - 3. * (1. - x - y)) |
#define | diffN_MBTRIQ0y(x, y) (x + y - 3. * (1. - x - y)) |
#define | diffN_MBTRIQ1x(x, y) (-1. + 4. * x) |
#define | diffN_MBTRIQ1y(x, y) (0.) |
#define | diffN_MBTRIQ2x(x, y) (0.) |
#define | diffN_MBTRIQ2y(x, y) (-1. + 4. * y) |
#define | diffN_MBTRIQ3x(x, y) (4. * ((1. - x - y) - x)) |
#define | diffN_MBTRIQ3y(x, y) (-4. * x) |
#define | diffN_MBTRIQ4x(x, y) (4. * y) |
#define | diffN_MBTRIQ4y(x, y) (4. * x) |
#define | diffN_MBTRIQ5x(x, y) (-4. * y) |
#define | diffN_MBTRIQ5y(x, y) (4. * ((1. - x - y) - y)) |
Functions | |
void | print_mat (double *M, int m, int n) |
print matric M More... | |
void | print_mat_sym_upper (double *M, int m, int n) |
print upper part of the symmetric matrix More... | |
void | print_mat_complex (__CLPK_doublecomplex *M, int m, int n) |
priint complex matrix More... | |
PetscErrorCode | ShapeMBTRI (double *N, const double *X, const double *Y, const int G_DIM) |
calculate shape functions on triangle More... | |
PetscErrorCode | ShapeDiffMBTRI (double *diffN) |
calculate derivatives of shape functions More... | |
PetscErrorCode | ShapeFaceNormalMBTRI (double *diffN, const double *coords, double *normal) |
PetscErrorCode | ShapeFaceBaseMBTRI (double *diffN, const double *coords, double *normal, double *s1, double *s2) |
PetscErrorCode | ShapeFaceDiffNormalMBTRI (double *diffN, const double *coords, double *diff_normal) |
calculate derivative of normal in respect to nodal positions More... | |
void | ShapeJacMBTRI (double *diffN, const double *coords, double *Jac) |
calculate jacobioan More... | |
void | ShapeDiffMBTRIinvJ (double *diffN, double *invJac, double *diffNinvJac) |
calculate derivatives of shape functions in space More... | |
PetscErrorCode | ShapeMBTET (double *N, const double *G_X, const double *G_Y, const double *G_Z, int DIM) |
calculate shape functions More... | |
PetscErrorCode | ShapeDiffMBTET (double *diffN) |
calculate derivatives of shape functions More... | |
double | ShapeDetJacVolume (double *jac) |
determined of jacobian More... | |
PetscErrorCode | ShapeJacMBTET (double *diffN, const double *coords, double *jac) |
calculate jacobian More... | |
PetscErrorCode | ShapeInvJacVolume (double *jac) |
double | ShapeVolumeMBTET (double *diffN, const double *coords) |
calculate TET volume More... | |
PetscErrorCode | ShapeDiffMBTETinvJ (double *diffN, double *invJac, double *diffNinvJac) |
calculate shape functions derivatives in space More... | |
PetscErrorCode | Spin (double *spinOmega, double *vecOmega) |
calculate spin matrix from vector More... | |
PetscErrorCode | make_complex_matrix (double *reA, double *imA, __CLPK_doublecomplex *xA) |
Compose complex matrix (3x3) from two real matrices. More... | |
PetscErrorCode | Normal_hierarchical (int order_approx, int *order_edge_approx, int order, int *order_edge, double *diffN, double *diffN_face, double *diffN_edge[], double *dofs, double *dofs_edge[], double *dofs_face, double *idofs, double *idofs_edge[], double *idofs_face, __CLPK_doublecomplex *xnormal, __CLPK_doublecomplex *s1, __CLPK_doublecomplex *s2, int gg) |
Complex normal. More... | |
PetscErrorCode | Base_scale (__CLPK_doublecomplex *xnormal, __CLPK_doublecomplex *xs1, __CLPK_doublecomplex *xs2) |
PetscErrorCode | ShapeMBTET_inverse (double *N, double *diffN, const double *elem_coords, const double *glob_coords, double *loc_coords) |
calculate local coordinates for given global coordinates More... | |
PetscErrorCode | ShapeMBTRI_inverse (double *N, double *diffN, const double *elem_coords, const double *glob_coords, double *loc_coords) |
calculate local coordinates of triangle element for given global coordinates in 2D (Assume e.g. z=0) More... | |
PetscErrorCode | GradientOfDeformation (double *diffN, double *dofs, double *F) |
calculate gradient of deformation More... | |
PetscErrorCode | ShapeMBEDGE (double *N, const double *G_X, int DIM) |
PetscErrorCode | ShapeDiffMBEDGE (double *diffN) |
PetscErrorCode | ShapeMBTRIQ (double *N, const double *X, const double *Y, const int G_DIM) |
PetscErrorCode | ShapeDiffMBTRIQ (double *diffN, const double *X, const double *Y, const int G_DIM) |
PetscErrorCode | ShapeMBTETQ (double *N, const double x, const double y, const double z) |
PetscErrorCode | ShapeDiffMBTETQ (double *diffN, const double x, const double y, const double z) |
PetscErrorCode | ShapeMBTETQ_GAUSS (double *N, const double *X, const double *Y, const double *Z, const int G_DIM) |
PetscErrorCode | ShapeDiffMBTETQ_GAUSS (double *diffN, const double *X, const double *Y, const double *Z, const int G_DIM) |
PetscErrorCode | ShapeJacMBTETQ (const double *diffN, const double *coords, double *Jac) |
PetscErrorCode | ShapeMBTETQ_detJac_at_Gauss_Points (double *detJac_at_Gauss_Points, const double *diffN, const double *coords, int G_DIM) |
double | ShapeVolumeMBTETQ (const double *diffN, const double *coords, int G_DIM, double *G_TET_W) |
PetscErrorCode | ShapeMBTETQ_inverse (double *N, double *diffN, const double *elem_coords, const double *glob_coords, double *loc_coords, const double eps) |
void | ShapeDiffMBTETinvJ_complex (double *diffN, __CLPK_doublecomplex *invJac, __CLPK_doublecomplex *diffNinvJac, enum CBLAS_TRANSPOSE Trans) |
PetscErrorCode | ShapeFaceNormalMBTRI_complex (double *diffN, __CLPK_doublecomplex *xcoords, __CLPK_doublecomplex *xnormal) |
PetscErrorCode | MakeComplexTensor (double *reA, double *imA, __CLPK_doublecomplex *xA) |
PetscErrorCode | InvertComplexGradient (__CLPK_doublecomplex *xF) |
PetscErrorCode | DeterminantComplexGradient (__CLPK_doublecomplex *xF, __CLPK_doublecomplex *det_xF) |
PetscErrorCode | Grundmann_Moeller_integration_points_1D_EDGE (int rule, double *G_TRI_X, double *G_TRI_W) |
Compute weights and integration points for edge using Grundmann_Moeller rule. More... | |
PetscErrorCode | Grundmann_Moeller_integration_points_2D_TRI (int rule, double *G_TRI_X, double *G_TRI_Y, double *G_TRI_W) |
PetscErrorCode | Grundmann_Moeller_integration_points_3D_TET (int rule, double *G_TET_X, double *G_TET_Y, double *G_TET_Z, double *G_TET_W) |
Variables | |
static const double | G_TRI_X1 [] = {3.3333333333333331e-01} |
static const double | G_TRI_Y1 [] = {3.3333333333333331e-01} |
static const double | G_TRI_W1 [] = {1.} |
static const double | G_TRI_X3 [] = {0.5, 0., 0.5} |
static const double | G_TRI_Y3 [] = {0., 0.5, 0.5} |
static const double | G_TRI_W3 [] |
static const double | G_TRI_X4 [] |
static const double | G_TRI_Y4 [] |
static const double | G_TRI_W4 [] |
static const double | G_TRI_X7 [] |
static const double | G_TRI_Y7 [] |
static const double | G_TRI_W7 [] |
static const double | G_TRI_X13 [] |
static const double | G_TRI_Y13 [] |
static const double | G_TRI_W13 [] |
static const double | G_TRI_X19 [] |
static const double | G_TRI_Y19 [] |
static const double | G_TRI_W19 [] |
static const double | G_TRI_X28 [] |
static const double | G_TRI_Y28 [] |
static const double | G_TRI_W28 [] |
static const double | G_TRI_X37 [] |
static const double | G_TRI_Y37 [] |
static const double | G_TRI_W37 [] |
static const double | G_TRI_X286 [] |
static const double | G_TRI_Y286 [] |
static const double | G_TRI_W286 [] |
static const double | G_TET_X1 [] = {0.25} |
static const double | G_TET_Y1 [] = {0.25} |
static const double | G_TET_Z1 [] = {0.25} |
static const double | G_TET_W1 [] = {1.} |
static const double | G_TET_X4 [] |
static const double | G_TET_Y4 [] |
static const double | G_TET_Z4 [] |
static const double | G_TET_W4 [] = {0.25, 0.25, 0.25, 0.25} |
static const double | G_TET_X5 [] |
static const double | G_TET_Y5 [] |
static const double | G_TET_Z5 [] |
static const double | G_TET_W5 [] |
static const double | G_TET_X10 [] |
static const double | G_TET_Y10 [] |
static const double | G_TET_Z10 [] |
static const double | G_TET_W10 [] |
static const double | G_TET_X45 [] |
static const double | G_TET_Y45 [] |
static const double | G_TET_Z45 [] |
static const double | G_TET_W45 [] |
static const double | NC_TET_X84 [] |
static const double | NC_TET_Y84 [] |
static const double | NC_TET_Z84 [] |
static const double | NC_TET_W84 [] |
Loose implementation of some useful functions.
FIXME: Implementation here is very unstructured, need cleaning and pruning
Definition in file fem_tools.h.
#define DELTA | ( | NU_P, | |
NU_PZ, | |||
E_P, | |||
E_Z | |||
) |
Definition at line 24 of file fem_tools.h.
#define diffN_MBEDGE0 (-1.) |
derivative of edge shape function
Definition at line 107 of file fem_tools.h.
#define diffN_MBEDGE1 (1.) |
derivative of edge shape function
Definition at line 108 of file fem_tools.h.
#define diffN_MBHEX0x | ( | y, | |
z | |||
) | (diffN_MBQUAD0x(y) * (1 - z)) |
Definition at line 79 of file fem_tools.h.
#define diffN_MBHEX0y | ( | x, | |
z | |||
) | (diffN_MBQUAD0y(x) * (1 - z)) |
Definition at line 87 of file fem_tools.h.
#define diffN_MBHEX0z | ( | x, | |
y | |||
) | (-N_MBQUAD0(x, y)) |
Definition at line 95 of file fem_tools.h.
#define diffN_MBHEX1x | ( | y, | |
z | |||
) | (diffN_MBQUAD1x(y) * (1 - z)) |
Definition at line 80 of file fem_tools.h.
#define diffN_MBHEX1y | ( | x, | |
z | |||
) | (diffN_MBQUAD1y(x) * (1 - z)) |
Definition at line 88 of file fem_tools.h.
#define diffN_MBHEX1z | ( | x, | |
y | |||
) | (-N_MBQUAD1(x, y)) |
Definition at line 96 of file fem_tools.h.
#define diffN_MBHEX2x | ( | y, | |
z | |||
) | (diffN_MBQUAD2x(y) * (1 - z)) |
Definition at line 81 of file fem_tools.h.
#define diffN_MBHEX2y | ( | x, | |
z | |||
) | (diffN_MBQUAD2y(x) * (1 - z)) |
Definition at line 89 of file fem_tools.h.
#define diffN_MBHEX2z | ( | x, | |
y | |||
) | (-N_MBQUAD2(x, y)) |
Definition at line 97 of file fem_tools.h.
#define diffN_MBHEX3x | ( | y, | |
z | |||
) | (diffN_MBQUAD3x(y) * (1 - z)) |
Definition at line 82 of file fem_tools.h.
#define diffN_MBHEX3y | ( | x, | |
z | |||
) | (diffN_MBQUAD3y(x) * (1 - z)) |
Definition at line 90 of file fem_tools.h.
#define diffN_MBHEX3z | ( | x, | |
y | |||
) | (-N_MBQUAD3(x, y)) |
Definition at line 98 of file fem_tools.h.
#define diffN_MBHEX4x | ( | y, | |
z | |||
) | (diffN_MBQUAD0x(y) * (z)) |
Definition at line 83 of file fem_tools.h.
#define diffN_MBHEX4y | ( | x, | |
z | |||
) | (diffN_MBQUAD0y(x) * (z)) |
Definition at line 91 of file fem_tools.h.
#define diffN_MBHEX4z | ( | x, | |
y | |||
) | (N_MBQUAD0(x, y)) |
Definition at line 99 of file fem_tools.h.
#define diffN_MBHEX5x | ( | y, | |
z | |||
) | (diffN_MBQUAD1x(y) * (z)) |
Definition at line 84 of file fem_tools.h.
#define diffN_MBHEX5y | ( | x, | |
z | |||
) | (diffN_MBQUAD1y(x) * (z)) |
Definition at line 92 of file fem_tools.h.
#define diffN_MBHEX5z | ( | x, | |
y | |||
) | (N_MBQUAD1(x, y)) |
Definition at line 100 of file fem_tools.h.
#define diffN_MBHEX6x | ( | y, | |
z | |||
) | (diffN_MBQUAD2x(y) * (z)) |
Definition at line 85 of file fem_tools.h.
#define diffN_MBHEX6y | ( | x, | |
z | |||
) | (diffN_MBQUAD2y(x) * (z)) |
Definition at line 93 of file fem_tools.h.
#define diffN_MBHEX6z | ( | x, | |
y | |||
) | (N_MBQUAD2(x, y)) |
Definition at line 101 of file fem_tools.h.
#define diffN_MBHEX7x | ( | y, | |
z | |||
) | (diffN_MBQUAD3x(y) * (z)) |
Definition at line 86 of file fem_tools.h.
#define diffN_MBHEX7y | ( | x, | |
z | |||
) | (diffN_MBQUAD3y(x) * (z)) |
Definition at line 94 of file fem_tools.h.
#define diffN_MBHEX7z | ( | x, | |
y | |||
) | (N_MBQUAD3(x, y)) |
Definition at line 102 of file fem_tools.h.
#define diffN_MBQUAD0x | ( | y | ) | (-(1. - y)) |
Definition at line 61 of file fem_tools.h.
#define diffN_MBQUAD0y | ( | x | ) | (-(1. - x)) |
Definition at line 62 of file fem_tools.h.
#define diffN_MBQUAD1x | ( | y | ) | ((1. - y)) |
Definition at line 63 of file fem_tools.h.
#define diffN_MBQUAD1y | ( | x | ) | (-x) |
Definition at line 64 of file fem_tools.h.
#define diffN_MBQUAD2x | ( | y | ) | (y) |
Definition at line 65 of file fem_tools.h.
#define diffN_MBQUAD2y | ( | x | ) | (x) |
Definition at line 66 of file fem_tools.h.
#define diffN_MBQUAD3x | ( | y | ) | (-y) |
Definition at line 67 of file fem_tools.h.
#define diffN_MBQUAD3y | ( | x | ) | ((1. - x)) |
Definition at line 68 of file fem_tools.h.
#define diffN_MBTET0x (-1.) |
derivative of tetrahedral shape function
Definition at line 32 of file fem_tools.h.
#define diffN_MBTET0y (-1.) |
derivative of tetrahedral shape function
Definition at line 33 of file fem_tools.h.
#define diffN_MBTET0z (-1.) |
derivative of tetrahedral shape function
Definition at line 34 of file fem_tools.h.
#define diffN_MBTET1x (1.) |
derivative of tetrahedral shape function
Definition at line 35 of file fem_tools.h.
#define diffN_MBTET1y (0.) |
derivative of tetrahedral shape function
Definition at line 36 of file fem_tools.h.
#define diffN_MBTET1z (0.) |
derivative of tetrahedral shape function
Definition at line 37 of file fem_tools.h.
#define diffN_MBTET2x (0.) |
derivative of tetrahedral shape function
Definition at line 38 of file fem_tools.h.
#define diffN_MBTET2y (1.) |
derivative of tetrahedral shape function
Definition at line 39 of file fem_tools.h.
#define diffN_MBTET2z (0.) |
derivative of tetrahedral shape function
Definition at line 40 of file fem_tools.h.
#define diffN_MBTET3x (0.) |
derivative of tetrahedral shape function
Definition at line 41 of file fem_tools.h.
#define diffN_MBTET3y (0.) |
derivative of tetrahedral shape function
Definition at line 42 of file fem_tools.h.
#define diffN_MBTET3z (1.) |
derivative of tetrahedral shape function
Definition at line 43 of file fem_tools.h.
#define diffN_MBTRI0x (-1.) |
derivative of triangle shape function
Definition at line 49 of file fem_tools.h.
#define diffN_MBTRI0y (-1.) |
derivative of triangle shape function
Definition at line 50 of file fem_tools.h.
#define diffN_MBTRI1x (1.) |
derivative of triangle shape function
Definition at line 51 of file fem_tools.h.
#define diffN_MBTRI1y (0.) |
derivative of triangle shape function
Definition at line 52 of file fem_tools.h.
#define diffN_MBTRI2x (0.) |
derivative of triangle shape function
Definition at line 53 of file fem_tools.h.
#define diffN_MBTRI2y (1.) |
derivative of triangle shape function
Definition at line 54 of file fem_tools.h.
#define diffN_MBTRIQ0x | ( | x, | |
y | |||
) | (x + y - 3. * (1. - x - y)) |
Definition at line 117 of file fem_tools.h.
#define diffN_MBTRIQ0y | ( | x, | |
y | |||
) | (x + y - 3. * (1. - x - y)) |
Definition at line 118 of file fem_tools.h.
#define diffN_MBTRIQ1x | ( | x, | |
y | |||
) | (-1. + 4. * x) |
Definition at line 119 of file fem_tools.h.
#define diffN_MBTRIQ1y | ( | x, | |
y | |||
) | (0.) |
Definition at line 120 of file fem_tools.h.
#define diffN_MBTRIQ2x | ( | x, | |
y | |||
) | (0.) |
Definition at line 121 of file fem_tools.h.
#define diffN_MBTRIQ2y | ( | x, | |
y | |||
) | (-1. + 4. * y) |
Definition at line 122 of file fem_tools.h.
#define diffN_MBTRIQ3x | ( | x, | |
y | |||
) | (4. * ((1. - x - y) - x)) |
Definition at line 123 of file fem_tools.h.
#define diffN_MBTRIQ3y | ( | x, | |
y | |||
) | (-4. * x) |
Definition at line 124 of file fem_tools.h.
#define diffN_MBTRIQ4x | ( | x, | |
y | |||
) | (4. * y) |
Definition at line 125 of file fem_tools.h.
#define diffN_MBTRIQ4y | ( | x, | |
y | |||
) | (4. * x) |
Definition at line 126 of file fem_tools.h.
#define diffN_MBTRIQ5x | ( | x, | |
y | |||
) | (-4. * y) |
Definition at line 127 of file fem_tools.h.
#define diffN_MBTRIQ5y | ( | x, | |
y | |||
) | (4. * ((1. - x - y) - y)) |
Definition at line 128 of file fem_tools.h.
Definition at line 22 of file fem_tools.h.
Definition at line 23 of file fem_tools.h.
#define N_MBEDGE0 | ( | x | ) | (1. - (x)) |
edge shape function
Definition at line 105 of file fem_tools.h.
#define N_MBEDGE1 | ( | x | ) | (x) |
edge shape function
Definition at line 106 of file fem_tools.h.
#define N_MBHEX0 | ( | x, | |
y, | |||
z | |||
) | (N_MBQUAD0(x, y) * (1 - z)) |
Definition at line 71 of file fem_tools.h.
#define N_MBHEX1 | ( | x, | |
y, | |||
z | |||
) | (N_MBQUAD1(x, y) * (1 - z)) |
Definition at line 72 of file fem_tools.h.
#define N_MBHEX2 | ( | x, | |
y, | |||
z | |||
) | (N_MBQUAD2(x, y) * (1 - z)) |
Definition at line 73 of file fem_tools.h.
#define N_MBHEX3 | ( | x, | |
y, | |||
z | |||
) | (N_MBQUAD3(x, y) * (1 - z)) |
Definition at line 74 of file fem_tools.h.
#define N_MBHEX4 | ( | x, | |
y, | |||
z | |||
) | (N_MBQUAD0(x, y) * (z)) |
Definition at line 75 of file fem_tools.h.
#define N_MBHEX5 | ( | x, | |
y, | |||
z | |||
) | (N_MBQUAD1(x, y) * (z)) |
Definition at line 76 of file fem_tools.h.
#define N_MBHEX6 | ( | x, | |
y, | |||
z | |||
) | (N_MBQUAD2(x, y) * (z)) |
Definition at line 77 of file fem_tools.h.
#define N_MBHEX7 | ( | x, | |
y, | |||
z | |||
) | (N_MBQUAD3(x, y) * (z)) |
Definition at line 78 of file fem_tools.h.
#define N_MBQUAD0 | ( | x, | |
y | |||
) | ((1. - x) * (1. - y)) |
quad shape function
Definition at line 57 of file fem_tools.h.
#define N_MBQUAD1 | ( | x, | |
y | |||
) | ((x) * (1. - y)) |
quad shape function
Definition at line 58 of file fem_tools.h.
#define N_MBQUAD2 | ( | x, | |
y | |||
) | ((x) * (y)) |
quad shape function
Definition at line 59 of file fem_tools.h.
#define N_MBQUAD3 | ( | x, | |
y | |||
) | ((1. - x) * (y)) |
quad shape function
Definition at line 60 of file fem_tools.h.
#define N_MBTET0 | ( | x, | |
y, | |||
z | |||
) | (1. - x - y - z) |
tetrahedral shape function
Definition at line 28 of file fem_tools.h.
#define N_MBTET1 | ( | x, | |
y, | |||
z | |||
) | (x) |
tetrahedral shape function
Definition at line 29 of file fem_tools.h.
#define N_MBTET2 | ( | x, | |
y, | |||
z | |||
) | (y) |
tetrahedral shape function
Definition at line 30 of file fem_tools.h.
#define N_MBTET3 | ( | x, | |
y, | |||
z | |||
) | (z) |
tetrahedral shape function
Definition at line 31 of file fem_tools.h.
#define N_MBTRI0 | ( | x, | |
y | |||
) | (1. - x - y) |
triangle shape function
Definition at line 46 of file fem_tools.h.
#define N_MBTRI1 | ( | x, | |
y | |||
) | (x) |
triangle shape function
Definition at line 47 of file fem_tools.h.
#define N_MBTRI2 | ( | x, | |
y | |||
) | (y) |
triangle shape function
Definition at line 48 of file fem_tools.h.
#define N_MBTRIQ0 | ( | x, | |
y | |||
) | ((1. - x - y) * (2 * (1. - x - y) - 1.)) |
Definition at line 111 of file fem_tools.h.
#define N_MBTRIQ1 | ( | x, | |
y | |||
) | (x * (2. * x - 1.)) |
Definition at line 112 of file fem_tools.h.
#define N_MBTRIQ2 | ( | x, | |
y | |||
) | (y * (2. * y - 1.)) |
Definition at line 113 of file fem_tools.h.
#define N_MBTRIQ3 | ( | x, | |
y | |||
) | (4. * (1. - x - y) * x) |
Definition at line 114 of file fem_tools.h.
#define N_MBTRIQ4 | ( | x, | |
y | |||
) | (4. * x * y) |
Definition at line 115 of file fem_tools.h.
#define N_MBTRIQ5 | ( | x, | |
y | |||
) | (4. * (1. - x - y) * y) |
Definition at line 116 of file fem_tools.h.
PetscErrorCode Base_scale | ( | __CLPK_doublecomplex * | xnormal, |
__CLPK_doublecomplex * | xs1, | ||
__CLPK_doublecomplex * | xs2 | ||
) |
Definition at line 741 of file fem_tools.c.
PetscErrorCode DeterminantComplexGradient | ( | __CLPK_doublecomplex * | xF, |
__CLPK_doublecomplex * | det_xF | ||
) |
Definition at line 526 of file fem_tools.c.
PetscErrorCode Grundmann_Moeller_integration_points_1D_EDGE | ( | int | rule, |
double * | G_TRI_X, | ||
double * | G_TRI_W | ||
) |
Compute weights and integration points for edge using Grundmann_Moeller rule.
Definition at line 55 of file fem_tools.c.
PetscErrorCode Grundmann_Moeller_integration_points_2D_TRI | ( | int | rule, |
double * | G_TRI_X, | ||
double * | G_TRI_Y, | ||
double * | G_TRI_W | ||
) |
Compute weights and integration points for 2D Triangle using Grundmann_Moeller rule
Definition at line 98 of file fem_tools.c.
PetscErrorCode Grundmann_Moeller_integration_points_3D_TET | ( | int | rule, |
double * | G_TET_X, | ||
double * | G_TET_Y, | ||
double * | G_TET_Z, | ||
double * | G_TET_W | ||
) |
Compute weights and integration points for 3D Tet using Grundmann_Moeller rule
Definition at line 143 of file fem_tools.c.
PetscErrorCode InvertComplexGradient | ( | __CLPK_doublecomplex * | xF | ) |
Definition at line 499 of file fem_tools.c.
PetscErrorCode make_complex_matrix | ( | double * | reA, |
double * | imA, | ||
__CLPK_doublecomplex * | xA | ||
) |
PetscErrorCode MakeComplexTensor | ( | double * | reA, |
double * | imA, | ||
__CLPK_doublecomplex * | xA | ||
) |
Definition at line 487 of file fem_tools.c.
PetscErrorCode Normal_hierarchical | ( | int | order_approx, |
int * | order_edge_approx, | ||
int | order, | ||
int * | order_edge, | ||
double * | diffN, | ||
double * | diffN_face, | ||
double * | diffN_edge[], | ||
double * | dofs, | ||
double * | dofs_edge[], | ||
double * | dofs_face, | ||
double * | idofs, | ||
double * | idofs_edge[], | ||
double * | idofs_face, | ||
__CLPK_doublecomplex * | xnormal, | ||
__CLPK_doublecomplex * | s1, | ||
__CLPK_doublecomplex * | s2, | ||
int | gg | ||
) |
void print_mat | ( | double * | M, |
int | m, | ||
int | n | ||
) |
print matric M
void print_mat_complex | ( | __CLPK_doublecomplex * | M, |
int | m, | ||
int | n | ||
) |
priint complex matrix
void print_mat_sym_upper | ( | double * | M, |
int | m, | ||
int | n | ||
) |
print upper part of the symmetric matrix
PetscErrorCode ShapeDiffMBEDGE | ( | double * | diffN | ) |
Definition at line 771 of file fem_tools.c.
PetscErrorCode ShapeDiffMBTET | ( | double * | diffN | ) |
void ShapeDiffMBTETinvJ_complex | ( | double * | diffN, |
__CLPK_doublecomplex * | invJac, | ||
__CLPK_doublecomplex * | diffNinvJac, | ||
enum CBLAS_TRANSPOSE | Trans | ||
) |
Definition at line 437 of file fem_tools.c.
Definition at line 873 of file fem_tools.c.
PetscErrorCode ShapeDiffMBTETQ_GAUSS | ( | double * | diffN, |
const double * | X, | ||
const double * | Y, | ||
const double * | Z, | ||
const int | G_DIM | ||
) |
Definition at line 927 of file fem_tools.c.
PetscErrorCode ShapeDiffMBTRI | ( | double * | diffN | ) |
calculate derivatives of shape functions in space
PetscErrorCode ShapeDiffMBTRIQ | ( | double * | diffN, |
const double * | X, | ||
const double * | Y, | ||
const int | G_DIM | ||
) |
Definition at line 795 of file fem_tools.c.
PetscErrorCode ShapeFaceBaseMBTRI | ( | double * | diffN, |
const double * | coords, | ||
double * | normal, | ||
double * | s1, | ||
double * | s2 | ||
) |
Definition at line 204 of file fem_tools.c.
PetscErrorCode ShapeFaceDiffNormalMBTRI | ( | double * | diffN, |
const double * | coords, | ||
double * | diff_normal | ||
) |
calculate derivative of normal in respect to nodal positions
Definition at line 237 of file fem_tools.c.
calculate face normal
diffN | derivatives of shape functions |
coords | is position of the nodes |
normal | vector |
Definition at line 229 of file fem_tools.c.
PetscErrorCode ShapeFaceNormalMBTRI_complex | ( | double * | diffN, |
__CLPK_doublecomplex * | xcoords, | ||
__CLPK_doublecomplex * | xnormal | ||
) |
Definition at line 452 of file fem_tools.c.
PetscErrorCode ShapeInvJacVolume | ( | double * | jac | ) |
Definition at line 39 of file fem_tools.c.
Definition at line 967 of file fem_tools.c.
Definition at line 761 of file fem_tools.c.
PetscErrorCode ShapeMBTET | ( | double * | N, |
const double * | G_X, | ||
const double * | G_Y, | ||
const double * | G_Z, | ||
int | DIM | ||
) |
PetscErrorCode ShapeMBTET_inverse | ( | double * | N, |
double * | diffN, | ||
const double * | elem_coords, | ||
const double * | glob_coords, | ||
double * | loc_coords | ||
) |
calculate local coordinates for given global coordinates
new version for multiple points need to be implemented
Definition at line 335 of file fem_tools.c.
Definition at line 858 of file fem_tools.c.
PetscErrorCode ShapeMBTETQ_detJac_at_Gauss_Points | ( | double * | detJac_at_Gauss_Points, |
const double * | diffN, | ||
const double * | coords, | ||
int | G_DIM | ||
) |
Definition at line 979 of file fem_tools.c.
PetscErrorCode ShapeMBTETQ_GAUSS | ( | double * | N, |
const double * | X, | ||
const double * | Y, | ||
const double * | Z, | ||
const int | G_DIM | ||
) |
Definition at line 908 of file fem_tools.c.
PetscErrorCode ShapeMBTETQ_inverse | ( | double * | N, |
double * | diffN, | ||
const double * | elem_coords, | ||
const double * | glob_coords, | ||
double * | loc_coords, | ||
const double | eps | ||
) |
Definition at line 1007 of file fem_tools.c.
calculate shape functions on triangle
N | shape function array |
X | array of Gauss X coordinates |
Y | array of Gauss Y coordinates |
G_DIM | number of Gauss points |
Definition at line 182 of file fem_tools.c.
PetscErrorCode ShapeMBTRI_inverse | ( | double * | N, |
double * | diffN, | ||
const double * | elem_coords, | ||
const double * | glob_coords, | ||
double * | loc_coords | ||
) |
calculate local coordinates of triangle element for given global coordinates in 2D (Assume e.g. z=0)
\[ \left[\begin{array}{cc} \frac{\partial N_{1}}{\partial\xi}x_{N_{1}}+\frac{\partial N_{2}}{\partial\xi}x_{N_{2}}+\frac{\partial N_{3}}{\partial\xi}x_{N_{3}} & \frac{\partial N_{1}}{\partial\eta}x_{N_{1}}+\frac{\partial N_{2}}{\partial\eta}x_{N_{2}}+\frac{\partial N_{3}}{\partial\eta}x_{N_{3}}\\ \frac{\partial N_{1}}{\partial\xi}y_{N_{1}}+\frac{\partial N_{2}}{\partial\xi}y_{N_{2}}+\frac{\partial N_{3}}{\partial\xi}y_{N_{3}} & \frac{\partial N_{1}}{\partial\eta}y_{N_{1}}+\frac{\partial N_{2}}{\partial\eta}y_{N_{2}}+\frac{\partial N_{3}}{\partial\eta}y_{N_{3}} \end{array}\right]\left\{ \begin{array}{c} \xi\\ \eta \end{array}\right\} =\left\{ \begin{array}{c} x_{gp}-\left(N_{1}x_{N_{1}}+N_{2}x_{N_{2}}+N_{3}x_{N_{3}}\right)\\ y_{gp}-\left(N_{1}y_{N_{1}}+N_{2}y_{N_{2}}+N_{3}y_{N_{3}}\right) \end{array}\right\} \]
/
N | shape function array / |
diffN | array of shape function derivative w.r.t to local coordinates / |
elem_coords | global coordinates of element / |
glob_coords | global coordinates of required point / |
loc_coords | local coordinates of required point |
Definition at line 380 of file fem_tools.c.
Definition at line 780 of file fem_tools.c.
double ShapeVolumeMBTETQ | ( | const double * | diffN, |
const double * | coords, | ||
int | G_DIM, | ||
double * | G_TET_W | ||
) |
Definition at line 993 of file fem_tools.c.
|
static |
Definition at line 1115 of file fem_tools.h.
|
static |
Definition at line 1150 of file fem_tools.h.
|
static |
Definition at line 1122 of file fem_tools.h.
|
static |
Definition at line 1204 of file fem_tools.h.
|
static |
Definition at line 1132 of file fem_tools.h.
|
static |
Definition at line 1112 of file fem_tools.h.
|
static |
Definition at line 1135 of file fem_tools.h.
|
static |
Definition at line 1116 of file fem_tools.h.
|
static |
Definition at line 1156 of file fem_tools.h.
|
static |
Definition at line 1123 of file fem_tools.h.
|
static |
Definition at line 1113 of file fem_tools.h.
|
static |
Definition at line 1140 of file fem_tools.h.
|
static |
Definition at line 1118 of file fem_tools.h.
|
static |
Definition at line 1172 of file fem_tools.h.
|
static |
Definition at line 1126 of file fem_tools.h.
|
static |
Definition at line 1114 of file fem_tools.h.
|
static |
Definition at line 1145 of file fem_tools.h.
|
static |
Definition at line 1120 of file fem_tools.h.
|
static |
Definition at line 1188 of file fem_tools.h.
|
static |
Definition at line 1129 of file fem_tools.h.
|
static |
Definition at line 314 of file fem_tools.h.
|
static |
Definition at line 347 of file fem_tools.h.
|
static |
Definition at line 365 of file fem_tools.h.
|
static |
Definition at line 396 of file fem_tools.h.
|
static |
Definition at line 1013 of file fem_tools.h.
|
static |
Definition at line 317 of file fem_tools.h.
|
static |
Definition at line 430 of file fem_tools.h.
|
static |
Definition at line 325 of file fem_tools.h.
|
static |
Definition at line 334 of file fem_tools.h.
|
static |
Definition at line 312 of file fem_tools.h.
|
static |
Definition at line 337 of file fem_tools.h.
|
static |
Definition at line 353 of file fem_tools.h.
|
static |
Definition at line 377 of file fem_tools.h.
|
static |
Definition at line 441 of file fem_tools.h.
|
static |
Definition at line 315 of file fem_tools.h.
|
static |
Definition at line 408 of file fem_tools.h.
|
static |
Definition at line 319 of file fem_tools.h.
|
static |
Definition at line 328 of file fem_tools.h.
|
static |
Definition at line 313 of file fem_tools.h.
|
static |
Definition at line 342 of file fem_tools.h.
|
static |
Definition at line 359 of file fem_tools.h.
|
static |
Definition at line 388 of file fem_tools.h.
|
static |
Definition at line 727 of file fem_tools.h.
|
static |
Definition at line 316 of file fem_tools.h.
|
static |
Definition at line 419 of file fem_tools.h.
|
static |
Definition at line 322 of file fem_tools.h.
|
static |
Definition at line 331 of file fem_tools.h.
|
static |
Definition at line 1307 of file fem_tools.h.
|
static |
Definition at line 1220 of file fem_tools.h.
|
static |
Definition at line 1249 of file fem_tools.h.
|
static |
Definition at line 1278 of file fem_tools.h.