apd_dg_prism/aps_dg_util.c File Reference

#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include "aph_intf.h"
#include "./aph_dg_prism.h"
#include "mmh_intf.h"
#include "lin_alg_intf.h"
#include "uth_log.h"
Include dependency graph for aps_dg_util.c:

Defines

#define SMALL   1e-10
#define ut_max(x, y)   ((x)>(y)?(x):(y))
#define ut_min(x, y)   ((x)<(y)?(x):(y))
#define ut_abs(x)   ((x)<0?-(x):(x))

Functions

double ut_mat3_inv (double *mat, double *mat_inv)
 * local variables */
void ut_vec3_prod (double *vec_a, double *vec_b, double *vec_c)
double ut_vec3_mxpr (double *vec_a, double *vec_b, double *vec_c)
double ut_vec3_length (double *vec)
void ut_mat3vec (double *m1, double *v1, double *v2)
void ut_mat3mat (double *m1, double *m2, double *m3)
int ut_chk_list (int Num, int *List, int Ll)
apt_fieldapr_select_field (int Field_id)
double apr_elem_calc_3D (int Control, int Nreq, int *Pdeg_vec, int Base_type, double *Eta, double *Node_coor, double *Sol_dofs, double *Base_phi, double *Base_dphix, double *Base_dphiy, double *Base_dphiz, double *Xcoor, double *Sol, double *Dsolx, double *Dsoly, double *Dsolz, double *Vec_nor)
int apr_shape_fun_2D (int Base_type, int Pdeg, double *Eta, double *Base_phi, double *Base_dphix, double *Base_dphiy)
int apr_shape_fun_1D (int Pdeg, double Eta, double *Base_phi, double *Base_dphix)
int apr_shape_fun_3D (int Base_type, int Pdeg, double *Eta, double *Base_phi, double *Base_dphix, double *Base_dphiy, double *Base_dphiz)
int apr_set_quadr_3D (int Base_type, int *Pdeg_vec, int *Ngauss, double *Xg, double *Wg)
int apr_set_quadr_2D (int Fa_type, int Base_type, int *Pdeg_vec, int *Ngauss, double *Xg, double *Wg)
int apr_L2_proj (int Field_id, int Mode, int El, int *Pdeg_vec, double *Dofs, int *El_from, int *Pdeg_vec_from, double *Dofs_from, double(*Fun_p)(double *, double *, double *, double *))
int apr_sol_xglob (int Field_id, double *Xglob, int Nb_sol, int *El, double *Xloc, double *Sol, double *Dxsol, double *Dysol, double *Dzsol, double Close_proximity_precision, int Sol_xglob_flags)
int apr_get_profile (FILE *filePtr, int fieldId, int solNr, int nSol, double *pt1, double *pt2, int nPoints)
 apr_get_profile - to return values of solution at given points

Define Documentation

#define SMALL   1e-10
#define ut_abs (  )     ((x)<0?-(x):(x))
#define ut_max ( x,
 )     ((x)>(y)?(x):(y))
#define ut_min ( x,
 )     ((x)<(y)?(x):(y))

Function Documentation

apt_field* apr_select_field ( int  Field_id  ) 

-------------------------------------------------------- apr_select_field - to select the proper field ---------------------------------------------------------

int apr_shape_fun_1D ( int  Pdeg,
double  Eta,
double *  Base_phi,
double *  Base_dphix 
)

Here is the caller graph for this function:

int apr_shape_fun_2D ( int  Base_type,
int  Pdeg,
double *  Eta,
double *  Base_phi,
double *  Base_dphix,
double *  Base_dphiy 
)

Here is the caller graph for this function:

int ut_chk_list ( int  Num,
int *  List,
int  Ll 
)
*it is possible to change it by modifying this routine ***it is possible to change it by modifying this routine ***but Xg is unchanged so apr_fa_elem_coor must take care of this **double ut_mat3_inv ( double *  mat,
double *  mat_inv 
)

* local variables */

-------------------------------------------------------- ut_mat3_inv - to invert a 3x3 matrix (stored as a vector!) ---------------------------------------------------------

*++++++++++++++++ executable statements ++++++++++++++++*/ *kbw *kew*/ * set the total number of Gauss points */ * fill the arrays of Gauss points and Gauss coefficients */ * we correct weights for 2D integration on triangles */ * local variables */ *++++++++++++++++ executable statements ++++++++++++++++*/ * fill the arrays of Gauss points and Gauss coefficients */ * we correct weights for 2D integration on triangles */ * pointer to field structure */ * local variables */ * auxiliary variables */ * constatnts */ *++++++++++++++++ executable statements ++++++++++++++++*/ * get formulation parameters */ * find number of element shape functions and scalar dofs */ * initialize the matrices to zero */ * get the coordinates of the nodes of El in the right order */ * prepare data for gaussian integration */ *kbw *kew*/ * at the gauss point, compute basis functions, determinant etc*/ *kbw *kew*/ * get value of projected function at integration point */ * we assume all elements are of the same type and have the same * initiate counter for Dofs */ * for each element on a list */ * find local coordinates within the element */ *kbw *kew*/ * find value of function at integration point */ * update counter for dofs */ *kbw *kew*/ * mass matrix */ * right hand side vector */ *kbw * solve the local problem */ *kbw * rewrite solution */ * to global data structure */ * to vector Dofs */ * check for Mode = -1 */ * in a loop over integration points */ * at a gauss point compute solution etc*/ * get solution in element_from */ * find local coordinates within the element */ * find value of function at integration point */ *kbw * pointer to field structure */ * local variables */ * auxiliary variables */ *++++++++++++++++ executable statements ++++++++++++++++*/ * select the proper approximation field */ * get the corresponding mesh ID */ * find generation levels for both elements */ * starting with the younger element */ * in a loop over generations */ * initialize for further generations */ * find father */ * check family informarion */ * check which son are you */ *kbw *kew*/ * find transformation coefficients to father element coordinates */ * if final element is identical with one sent */ *kbw * how close to the boundary is on the boundary */ * data for reference points for three dimensional prismatic element */ *++++++++++++++++ executable statements ++++++++++++++++*/ * get necessary mesh parameters */ * get formulation parameters */ * prepare the matrix for finding coefficients of linear transformation */ * loop over all initial mesh elements */ * get the coordinates of element nodes in the right order */ *kbw *kb!!! * find coefficients of the transformation by solving a system of *kbw *kbw *kbw *kew*/ * solve the local problem */ *kbw *kew*/ *kbw *kew*/ * checking remaining element vertices to confirm the transformation *kbw *kew*/ *checking*/ *kbw *kew*/ * if global point within initial mesh element */ *kbw *kew*/ *kbw *kew*/ *find proper son and its local coordinates*/ *kbw *kew*/ * found active element with global coordinates Xglob */ *kbw *kew*/ * if solution required */ * find degree of polynomial and number of element scalar dofs */ * get the coordinates of the nodes of El in the right order */ * get the most recent solution degrees of freedom */ * find value of solution at a point */ * find value of solution at a point */ *kbw *kew*/ *checking*/

Here is the caller graph for this function:

void ut_mat3mat ( double *  m1,
double *  m2,
double *  m3 
)
void ut_mat3vec ( double *  m1,
double *  v1,
double *  v2 
)

Here is the caller graph for this function:

double ut_vec3_length ( double *  vec  ) 

Here is the caller graph for this function:

double ut_vec3_mxpr ( double *  vec_a,
double *  vec_b,
double *  vec_c 
)
void ut_vec3_prod ( double *  vec_a,
double *  vec_b,
double *  vec_c 
)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 3 Jun 2020 for ModFEM by  doxygen 1.6.1