00001 /************************************************************************ 00002 File pdh_forming.h - problem module's types and functions 00003 BY ASSUMPTION NOT CALLED BY OTHER MODULES' FUNCTIONS 00004 (functions called by other modules are in pdh_forming_weakform.h) 00005 00006 Contains problem module defines (see below) 00007 00008 00009 Contains declarations of routines: 00010 BY ASSUMPTION NOT CALLED BY OTHER MODULES' FUNCTIONS 00011 (functions called by other modules are in pdh_forming_problem.h) 00012 pdr_forming_mixed_time_integration - time integration driver (in time_integration) 00013 pdr_forming_mixed_ZZ_error - to compute estimated norm of error based on 00014 recovered first derivatives - the notorious ZZ error estimate 00015 pdr_forming_mixed_err_indi_ZZ - to return error indicator for an element, 00016 based on ZZ first derivative recovery 00017 pdr_forming_mixed_adapt - to enforce adaptation strategy for ns problem (in adapt) 00018 pdr_forming_mixed_dump_data - dump data to files (in input_output) 00019 pdr_forming_mixed_write_paraview - to write graphics data to file (in input_output) 00020 00021 utilities: 00022 pdr_forming_mixed_post_process 00023 pdr_forming_mixed_write_profile 00024 pdr_forming_mixed_initial_condition 00025 00026 ------------------------------ 00027 History: 00028 initial version - Krzysztof Banas (pobanas@cyf-kr.edu.pl) 00029 *************************************************************************/ 00030 00031 #include <stdio.h> 00032 00033 /* problem dependent interface with the PDEs */ 00034 #include "pdh_intf.h" 00035 00036 /* types and functions related to problem structures */ 00037 #include "pdh_forming_mixed_problem.h" 00038 // bc and material header files are included in problem header files 00039 00040 00041 #ifdef __cplusplus 00042 extern "C" 00043 { 00044 #endif 00045 00046 /**************************************/ 00047 /* DEFINES */ 00048 /**************************************/ 00049 /* Rules: 00050 /* - always uppercase */ 00051 /* - name starts with PDC_ */ 00052 00053 #define PDC_FORMING_MIXED_ID 1 00054 00055 /**************************************/ 00056 /* TYPES */ 00057 /**************************************/ 00058 /* Rules: 00059 /* - type name starts always witn pdt_ */ 00060 00061 00062 /**************************************/ 00063 /* GLOBAL VARIABLES */ 00064 /**************************************/ 00065 /* Rules: 00066 /* - name always begins with pdv_ */ 00067 /* - constants always uppercase and start with PDC_ */ 00068 00069 extern double pdv_forming_mixed_timer_all; 00070 extern double pdv_forming_mixed_timer_pdr_comp_el_stiff_mat; 00071 extern double pdv_forming_mixed_timer_pdr_comp_fa_stiff_mat; 00072 00073 00074 // ID of the current problem 00075 extern int pdv_forming_mixed_current_problem_id; /* ID of the current problem */ 00076 // problem structure for plast_flow module 00077 extern pdt_forming_mixed_problem pdv_forming_mixed_problem; 00078 00079 #ifdef PARALLEL 00080 extern int pdv_exchange_table_index; // for a single problem 00081 #endif 00082 00083 /**************************************/ 00084 /* INTERNAL PROCEDURES */ 00085 /**************************************/ 00086 /* Rules: 00087 /* - name always begins with pdr_ */ 00088 /* - argument names start uppercase */ 00089 00090 00094 extern void pdr_forming_mixed_time_integration( 00095 char* Work_dir, 00096 FILE *Interactive_input, 00097 FILE *Interactive_output); 00098 00099 00103 extern int pdr_forming_mixed_adapt( 00104 char* Work_dir, 00105 FILE *Interactive_input, 00106 FILE *Interactive_output); 00107 00112 double pdr_forming_mixed_ZZ_error( 00113 /* returns - Zienkiewicz-Zhu error for the whole mesh */ 00114 char* Work_dir, 00115 FILE *Interactive_input, 00116 FILE *Interactive_output 00117 ); 00118 00123 extern double pdr_forming_mixed_err_indi_ZZ( 00124 /* returns error indicator for an element */ 00125 int Problem_id, /* in: data structure to be used */ 00126 int El /* in: element number */ 00127 ); 00128 00132 extern int pdr_forming_mixed_dump_data( 00133 char* Work_dir, 00134 FILE *Interactive_input, 00135 FILE *Interactive_output 00136 ); 00137 00141 extern int pdr_forming_mixed_write_paraview( 00142 char* Work_dir, 00143 FILE *Interactive_input, 00144 FILE *Interactive_output 00145 ); 00146 00147 00148 // IN: MAIN/PDS_PLAST_FLOW_UTIL.C 00149 00153 double pdr_forming_mixed_post_process( 00154 char* Work_dir, 00155 FILE *Interactive_input, 00156 FILE *Interactive_output 00157 ); 00158 00162 int pdr_forming_mixed_write_profile( 00163 char* Work_dir, 00164 FILE *Interactive_input, 00165 FILE *Interactive_output 00166 ); 00167 00173 double pdr_forming_mixed_initial_condition( 00174 int Field_id, // field_id - each problem should know its field id 00175 double *Coor, // point coordinates 00176 int Sol_comp_id // solution component 00177 ); 00178 00184 double pdr_strain_initial_condition( 00185 int Field_id, // field_id - each problem should know its field id 00186 double *Coor, // point coordinates 00187 int Sol_comp_id // solution component 00188 ); 00189 00190 #ifdef __cplusplus 00191 } 00192 00193 #endif