00001 #ifndef _ALLCALC3D_H_ 00002 #define _ALLCALC3D_H_ 00003 00004 #include<cstdlib> 00005 #include<cstdio> 00006 #include<cmath> 00007 00008 #include "aph_intf.h" 00009 00010 00011 00012 double apr_elem_calc_3D( 00013 /* returns: Jacobian determinant at a point, either for */ 00014 /* volume integration if Vec_norm==NULL, */ 00015 /* or for surface integration otherwise */ 00016 int Control, /* in: control parameter (what to compute): */ 00017 /* 1 - shape functions and values */ 00018 /* 2 - derivatives and jacobian */ 00019 /* >2 - computations on the (Control-2)-th */ 00020 /* element's face */ 00021 int Nreq, /* in: number of equations */ 00022 int Pdeg, /* in: element degree of polynomial */ 00023 int Base_type, /* in: type of basis functions: */ 00024 /* 1 (APC_TENSOR) - tensor product */ 00025 /* 2 (APC_COMPLETE) - complete polynomials */ 00026 double *Eta, /* in: local coordinates of the input point */ 00027 double *Node_coor, /* in: array of coordinates of vertices of element */ 00028 double *Sol_dofs, /* in: array of element' dofs */ 00029 double *Base_phi, /* out: basis functions */ 00030 double *Base_dphix, /* out: x-derivatives of basis functions */ 00031 double *Base_dphiy, /* out: y-derivatives of basis functions */ 00032 double *Base_dphiz, /* out: z-derivatives of basis functions */ 00033 double *Xcoor, /* out: global coordinates of the point*/ 00034 double *Sol, /* out: solution at the point */ 00035 double *Dsolx, /* out: derivatives of solution at the point */ 00036 double *Dsoly, /* out: derivatives of solution at the point */ 00037 double *Dsolz, /* out: derivatives of solution at the point */ 00038 double *Vec_nor /* out: outward unit vector normal to the face */ 00039 ); 00040 00041 int apr_shape_fun_3D( /* returns: the number of shape functions (<=0 - failure) */ 00042 int Base_type, /* in: type of basis functions: */ 00043 /* 1 (APC_TENSOR) - tensor product */ 00044 /* 2 (APC_COMPLETE) - complete polynomials */ 00045 int Pdeg, /* in: degree of polynomial - can be either */ 00046 /* a single number, for isotropic p, */ 00047 /* or a combination pdegy*10+pdegx */ 00048 double *Eta, /* in: local coord of the considered point */ 00049 double *Base_phi, /* out: basis functions */ 00050 double *Base_dphix,/* out: x derivative of basis functions */ 00051 double *Base_dphiy,/* out: y derivative of basis functions */ 00052 double *Base_dphiz /* out: z derivative of basis functions */ 00053 ); 00054 00055 double ut_mat3_inv( 00056 /* returns: determinant of matrix to invert */ 00057 double *mat, /* matrix to invert */ 00058 double *mat_inv /* inverted matrix */ 00059 ); 00060 00061 double ut_vec3_length( /* returns: vector length */ 00062 double* vec /* in: vector */ 00063 ); 00064 00065 int apr_shape_fun_2D( /* returns: the number of shape functions */ 00066 int Base_type, /* in: type of basis functions: */ 00067 /* 1 (APC_TENSOR) - tensor product */ 00068 /* 2 (APC_COMPLETE) - complete polynomials */ 00069 int Pdeg, /* in: degree of polynomial - can be either */ 00070 /* a single number, for isotropic p, */ 00071 /* or a combination pdegy*10+pdegx */ 00072 double *Eta, /* in: local coord of the considered point */ 00073 double *Base_phi, /* out: basis functions */ 00074 double *Base_dphix,/* out: x derivative of basis functions */ 00075 double *Base_dphiy /* out: y derivative of basis functions */ 00076 ); 00077 00078 int apr_shape_fun_1D( /* returns: the number of shape functions */ 00079 int Pdeg, /* in: degree of polynomial */ 00080 double Eta, /* in: local coord of the considered point */ 00081 double *Base_phi, /* out: basis functions */ 00082 double *Base_dphix/* out: x derivative of basis functions */ 00083 ); 00084 00088 double ut_mat3_inv( /* returns: determinant of matrix to invert */ 00089 double *mat, /* matrix to invert */ 00090 double *mat_inv /* inverted matrix */ 00091 ); 00092 00093 double ut_vec3_length( /* returns: vector length */ 00094 double* vec /* in: vector */ 00095 ); 00096 00097 #endif /* _ALLCAL3D_H_ 00098 */