00001 /************************************************************************ 00002 File pdh_heat.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_heat_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_heat_problem.h) 00012 pdr_heat_init - to initialize problem data 00013 pdr_heat_time_integration - time integration driver 00014 pdr_heat_error - to compute estimated norm of error 00015 pdr_heat_ZZ_error - to compute estimated norm of error based on 00016 recovered first derivatives - the notorious ZZ error estimate 00017 pdr_heat_err_indi_ZZ - to return error indicator for an element, 00018 based on ZZ first derivative recovery 00019 pdr_heat_adapt - to enforce adaptation strategy for a given problem 00020 pdr_heat_dump_data - dump data to files 00021 pdr_heat_write_paraview - to write graphics data to a disk file 00022 00023 ------------------------------ 00024 History: 00025 initial version - Krzysztof Banas 00026 2011 - Przemyslaw Plaszewski (pplaszew@agh.edu.pl) 00027 2011 - Aleksander Siwek (Aleksander.Siwek@agh.edu.pl) 00028 2012 - Krzysztof Banas (pobanas@cyf-kr.edu.pl) 00029 2016 - Aleksander Siwek (Aleksander.Siwek@agh.edu.pl) 00030 *************************************************************************/ 00031 00032 #ifndef PDH_HEAT 00033 #define PDH_HEAT 00034 00035 #include <stdio.h> 00036 00037 /* problem dependent interface with the PDEs */ 00038 #include "pdh_intf.h" 00039 00040 // bc and material header files are included in problem header files 00041 #include "pdh_heat_problem.h" 00042 00043 #ifdef __cplusplus 00044 extern "C" 00045 { 00046 #endif 00047 00048 /**************************************/ 00049 /* DEFINES */ 00050 /**************************************/ 00051 /* Rules: 00052 /* - always uppercase */ 00053 /* - name starts with PDC_ */ 00054 00055 #define PDC_HEAT_ID 2 // convention adopted from ns_supg_heat 00056 // may be any number since it is assumed for the time being that 00057 // there is only one problem 00058 00059 /**************************************/ 00060 /* TYPES */ 00061 /**************************************/ 00062 /* Rules: 00063 /* - type name starts always witn pdt_ */ 00064 00065 00066 /**************************************/ 00067 /* GLOBAL VARIABLES */ 00068 /**************************************/ 00069 /* Rules: 00070 /* - name always begins with pdv_ */ 00071 /* - constants always uppercase and start with PDC_ */ 00072 00073 extern double pdv_heat_timer_all; 00074 extern double pdv_heat_timer_pdr_comp_el_stiff_mat; 00075 extern double pdv_heat_timer_pdr_comp_fa_stiff_mat; 00076 00077 // ID of the current problem 00078 extern int pdv_heat_current_problem_id; /* ID of the current problem */ 00079 // problem structure for heat module 00080 extern pdt_heat_problem pdv_heat_problem; 00081 00082 #ifdef PARALLEL 00083 extern int pdv_exchange_table_index; // for a single problem 00084 #endif 00085 00086 /**************************************/ 00087 /* INTERNAL PROCEDURES */ 00088 /**************************************/ 00089 /* Rules: 00090 /* - name always begins with pdr_ */ 00091 /* - argument names start uppercase */ 00092 00096 int pdr_heat_init( 00097 char* Work_dir, 00098 FILE *Interactive_input, 00099 FILE *Interactive_output 00100 ); 00101 00105 extern void pdr_heat_time_integration( 00106 char* Work_dir, 00107 FILE *Interactive_input, 00108 FILE *Interactive_output); 00109 00114 extern double pdr_heat_error( 00115 char* Work_dir, 00116 FILE *Interactive_input, 00117 FILE *Interactive_output); 00118 00123 double pdr_heat_ZZ_error( 00124 /* returns - Zienkiewicz-Zhu error for the whole mesh */ 00125 char* Work_dir, 00126 FILE *Interactive_input, 00127 FILE *Interactive_output 00128 ); 00129 00134 extern double pdr_heat_err_indi_ZZ( 00135 /* returns error indicator for an element */ 00136 int Problem_id, /* in: data structure to be used */ 00137 int El /* in: element number */ 00138 ); 00139 00143 extern int pdr_heat_adapt( 00144 char* Work_dir, 00145 FILE *Interactive_input, 00146 FILE *Interactive_output); 00147 00151 extern int pdr_heat_dump_data( 00152 char* Work_dir, 00153 FILE *Interactive_input, 00154 FILE *Interactive_output 00155 ); 00156 00160 extern int pdr_heat_write_paraview( 00161 char* Work_dir, 00162 FILE *Interactive_input, 00163 FILE *Interactive_output 00164 ); 00165 00166 #ifdef __cplusplus 00167 } 00168 #endif 00169 00170 #endif