00001 // rights - copyright by benedikt oswald, 2002-2003. 00002 // rights - universitas ruperto carola heidelbergensis 00003 // project - aqhdes2003 00004 // file name - cases.h 00005 // file type - C include file 00006 // objective - install a specific problem into UG 00007 // creation - 2003 feb 10 ~ 17:25:00 by benedikt oswald - implemented problem description 00008 // modified - 2003 sep 17 ~ 21:33:00 by benedikt oswald - implemented PDE coefficient functions 00009 // required software - UG 3.1 or higher 00010 // rights for UG - cf. paper by Bastian et al., 1997 00011 // file id - 00012 // inheritance - none 00013 // feature - implement simple benchmark problems to test the 00014 // feature - implementation of the whitney discretization 00015 // feature - of Maxwell's equations; additionally implements 00016 // feature - coefficient functions for the material of the PDE to be solved 00017 // feature - PROBLEM 0 : InitRectangularCavityResonanceProblem : calculates cavity resonances 00018 // feature - PROBLEM 1 : InitCylindricalCavityResonanceProblem : calculates cavity resonances 00019 00020 /****************************************************************************/ 00021 /* */ 00022 /* auto include mechanism and other include files */ 00023 /* */ 00024 /****************************************************************************/ 00025 00026 #ifndef __PROBLEMS__ 00027 #define __PROBLEMS__ 00028 00029 #ifndef __COMPILER__ 00030 #include "compiler.h" 00031 #endif 00032 00033 #ifndef __GM__ 00034 #include "gm.h" 00035 #endif 00036 00037 // include standard C header files 00038 #include <math.h> 00039 #include <stdlib.h> 00040 #include <stdio.h> 00041 #include <string.h> 00042 00043 // include UG specific header files 00044 #include "compiler.h" 00045 #include "evm.h" /* for V_COPY,M_COPY */ 00046 #include "gm.h" 00047 #include "misc.h" 00048 #include "cmdint.h" 00049 #include "commands.h" /* for GetCurrentMultigrid (Quickhack) */ 00050 #include "ugstruct.h" 00051 #include "initug.h" 00052 #include "np.h" /* for NUMPROC implementation */ 00053 #include "scan.h" /* for ReadArgvVecDesc */ 00054 #include "std_domain.h" 00055 #include "general.h" 00056 #include "udm.h" /* for VECDATA_DESC */ 00057 #include "ugdevices.h" 00058 #include "shapes.h" 00059 00060 // proprietary includes 00061 #include "casesdim.h" 00062 #include "linmaterials.h" 00063 00064 /****************************************************************************/ 00065 /* */ 00066 /* defines in the following order */ 00067 /* */ 00068 /* compile time constants defining static data size (i.e. arrays) */ 00069 /* other constants */ 00070 /* macros */ 00071 /* */ 00072 /****************************************************************************/ 00073 00074 #define RECTANGULAR_CAVITY_ELECTROMANGETIC_RESONANCES 0 00075 #define CYLINDRICAL_CAVITY_ELECTROMAGNETIC_RESONANCES 1 00076 00077 /****************************************************************************/ 00078 /* */ 00079 /* data structures exported by the corresponding source file */ 00080 /* */ 00081 /****************************************************************************/ 00082 00083 /****************************************************************************/ 00084 /* */ 00085 /* data structures used in this source file (exported data structures are */ 00086 /* in the corresponding include file!) */ 00087 /* */ 00088 /****************************************************************************/ 00089 00090 /* declare NUMPROC class and methods for 'NP_DISCRETE_MATERIAL_LAYERS'; 00091 which implements a simple model for the situation of a GPR antenna 00092 lying on soil which variable electrical material properties in the z 00093 direction, i.e. in the direction going into the soil; we use the 00094 parameters given below to describe the distribution of material 00095 properties in the air-soil configuration: 00096 00097 - electric material properties vary in the z dimension only 00098 - z axis is directed as in cartesian coordinate system, i.e z=0 at bottom 00099 - fraction of interval filled with air material properties 00100 - use NUMPROC NP_LINEAR_MATERIALS, defined in linmaterials.h 00101 */ 00102 00103 struct np_discrete_layers_z 00104 { 00105 NP_LINEAR_MATERIALS linmat; // uses NP_LINEARMATERIALS NUMPROC 00106 00107 INT nl; // number of layers in z direction 00108 DOUBLE hz; // length of interval over which material properties vary 00109 00110 DOUBLE *lthickness; // tickness of layer in absolute dimensions 00111 DOUBLE *er; // array stores relative permittivity values of discrete layers 00112 DOUBLE *mr; // array stores relative permeability values of discrete layers 00113 DOUBLE *sigma; // array stores ohmic conductivity of discrete layers 00114 DOUBLE *zintrfc; // maximum z coordinate of a layer 00115 }; 00116 typedef struct np_discrete_layers_z NP_DISCRETE_LAYERS_Z; 00117 00118 00119 00120 00121 /****************************************************************************/ 00122 /* */ 00123 /* definition of exported global variables */ 00124 /* */ 00125 /****************************************************************************/ 00126 00127 /****************************************************************************/ 00128 /* */ 00129 /* function declarations */ 00130 /* */ 00131 /****************************************************************************/ 00132 00133 /* INT InitRectangularCavityResonanceProblem(void); */ 00134 00135 INT InitProblems(void); 00136 00137 #endif