![]() |
Modules | |
Standard Linear Approximation | |
Defines | |
#define | APC_TRUE 1 |
#define | APC_FALSE 0 |
#define | APC_MAXELP_COMP 5 |
#define | APC_MAXELP_TENS 505 |
#define | APC_MAXELVD 130 |
#define | APC_MAXELSD 300 |
#define | APC_DOUBLE_MAXELSD 600 |
#define | APC_MAX_GEO_DOFS 18 |
#define | APC_CUR_FIELD_ID 0 |
#define | APC_NO_DOFS -1 |
#define | APC_BASE_TENSOR_DG 1 |
#define | APC_BASE_COMPLETE_DG 2 |
#define | APC_BASE_PRISM_STD 3 |
#define | APC_BASE_PRISM_QUAD_STD 32 |
#define | APC_BASE_TETRA_STD 4 |
#define | APC_BASE_TETRA_QUAD_STD 42 |
#define | APC_ZERO 0 |
#define | APC_READ 1 |
#define | APC_INIT 2 |
#define | APC_ELEMENT 4 |
#define | APC_FACE 3 |
#define | APC_EDGE 2 |
#define | APC_VERTEX 1 |
#define | APC_MIXED_ELEMENT 8 |
#define | APC_MIXED_FACE 7 |
#define | APC_MIXED_EDGE 6 |
#define | APC_MIXED_VERTEX 5 |
#define | APC_MIXED_NO_SEC_FIELD -1 |
#define | APC_NO_COMP 0 |
#define | APC_COMP_SM 1 |
#define | APC_COMP_RHS 2 |
#define | APC_COMP_BOTH 3 |
#define | APC_COMP_MM 10 |
#define | APC_REWR_SM 4 |
#define | APC_REWR_RHS 5 |
#define | APC_REWR_BOTH 6 |
#define | APC_REWR_MM 13 |
#define | APC_REF_ALLOWED 1 |
#define | APC_REF_DENIED 2 |
#define | APC_DEREF_ALLOWED 3 |
#define | APC_DEREF_DENIED 4 |
#define | APC_LINEAR_APPROXIMATION_PDEG 1 |
#define | APC_QUADRATIC_HIERACHICAL_APPROXIMATION_PDEG 15 |
#define | APC_QUADRATIC_APPROXIMATION_PDEG 2 |
#define | APC_MIXED_P1_P1_APPROXIMATION_PDEG 11 |
#define | APC_MIXED_P2_P1_APPROXIMATION_PDEG 21 |
#define | APC_MIXED_P2_P2_APPROXIMATION_PDEG 22 |
#define | APC_P1_NONE_G1 101 |
#define | APC_P15_NONE_G1 151 |
#define | APC_P2_NONE_G1 201 |
#define | APC_P2_NONE_G2 202 |
#define | APC_P1_P1_G1 111 |
#define | APC_P2_P2_G2 222 |
#define | APC_P2_P1_G2 212 |
#define | APC_P2_P1_G1 211 |
#define | APC_TETRA_NUM_SHAP_LINEAR_APROXIMATION 4 |
#define | APC_TETRA_NUM_SHAP_QUADRATIC_APROXIMATION 10 |
#define | APC_PRISM_NUM_SHAP_LINEAR_APROXIMATION 6 |
#define | APC_PRISM_NUM_SHAP_QUADRATIC_APROXIMATION 18 |
#define | APC_PRISM_NUM_SHAP_HIERARCHICAL_QUADRATIC_APROXIMATION 15 |
#define | APC_MAX_CONSTR_EL_LOC 10 |
#define | APC_CLOSE 1.0e-6 |
#define | APC_SMALL 1.0e-9 |
#define | APC_ELEM_CALC_SHAPE_FUNC_N_VALUES 1 |
#define | APC_ELEM_CALC_DERIVATIVES_AND_JACOBIAN 2 |
#define | APC_ELEM_CALC_ON_FACE(face_number) 3+face_number |
Enumerations | |
enum | ape_sol_xglob { APE_SOL_XGLOB_DEFAULT = 0x00, APE_SOL_XGLOB_MATCH_ALL_ELEMENTS = 0x01, APE_SOL_XGLOB_MATCH_WITH_ADAPTATION = 0x02, APE_SOL_XGLOB_CHECK_ONLY_GIVEN_ELEMENT = 0x04 } |
Flags controling apr_sol_xglob. More... | |
Functions | |
int | apr_module_introduce (char *Approx_name) |
int | apr_init_field (char Field_type, int Control, int Mesh_id, int Nreq, int Nr_sol, int Pdeg_in, char *Filename, double(*Fun_p)(int, double *, int)) |
int | apr_write_field (int Field_id, int Nreq, int Select, double Accuracy, char *Filename) |
int | apr_check_field (int Field_id) |
int | apr_get_mesh_id (int Field_id) |
int | apr_get_mixed_second_field_id (int Field_id) |
int | apr_get_nreq (int Field_id) |
int | apr_get_mixed_nreq (int Field_id) |
int | apr_get_nr_sol (int Field_id) |
int | apr_get_el_pdeg_numshap (int Field_id, int El_id, int *Pdeg_vec) |
int | apr_get_el_pdeg_numshap_related_with_dof_type (int Field_id, int El_id, int Dof_type, int *Pdeg) |
int | apr_get_base_type (int Field_id, int El_id) |
int | apr_get_ent_pdeg (int Field_id, int Ent_type, int Ent_id) |
int | apr_set_ent_pdeg (int Field_id, int Ent_type, int Ent_id, int Pdeg) |
int | apr_get_el_pdeg (int Field_id, int El_id, int *Pdeg_vec) |
int | apr_set_el_pdeg (int Field_id, int El_id, int *Pdeg) |
int | apr_get_mixed_pdeg (int Field_id, int *Pdeg_vec) |
int | apr_get_el_geo_pdeg (int Field_id, int El_id, int *Pdeg_vec) |
int | apr_set_el_geo_pdeg (int Field_id, int El_id, int *Pdeg_vec) |
int | apr_move_node (int Field_id, int Node_id, int Node_type, double *Shift_vec) |
int | apr_node_coor (int Field_id, int Node_id, int Node_type, double *coord) |
int | apr_get_el_dofs (int Field_id, int El_id, int Vect_id, double *El_dofs_std) |
int | apr_get_el_geo_dofs (int Field_id, int El_id, int *GeoDofs_id, int *GeoDofs_type, double *GeoDofs) |
int | apr_get_ent_numshap (int Field_id, int Ent_type, int Ent_id) |
int | apr_get_ent_nrdofs (int Field_id, int Ent_type, int Ent_id) |
int | apr_get_nrdofs_glob (int Field_id) |
int | apr_read_ent_dofs (int Field_id, int Ent_type, int Ent_id, int Ent_nrdofs, int Vect_id, double *Vect_dofs) |
int | apr_write_ent_dofs (int Field_id, int Ent_type, int Ent_id, int Ent_nrdofs, int Vect_id, double *Vect_dofs) |
int | apr_create_ent_dofs (int Field_id, int Ent_type, int Ent_id, int Ent_nrdofs, int Vect_id, double *Vect_dofs) |
int | apr_set_ini_con (int Field_id, double(*Fun_p)(int, double *, int)) |
int | apr_prepare_integration_parameters (int Field_id, int El_id, int *Geo_order, int *Num_geo_dofs, double *Geo_dofs, int *El_mate, int *Base, int *Pdeg_vec, int *Num_shap, int *Nreq, int *Num_dofs) |
int | apr_num_int_el (int Problem_id, int Field_id, int El_id, int Comp_sm, int *Pdeg_vec, double *Sol_dofs_k, double *Sol_dofs_n, int *diagonal, double *Stiff_mat, double *Rhs_vect) |
int | apr_get_stiff_mat_data (int Field_id, int El_id, int Comp_sm, char Transpose, int Pdeg_in, int Nreq_in, int *Nr_dof_ent, int *List_dof_ent_type, int *List_dof_ent_id, int *List_dof_ent_nrdofs, int *Nrdofs_loc, double *Stiff_mat, double *Rhs_vect) |
int | apr_proj_dof_ref (int Field_id, int El, int Max_elem_id, int Max_face_id, int Max_edge_id, int Max_vert_id) |
int | apr_rewr_sol (int Field_id, int Sol_from, int Sol_to) |
int | apr_free_field (int Field_id) |
int | apr_limit_deref (int Field_id, int El_id) |
int | apr_limit_ref (int Field_id, int El_id) |
int | apr_refine (int Field_id, int El_id) |
int | apr_derefine (int Field_id, int El_id) |
int | apr_shape_fun_3D (int Base_type, int Pdeg, double *Eta, double *Base_phi, double *Base_dphix, double *Base_dphiy, double *Base_dphiz) |
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_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_set_quadr_2D_penalty (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_create_constr_data (int Field_id) |
int | apr_get_el_constr_data (int Field_id, int El_id, int *Nodes, int *Nr_constr, int *Constr_id, int *Constr_type, double *Constr_val) |
int | apr_get_constr_data (int Field_id, int Node_id, int Node_type, int *Constr, int *Constr_type) |
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 APC_BASE_COMPLETE_DG 2 |
#define APC_BASE_PRISM_QUAD_STD 32 |
#define APC_BASE_PRISM_STD 3 |
#define APC_BASE_TENSOR_DG 1 |
Basis functions types
#define APC_BASE_TETRA_QUAD_STD 42 |
#define APC_BASE_TETRA_STD 4 |
#define APC_CLOSE 1.0e-6 |
Close proximity precision /* how close to the boundary is on the boundary
#define APC_COMP_BOTH 3 |
#define APC_COMP_MM 10 |
#define APC_COMP_RHS 2 |
#define APC_COMP_SM 1 |
#define APC_CUR_FIELD_ID 0 |
#define APC_DEREF_ALLOWED 3 |
#define APC_DEREF_DENIED 4 |
#define APC_DOUBLE_MAXELSD 600 |
#define APC_EDGE 2 |
#define APC_ELEM_CALC_DERIVATIVES_AND_JACOBIAN 2 |
#define APC_ELEM_CALC_ON_FACE | ( | face_number | ) | 3+face_number |
#define APC_ELEM_CALC_SHAPE_FUNC_N_VALUES 1 |
#define APC_ELEMENT 4 |
Identifiers of mesh entities
#define APC_FACE 3 |
#define APC_FALSE 0 |
#define APC_INIT 2 |
#define APC_LINEAR_APPROXIMATION_PDEG 1 |
approximation field type
#define APC_MAX_CONSTR_EL_LOC 10 |
#define APC_MAX_GEO_DOFS 18 |
maximal number of geo dofs
#define APC_MAXELP_COMP 5 |
maximal degree of polynomial for an element
#define APC_MAXELP_TENS 505 |
#define APC_MAXELSD 300 |
maximal number of scalar dofs (nreq*num_shap) e.g. 4*15=60 for quadratic prisms and ns_supg
#define APC_MAXELVD 130 |
maximal number of vector dofs (shape functions) for an element
#define APC_MIXED_EDGE 6 |
#define APC_MIXED_ELEMENT 8 |
#define APC_MIXED_FACE 7 |
#define APC_MIXED_NO_SEC_FIELD -1 |
#define APC_MIXED_P1_P1_APPROXIMATION_PDEG 11 |
#define APC_MIXED_P2_P1_APPROXIMATION_PDEG 21 |
#define APC_MIXED_P2_P2_APPROXIMATION_PDEG 22 |
#define APC_MIXED_VERTEX 5 |
#define APC_NO_COMP 0 |
Options for assembling - should not be changed !!!
#define APC_NO_DOFS -1 |
degree of approximation symbol indicating not allocated dofs
#define APC_P15_NONE_G1 151 |
#define APC_P1_NONE_G1 101 |
unified approximation pdeg [geo + base]
#define APC_P1_P1_G1 111 |
#define APC_P2_NONE_G1 201 |
#define APC_P2_NONE_G2 202 |
#define APC_P2_P1_G1 211 |
#define APC_P2_P1_G2 212 |
#define APC_P2_P2_G2 222 |
#define APC_PRISM_NUM_SHAP_HIERARCHICAL_QUADRATIC_APROXIMATION 15 |
#define APC_PRISM_NUM_SHAP_LINEAR_APROXIMATION 6 |
#define APC_PRISM_NUM_SHAP_QUADRATIC_APROXIMATION 18 |
#define APC_QUADRATIC_APPROXIMATION_PDEG 2 |
#define APC_QUADRATIC_HIERACHICAL_APPROXIMATION_PDEG 15 |
#define APC_READ 1 |
#define APC_REF_ALLOWED 1 |
symbols for defining whether refinements/derefinements should be allowed e.g. due to mesh regularity constraints
#define APC_REF_DENIED 2 |
#define APC_REWR_BOTH 6 |
#define APC_REWR_MM 13 |
#define APC_REWR_RHS 5 |
#define APC_REWR_SM 4 |
#define APC_SMALL 1.0e-9 |
#define APC_TETRA_NUM_SHAP_LINEAR_APROXIMATION 4 |
aproximation number of shape function for element type
#define APC_TETRA_NUM_SHAP_QUADRATIC_APROXIMATION 10 |
#define APC_TRUE 1 |
#define APC_VERTEX 1 |
#define APC_ZERO 0 |
Initialization options
enum ape_sol_xglob |
Flags controling apr_sol_xglob.
APE_SOL_XGLOB_DEFAULT |
the defaults are: not APE_SOL_XGLOB_MATCH_ALL_ELEMENTS = match first element only not APE_SOL_XGLOB_MATCH_WITH_ADAPTATION = match only at initial level not APE_SOL_XGLOB_CHECK_ONLY_GIVEN_ELEMENT = search for matching element(s) |
APE_SOL_XGLOB_MATCH_ALL_ELEMENTS | |
APE_SOL_XGLOB_MATCH_WITH_ADAPTATION | |
APE_SOL_XGLOB_CHECK_ONLY_GIVEN_ELEMENT |
if the element containing given point is already known, one can put its' id into El[0] and only this element will be considered |
int apr_check_field | ( | int | Field_id | ) |
----------------------------------------------------------- apr_check_field - to check approximation field data structure ------------------------------------------------------------
Field_id | in: approximation field ID |
int apr_create_constr_data | ( | int | Field_id | ) |
----------------------------------------------------------- apr_create_constr_data - to create and fill constraint arrays (assuming approximation and mesh data agree) ------------------------------------------------------------
Field_id | returns: >=0 - success code, <0 - error code in: approximation field ID |
int apr_create_ent_dofs | ( | int | Field_id, | |
int | Ent_type, | |||
int | Ent_id, | |||
int | Ent_nrdofs, | |||
int | Vect_id, | |||
double * | Vect_dofs | |||
) |
----------------------------------------------------------- apr_create_ent_dofs - to write a vector of dofs associated with a given mesh entity to approximation field data structure ------------------------------------------------------------
Field_id | returns: >=0 - success code, <0 - error code | |
Ent_type | in: approximation field ID | |
Ent_id | in: type of mesh entity | |
Ent_nrdofs | in: mesh entity ID | |
Vect_id | in: number of dofs associated with the entity | |
Vect_dofs | in: vector ID in case of multiple solution vectors in: dofs to be written |
int apr_derefine | ( | int | Field_id, | |
int | El_id | |||
) |
----------------------------------------------------------- apr_derefine - to derefine an element or the whole mesh with irregularity check ------------------------------------------------------------
Field_id | returns: >=0 - success code, <0 - error code | |
El_id | in: mesh ID or 0 (MMC_CUR_MESH_ID) for the current mesh in: element ID or -2 (MMC_DO_UNI_DEREF) for uniform derefinement |
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 | |||
) |
----------------------------------------------------------------- apr_elem_calc_3D - to perform element calculations (to provide data on coordinates, solution, shape functions, etc. for a given point inside element (given local coordinates Eta[i]); for geometrically multi-linear or linear 3D elements -------------------------------------------------------------------
Control | returns: Jacobian determinant at a point, either for volume integration if Vec_norm==NULL, or for surface integration otherwise | |
Nreq | in: control parameter (what to compute): APC_ELEM_CALC_ON_FACE(face_number) >2 - computations on the | |
Pdeg_vec | in: number of equations | |
Base_type | in: element degree of polynomial | |
Eta | in: type of basis functions: define APC_BASE_TENSOR_DG 1 define APC_BASE_COMPLETE_DG 2 define APC_BASE_PRISM_STD 3 // for prismatic elements define APC_BASE_PRISM_QUAD_STD 32 // for quadratic prismatic elements [element type 3 / approximation degree 2] define APC_BASE_TETRA_STD 4 // for tetrahedral elements define APC_BASE_TETRA_QUAD_STD 42 // for quadratic tetrahedral elements [element type 4 / approximation degree 2] | |
Node_coor | in: local coordinates of the input point | |
Sol_dofs | in: array of coordinates of vertices of element | |
Base_phi | in: array of element' dofs | |
Base_dphix | out: basis functions | |
Base_dphiy | out: x-derivatives of basis functions | |
Base_dphiz | out: y-derivatives of basis functions | |
Xcoor | out: z-derivatives of basis functions | |
Sol | out: global coordinates of the point | |
Dsolx | out: solution at the point | |
Dsoly | out: derivatives of solution at the point | |
Dsolz | out: derivatives of solution at the point | |
Vec_nor | out: derivatives of solution at the point out: outward unit vector normal to the face |
int apr_free_field | ( | int | Field_id | ) |
----------------------------------------------------------- apr_free_field - to free approximation field data structure ------------------------------------------------------------
Field_id | in: approximation field ID |
int apr_get_base_type | ( | int | Field_id, | |
int | El_id | |||
) |
-------------------------------------------------------- apr_get_base_type - to return the type of basis functions for an element REMARK: type of basis functions differentiates element types as well examples for discontinuous Galerkin approximation (from include/aph_intf.h): define APC_BASE_TENSOR_DG 1 define APC_BASE_COMPLETE_DG 2 examples for standard linear approximation (from include/aph_intf.h): define APC_BASE_PRISM_STD 3 // for linear prismatic elements define APC_BASE_TETRA_STD 4 // for linear tetrahedral elements ---------------------------------------------------------
Field_id | returns: >0 - type of basis functions, <0 - error code | |
El_id | in: field ID in: element ID |
int apr_get_constr_data | ( | int | Field_id, | |
int | Node_id, | |||
int | Node_type, | |||
int * | Constr, | |||
int * | Constr_type | |||
) |
----------------------------------------------------------- apr_get_constr_data - to return constraints data for a node (dof entity) ------------------------------------------------------------
Field_id | returns: >=0 - success code, <0 - error code | |
Node_id | in: approximation field ID | |
Node_type | in: id of node (can be vertex or edge) | |
Constr | in: type of input node APC_VERTEX or APC_EDGE | |
Constr_type | out: table of constraints data, Constr[0] - number of constraints (in linear approximation 2 - mid-edge node, 4 - mid-side node) out: table of constraints element type, Constr_type[0] - id of coefficient vector |
int apr_get_el_constr_data | ( | int | Field_id, | |
int | El_id, | |||
int * | Nodes, | |||
int * | Nr_constr, | |||
int * | Constr_id, | |||
int * | Constr_type, | |||
double * | Constr_val | |||
) |
----------------------------------------------------------- apr_get_el_constr_data - to return the number and the list of element's real nodes, with the corresponding constraint coefficients ------------------------------------------------------------
Field_id | returns: >=0 - success code, <0 - error code | |
El_id | in: approximation field ID | |
Nodes | in: element ID | |
Nr_constr | out: list of vertex node IDs | |
Constr_id | out: list with the numbers of constraints for each vertex | |
Constr_type | out: ID's of parent (constraining) nodes | |
Constr_val | out: Type of parent (used in quadratic approximation and above) out: the corresponding constraint coefficients |
int apr_get_el_dofs | ( | int | Field_id, | |
int | El_id, | |||
int | Vect_id, | |||
double * | El_dofs_std | |||
) |
----------------------------------------------------------- apr_get_el_dofs - to return the list of standard dofs for a given element each dof corresponds to a standard shape function ------------------------------------------------------------
Field_id | returns: >0 - the number of dofs <0 - error code | |
El_id | in: approximation field ID | |
Vect_id | in: element ID | |
El_dofs_std | in: vector ID in case of multiple solution vectors out: the list of values of element dofs |
int apr_get_el_geo_dofs | ( | int | Field_id, | |
int | El_id, | |||
int * | GeoDofs_id, | |||
int * | GeoDofs_type, | |||
double * | GeoDofs | |||
) |
----------------------------------------------------------- apr_get_el_geo_dofs - to get geometric coordinates for a given element ------------------------------------------------------------
Field_id | returns: >0 - the number of dofs <0 - error code | |
El_id | in: approximation field ID | |
GeoDofs_id | in: element ID | |
GeoDofs_type | out: list of dofs in element | |
GeoDofs | out: type of dofs [APC_VERTEX / APC_EDGE / APC_FACE] |
int apr_get_el_geo_pdeg | ( | int | Field_id, | |
int | El_id, | |||
int * | Pdeg_vec | |||
) |
----------------------------------------------------------- apr_get_el_geo_pdeg - to return the degree of approximation associated with geometric transformation of element ------------------------------------------------------------
Field_id | returns: >0 - success code, <0 - error code | |
El_id | in: approximation field ID | |
Pdeg_vec | in: element ID out: degree of approximation symbol |
int apr_get_el_pdeg | ( | int | Field_id, | |
int | El_id, | |||
int * | Pdeg_vec | |||
) |
----------------------------------------------------------- apr_get_el_pdeg - to return the degree of approximation vector associated with a given element ------------------------------------------------------------
Field_id | returns: >0 - success code <0 - error code | |
El_id | in: approximation field ID | |
Pdeg_vec | in: element ID out: degree of approximation symbol or vector |
int apr_get_el_pdeg_numshap | ( | int | Field_id, | |
int | El_id, | |||
int * | Pdeg_vec | |||
) |
-------------------------------------------------------- apr_get_el_pdeg_numshap - to return the number of shape functions (scalar DOFs) for an element given its degree of approximation symbol or vector pdeg ---------------------------------------------------------
Field_id | returns: >=0 - success code, <0 - error code | |
El_id | in: field ID | |
Pdeg_vec | in: element ID in: degree of approximation symbol or vector |
int apr_get_el_pdeg_numshap_related_with_dof_type | ( | int | Field_id, | |
int | El_id, | |||
int | Dof_type, | |||
int * | Pdeg | |||
) |
int apr_get_ent_nrdofs | ( | int | Field_id, | |
int | Ent_type, | |||
int | Ent_id | |||
) |
----------------------------------------------------------- apr_get_ent_nrdofs - to return the number of dofs associated with a given mesh entity ------------------------------------------------------------
Field_id | returns: >0 - the number of dofs, <0 - error code | |
Ent_type | in: approximation field ID | |
Ent_id | in: type of mesh entity in: mesh entity ID |
int apr_get_ent_numshap | ( | int | Field_id, | |
int | Ent_type, | |||
int | Ent_id | |||
) |
----------------------------------------------------------- apr_get_ent_numshap - to return the number of shape functions (vector DOFs) associated with a given mesh entity ------------------------------------------------------------
Field_id | returns: >0 - the number of dofs, <0 - error code | |
Ent_type | in: approximation field ID | |
Ent_id | in: type of mesh entity in: mesh entity ID |
int apr_get_ent_pdeg | ( | int | Field_id, | |
int | Ent_type, | |||
int | Ent_id | |||
) |
----------------------------------------------------------- apr_get_ent_pdeg - to return the degree of approximation symbol associated with a given mesh entity ------------------------------------------------------------
Field_id | returns: >0 - approximation index for P1 and P2, 0 - dof entity inactive (constrained) or aproximation index in P0 <0 - error code | |
Ent_type | in: approximation field ID | |
Ent_id | in: type of mesh entity in: mesh entity ID |
int apr_get_mesh_id | ( | int | Field_id | ) |
----------------------------------------------------------- apr_get_mesh_id - to return the ID of the associated mesh ------------------------------------------------------------
Field_id | returns: >0 - ID of the associated mesh, <0 - error code in: approximation field ID |
int apr_get_mixed_nreq | ( | int | Field_id | ) |
int apr_get_mixed_pdeg | ( | int | Field_id, | |
int * | Pdeg_vec | |||
) |
----------------------------------------------------------- apr_get_mixed_pdeg - to get approximation pdeg associated with first or second field in mixed approximation ------------------------------------------------------------
Field_id | returns: >0 - success code, <0 - error code | |
Pdeg_vec | in: approximation field ID out: degree of approximation symbol |
int apr_get_mixed_second_field_id | ( | int | Field_id | ) |
----------------------------------------------------------- apr_get_mixed_second_field_id - to return ID of second field in mixed approximation ------------------------------------------------------------
Field_id | returns: >0 - ID of the associated second field id in mixed, <0 - error code in: approximation primary field ID |
int apr_get_nr_sol | ( | int | Field_id | ) |
----------------------------------------------------------- apr_get_nr_sol - to return the number of solution vectors stored ------------------------------------------------------------
Field_id | returns: >0 - number of solution vectors, <0 - error code in: approximation field ID |
int apr_get_nrdofs_glob | ( | int | Field_id | ) |
-------------------------------------------------------- apr_get_nrdofs_glob - to return a global dimension of the problem ---------------------------------------------------------
Field_id | returns: global dimension of the problem in: field ID |
int apr_get_nreq | ( | int | Field_id | ) |
----------------------------------------------------------- apr_get_nreq - to return the number of components in solution vector ------------------------------------------------------------
Field_id | returns: >0 - number of solution components, <0 - error code in: approximation field ID |
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
int apr_get_stiff_mat_data | ( | int | Field_id, | |
int | El_id, | |||
int | Comp_sm, | |||
char | Transpose, | |||
int | Pdeg_in, | |||
int | Nreq_in, | |||
int * | Nr_dof_ent, | |||
int * | List_dof_ent_type, | |||
int * | List_dof_ent_id, | |||
int * | List_dof_ent_nrdofs, | |||
int * | Nrdofs_loc, | |||
double * | Stiff_mat, | |||
double * | Rhs_vect | |||
) |
----------------------------------------------------------- apr_get_stiff_mat_data - to return data on dof entities for an element and to compute or rewrite element's stiffness matrix and RHSV ------------------------------------------------------------
El_id | in: approximation field ID | |
Comp_sm | in: unique identifier of the element | |
Transpose | in: indicator for the scope of computations: APC_NO_COMP - do not compute anything APC_COMP_SM - compute entries to stiff matrix only APC_COMP_RHS - compute entries to rhs vector only APC_COMP_BOTH - compute entries for sm and rhsv APC_REWR_SM - rewrite only entries to stiff matrix only APC_REWR_RHS - rewrite only entries to rhs vector only APC_REWR_BOTH - rewrite only entries for sm and rhsv | |
Pdeg_in | in: perform transposition while rewriting 'y' or 'Y' - yes, otherwise - no | |
Nreq_in | in: enforced degree of polynomial (if > 0 ) | |
Nr_dof_ent | in: enforced nreq (if > 0 ) | |
List_dof_ent_type | in: size of arrays, out: no of filled entries, i.e. number of mesh entities with which dofs and stiffness matrix blocks are associated | |
List_dof_ent_id | out: list of no of dofs for 'dof' entity | |
List_dof_ent_nrdofs | out: list of no of dofs for 'dof' entity | |
Nrdofs_loc | out: list of no of dofs for 'dof' entity | |
Stiff_mat | in(optional): size of Stiff_mat and Rhs_vect out(optional): actual number of dofs per integration entity | |
Rhs_vect | out(optional): stiffness matrix stored columnwise out(optional): rhs vector |
int apr_init_field | ( | char | Field_type, | |
int | Control, | |||
int | Mesh_id, | |||
int | Nreq, | |||
int | Nr_sol, | |||
int | Pdeg_in, | |||
char * | Filename, | |||
double(*)(int, double *, int) | Fun_p | |||
) |
----------------------------------------------------------- apr_init_field - to initiate new approximation field and read its control parameters ------------------------------------------------------------
Field_type | returns: >0 - field ID, <0 - error code | |
Control | options: s - standard c - discontinuous with complete basis t - discontinuous with tensor product basis | |
Mesh_id | in: control variable: APC_INIT - to initialize the field to zero APC_READ - to read field values from the file APC_INIT - to initialize the field using function provided by the problem dependent module | |
Nreq | in: ID of the corresponding mesh | |
Nr_sol | in: number of equations - solution vector components | |
Pdeg_in | in: number of solution vectors for each dof entity | |
Filename | in: degree of approximating polynomial and geometry in format [psg] p - primary field degree / s - secondary field degree for mixe default 0 / g - geometry | |
Fun_p | in: name of the file to read approximation data pointer to function that provides problem dependent initial condition data |
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(*)(double *, double *, double *, double *) | Fun_p | |||
) |
-------------------------------------------------------- apr_L2_proj - to L2 project a function onto an element ---------------------------------------------------------
Field_id | returns: >0 - success, <=0 - failure | |
Mode | in: field ID | |
El | in: mode of operation <-1 - projection from ancestor to father the value is the number of ancestors -1 - projection from father to son >0 - projection of function, the value is a flag for routine returning function value at point | |
Pdeg_vec | in: element number | |
Dofs | in: element degree of approximation | |
El_from | out: workspace for degress of freedom of El NULL - write to data structure | |
Pdeg_vec_from | in: list of elements to provide function | |
Dofs_from | in: degree of polynomial for each El_from if element Pdeg is a vector - its components must be suitably placed in Pdeg_vec_from | |
Fun_p | in: Dofs of El_from or... in: pointer to function with field values and its derivatives |
int apr_limit_deref | ( | int | Field_id, | |
int | El_id | |||
) |
----------------------------------------------------------- apr_limit_deref - to return whether derefinement is allowed or not the routine does not use approximation data structures but the result depends on the approximation method ------------------------------------------------------------
El_id | in: approximation field ID in: unique identifier of the element |
int apr_limit_ref | ( | int | Field_id, | |
int | El_id | |||
) |
----------------------------------------------------------- apr_limit_ref - to return whether refinement is allowed or not the routine does not use approximation data structures but the result depends on the approximation method ------------------------------------------------------------
El_id | in: approximation field ID in: unique identifier of the element |
int apr_module_introduce | ( | char * | Approx_name | ) |
----------------------------------------------------------- apr_module_introduce - to return the approximation method's name ------------------------------------------------------------
Approx_name | returns: >=0 - success code, <0 - error code out: the name of the approximation method |
int apr_move_node | ( | int | Field_id, | |
int | Node_id, | |||
int | Node_type, | |||
double * | Shift_vec | |||
) |
----------------------------------------------------------- apr_move_node - to move real geometric node by vector, node is related to vertex / edge or face ------------------------------------------------------------
Field_id | returns: >0 - success code, <0 - error code |
int apr_node_coor | ( | int | Field_id, | |
int | Node_id, | |||
int | Node_type, | |||
double * | coord | |||
) |
----------------------------------------------------------- apr_node_coor - to return node cordinates related to vertices / edges or faces ------------------------------------------------------------
Field_id | returns: >0 - success code, <0 - error code |
int apr_num_int_el | ( | int | Problem_id, | |
int | Field_id, | |||
int | El_id, | |||
int | Comp_sm, | |||
int * | Pdeg_vec, | |||
double * | Sol_dofs_k, | |||
double * | Sol_dofs_n, | |||
int * | diagonal, | |||
double * | Stiff_mat, | |||
double * | Rhs_vect | |||
) |
----------------------------------------------------------- apr_num_int_el - to perform numerical integration for an element ------------------------------------------------------------
!!!!! OLD OBSOLETE VERSION !!!!!!
!!!!! OLD OBSOLETE VERSION !!!!!!
!!!!! OLD OBSOLETE VERSION !!!!!!
!!!!! OLD OBSOLETE VERSION !!!!!!
----------------------------------------------------------------------!
--------------------- LOOP OVER GAUSS POINTS -------------------------!
----------------------------------------------------------------------!
!!!!! OLD OBSOLETE VERSION !!!!!!
----------------------------------------------------------------------!
--------------------- LOOP OVER GAUSS POINTS -------------------------!
----------------------------------------------------------------------!
El_id | in: approximation field ID | |
Comp_sm | in: unique identifier of the element | |
Pdeg_vec | in: indicator for the scope of computations: APC_NO_COMP - do not compute anything APC_COMP_SM - compute entries to stiff matrix only APC_COMP_RHS - compute entries to rhs vector only APC_COMP_BOTH - compute entries for sm and rhsv | |
Sol_dofs_k | in: enforced degree of polynomial (if !=NULL ) | |
Sol_dofs_n | in: solution dofs from previous iteration (for nonlinear problems) | |
diagonal | in: solution dofs from previous time step (for nonlinear problems) | |
Stiff_mat | array of indicators whether coefficient matrices are diagonal | |
Rhs_vect | out: stiffness matrix stored columnwise out: rhs vector |
int apr_prepare_integration_parameters | ( | int | Field_id, | |
int | El_id, | |||
int * | Geo_order, | |||
int * | Num_geo_dofs, | |||
double * | Geo_dofs, | |||
int * | El_mate, | |||
int * | Base, | |||
int * | Pdeg_vec, | |||
int * | Num_shap, | |||
int * | Nreq, | |||
int * | Num_dofs | |||
) |
----------------------------------------------------------- apr_prepare_integration_parameters - used e.g. by apr_num_int_el ------------------------------------------------------------
El_id | in: approximation field ID | |
Geo_order | in: element ID | |
Num_geo_dofs | out: geometrical order of approximation | |
Geo_dofs | out: number of geometrical degrees of freedom | |
El_mate | out: geometrical degrees of freedom | |
Base | out: material index (in materials database) | |
Pdeg_vec | out: type of basis functions | |
Num_shap | out: degree of approximation symbol or vector | |
Nreq | out: number of shape functions | |
Num_dofs | out: number of components for unknowns out: number of scalar dofs (num_dofs = nreq*num_shap) |
int apr_proj_dof_ref | ( | int | Field_id, | |
int | El, | |||
int | Max_elem_id, | |||
int | Max_face_id, | |||
int | Max_edge_id, | |||
int | Max_vert_id | |||
) |
----------------------------------------------------------- apr_proj_dof_ref - to rewrite dofs after modifying the mesh ------------------------------------------------------------
El | in: approximation field ID | |
Max_elem_id | in: >0 - rewrite after one [de]refinement of el <=0 - rewrite after massive [de]refinements | |
Max_face_id | in: maximal element (face, etc.) id | |
Max_edge_id | before and after refinements |
int apr_read_ent_dofs | ( | int | Field_id, | |
int | Ent_type, | |||
int | Ent_id, | |||
int | Ent_nrdofs, | |||
int | Vect_id, | |||
double * | Vect_dofs | |||
) |
----------------------------------------------------------- apr_read_ent_dofs - to read a vector of dofs associated with a given mesh entity from approximation field data structure ------------------------------------------------------------
Field_id | returns: >=0 - success code, <0 - error code | |
Ent_type | in: approximation field ID | |
Ent_id | in: type of mesh entity | |
Ent_nrdofs | in: mesh entity ID | |
Vect_id | in: number of dofs associated with the entity | |
Vect_dofs | in: vector ID in case of multiple solution vectors out: dofs read from data structure |
int apr_refine | ( | int | Field_id, | |
int | El_id | |||
) |
----------------------------------------------------------- apr_refine - to refine an element or the whole mesh checking mesh irregularity ------------------------------------------------------------
Field_id | returns: >=0 - success code, <0 - error code | |
El_id | in: field ID in: element ID or -1 (MMC_DO_UNI_REF) for uniform refinement |
int apr_rewr_sol | ( | int | Field_id, | |
int | Sol_from, | |||
int | Sol_to | |||
) |
----------------------------------------------------------- apr_rewr_sol - to rewrite solution from one vector to another ------------------------------------------------------------
Sol_from | in: data structure to be used | |
Sol_to | in: ID of vector to read solution from in: ID of vector to write solution to |
int apr_set_el_geo_pdeg | ( | int | Field_id, | |
int | El_id, | |||
int * | Pdeg_vec | |||
) |
----------------------------------------------------------- apr_set_el_geo_pdeg - to set the degree of approximation associated with geometric transformation of element ------------------------------------------------------------
Field_id | returns: >0 - success code, <0 - error code | |
El_id | in: approximation field ID | |
Pdeg_vec | in: element ID in: degree of approximation symbol |
int apr_set_el_pdeg | ( | int | Field_id, | |
int | El_id, | |||
int * | Pdeg | |||
) |
----------------------------------------------------------- apr_set_el_pdeg - to set the degree of approximation vector associated with a given element ------------------------------------------------------------
Field_id | returns: >0 - success code, <0 - error code | |
El_id | in: approximation field ID | |
Pdeg | in: element ID out: degree of approximation symbol |
int apr_set_ent_pdeg | ( | int | Field_id, | |
int | Ent_type, | |||
int | Ent_id, | |||
int | Pdeg | |||
) |
----------------------------------------------------------- apr_set_ent_pdeg - to set the degree of approximation index associated with a given mesh entity ------------------------------------------------------------
Field_id | returns: >0 - success code, <0 - error code | |
Ent_type | in: approximation field ID | |
Ent_id | in: type of mesh entity | |
Pdeg | in: mesh entity ID in: degree of approximation |
int apr_set_ini_con | ( | int | Field_id, | |
double(*)(int, double *, int) | Fun_p | |||
) |
----------------------------------------------------------- apr_set_ini_con - to set an initial condition ------------------------------------------------------------
Field_id | returns: >=0 - success code, <0 - error code | |
Fun_p | in: approximation field ID pointer to function that provides problem dependent initial condition data |
int apr_set_quadr_2D | ( | int | Fa_type, | |
int | Base_type, | |||
int * | Pdeg_vec, | |||
int * | Ngauss, | |||
double * | Xg, | |||
double * | Wg | |||
) |
-------------------------------------------------------- apr_set_quadr_2D - to prepare quadrature data for a given face ---------------------------------------------------------
Base_type | in: type of a face | |
Pdeg_vec | in: type of basis functions: 1 (APC_TENSOR) - tensor product 2 (APC_COMPLETE) - complete polynomials | |
Ngauss | in: element degree of polynomial | |
Xg | out: number of gaussian points | |
Wg | out: coordinates of gaussian points out: weights associated with points |
int apr_set_quadr_2D_penalty | ( | int | Fa_type, | |
int | Base_type, | |||
int * | Pdeg_vec, | |||
int * | Ngauss, | |||
double * | Xg, | |||
double * | Wg | |||
) |
-------------------------------------------------------- apr_set_quadr_2D_penalty - to prepare penalty quadrature data for a given face ---------------------------------------------------------
Base_type | in: type of a face | |
Pdeg_vec | in: type of basis functions: (APC_TENSOR) - tensor product (APC_COMPLETE) - complete polynomials | |
Ngauss | in: element degree of polynomial | |
Xg | out: number of gaussian points | |
Wg | out: coordinates of gaussian points out: weights associated with points |
int apr_set_quadr_3D | ( | int | Base_type, | |
int * | Pdeg_vec, | |||
int * | Ngauss, | |||
double * | Xg, | |||
double * | Wg | |||
) |
-------------------------------------------------------- apr_set_quadr_3D - to prepare quadrature data for a given element ---------------------------------------------------------
Pdeg_vec | in: type of basis functions: 1 (APC_TENSOR) - tensor product 2 (APC_COMPLETE) - complete polynomials | |
Ngauss | in: element degree of polynomial | |
Xg | out: number of gaussian points | |
Wg | out: coordinates of gaussian points out: weights associated with points |
int apr_shape_fun_3D | ( | int | Base_type, | |
int | Pdeg, | |||
double * | Eta, | |||
double * | Base_phi, | |||
double * | Base_dphix, | |||
double * | Base_dphiy, | |||
double * | Base_dphiz | |||
) |
-------------------------------------------------------- apr_shape_fun_3D - to compute values of shape functions and their local derivatives at a point within the master 3D element ----------------------------------------------------------
Base_type | returns: the number of shape functions (<=0 - failure) | |
Pdeg | in: type of basis functions: REMARK: type of basis functions differentiates element types as well define APC_BASE_TENSOR_DG 1 - tensor product for prismatic elements and DG define APC_BASE_COMPLETE_DG 2 - complete polynomials for prismatic elements and DG define APC_BASE_PRISM_STD 3 // for linear prismatic elements define APC_BASE_TETRA_STD 4 // for linear tetrahedral elements | |
Eta | in: degree of polynomial - can be either | |
Base_phi | in: local coord of the considered point | |
Base_dphix | out: basis functions | |
Base_dphiy | out: x derivative of basis functions | |
Base_dphiz | out: y derivative of basis functions out: z derivative of basis functions |
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 | |||
) |
-------------------------------------------------------- apr_sol_xglob - to return the solution at a point with global coordinates specified. The procedure finds, for a given global point, the respective local coordinates within the proper initial mesh element, than computes corresponding local coordinates within an active ancestor of the initial element and finally finds the value of solution. There may be several initial mesh elements, several ancestors and several values due to the discontinuity of approximate solution. ---------------------------------------------------------
Field_id | returns: >0 - success, <=0 - failure | |
Xglob | in: field ID | |
Nb_sol | in: global coordinates of a point | |
El | in: which solution to take: 1 - sol_1, 2 - sol_2 | |
Xloc | out: list of element numbers, El[0] - number of elements on the list | |
Sol | out: list of local coordinates within elements | |
Dxsol | out: list of solutions at the point | |
Dysol | out: list of derivatives wrt x of solution | |
Dzsol | out: list of derivatives wrt y of solution | |
Close_proximity_precision | out: list of derivatives wrt z of solution |
int apr_write_ent_dofs | ( | int | Field_id, | |
int | Ent_type, | |||
int | Ent_id, | |||
int | Ent_nrdofs, | |||
int | Vect_id, | |||
double * | Vect_dofs | |||
) |
----------------------------------------------------------- apr_write_ent_dofs - to write a vector of dofs associated with a given mesh entity to approximation field data structure ------------------------------------------------------------
Field_id | returns: >=0 - success code, <0 - error code | |
Ent_type | in: approximation field ID | |
Ent_id | in: type of mesh entity | |
Ent_nrdofs | in: mesh entity ID | |
Vect_id | in: number of dofs associated with the entity | |
Vect_dofs | in: vector ID in case of multiple solution vectors |
int apr_write_field | ( | int | Field_id, | |
int | Nreq, | |||
int | Select, | |||
double | Accuracy, | |||
char * | Filename | |||
) |
-------------------------------------------------------- apr_write_field - to dump-out field data in the standard MOD_FEM format ---------------------------------------------------------
Field_id | returns: >=0 - success code, <0 - error code | |
Nreq | in: field ID | |
Select | in: number of equations (scalar dofs) | |
Accuracy | in: parameter to select written vectors | |
Filename | in: parameter specyfying accuracy (put 0 for full accuracy in "%g" format) in: name of the file to write field data |