00001 00034 /****************************************************************************/ 00035 /* */ 00036 /* include files */ 00037 /* system include files */ 00038 /* application include files */ 00039 /* */ 00040 /****************************************************************************/ 00041 00042 #ifndef __SCONFMP__ 00043 #define __SCONFMP__ 00044 00045 #include <math.h> 00046 #include <stdlib.h> 00047 #include <stdio.h> 00048 #include <string.h> 00049 00050 /* include ug header files */ 00051 #include "gm.h" /* for data structure */ 00052 #include "shapes.h" /* general element shape calculations */ 00053 #include "ugstruct.h" /* for GetStringValue */ 00054 #include "misc.h" /* for MIN, MAX, PI, ... */ 00055 #include "ugdevices.h" /* for UserWrite, PrintErrorMessage */ 00056 #include "commands.h" /* for GetCurrentMultigrid */ 00057 #include "cmdint.h" /* for CreateCommand */ 00058 #include "cmdline.h" /* for command line processing */ 00059 #include "general.h" /* for general desclarations */ 00060 #include "np.h" /* for NUMPROC implementation */ 00061 #include "assemble.h" /* for CreateCLASS implementation */ 00062 #include "parallel.h" /* required for parallel operation */ 00063 #include "compiler.h" 00064 #include "namespace.h" 00065 00066 /* include external proprietary header files */ 00067 #ifdef HAVE_IPPL 00068 #include "Ippl.h" 00069 #endif 00070 00071 /* include our own header files */ 00072 #include "disconst.h" /* discretization constants */ 00073 #include "tdwaveforms.h" /* time doman source waveforms */ 00074 #include "sconfmppec.h" /* include functions for implicit electromagneti boundary conditions */ 00075 #include "aqhdSysParams.h" /* get system parameters from standard include file */ 00076 #include "aqhdReleaseInfo.h" /* get release information */ 00077 #include "aqhdPhysicoMath.h" /* get mathematical & physical constants */ 00078 #include "aqhdBaseTypes.h" /* get mathematical & physical constants */ 00079 #include "sconfmpdisc.h" /* get discretization of Maxwell equations */ 00080 #include "whitney.h" /* include basis functions */ 00081 #include "linmaterials.h" /* include NUMPROC definitions for linear, non-dispersive materials */ 00082 #include "iinternalsrc.h" /* include NUMPROC definitions for internal excitation aka source */ 00083 00084 #ifdef HAVE_RLOG 00085 /* Include the files for rlog. */ 00086 #include <rlog/rlog.h> 00087 #include <rlog/rloglocation.h> 00088 #include <rlog/Error.h> 00089 #include <rlog/RLogChannel.h> 00090 #include <rlog/StdioNode.h> 00091 // Include this if you want to log the time. 00092 #include <rlog/RLogTime.h> 00093 #endif // HAVE_RLOG 00094 00095 using namespace rlog; 00096 USING_UG_NAMESPACE 00097 USING_UGDIM_NAMESPACE 00098 00099 #ifdef ModelP 00100 USING_PPIF_NAMESPACE 00101 #endif 00102 00103 /****************************************************************************/ 00104 /* */ 00105 /* defines in the following order */ 00106 /* */ 00107 /* compile time constants defining static data size (i.e. arrays) */ 00108 /* other constants */ 00109 /* macros */ 00110 /* */ 00111 /****************************************************************************/ 00112 00113 #define T_SELF_CONSISTENT_MAXWELL_PARICLE_SOLVER_CLASS_NAME "sconfmpclass" 00114 00115 /****************************************************************************/ 00116 /* */ 00117 /* data structures used in this source file (exported data structures are */ 00118 /* in the corresponding include file!) */ 00119 /* */ 00120 /****************************************************************************/ 00121 00122 /* declare NUMPROC class and methods for 'NP_IMPLICIT_TIME_DOMAIN_INTEGRATION' */ 00123 00124 typedef struct 00125 { 00126 NP_BASE base; // inherits base class 00127 00128 NP_LINEAR_MATERIALS *linmat; // pointer to NUMPROC that provides linear, non-dispersive electrical materials 00129 NP_IMPLICIT_INTERNAL_SOURCE *iinternalsrc; // pointer to NUMPROCE that provides internal source for the electric field 00130 00131 DOUBLE dt; // time step for explicit scheme 00132 DOUBLE t; // current time 00133 00134 INT fl; // from level with respect to multigrid 00135 INT tl; // to level with respect to multigrid 00136 00137 VECDATA_DESC* efldp; // pointer to electric field vector at t_(n+1) 00138 VECDATA_DESC* efldn; // pointer to electric field vector at t_n 00139 VECDATA_DESC* efldm; // pointer to electric field vector at t_(m-1) 00140 00141 VECDATA_DESC* rhs; // pointer to right hand side vector 00142 VECDATA_DESC* force; // pointer to excitation aka force vector 00143 00144 VECDATA_DESC* hv1; // pointer to auxiliary vector, used in implicit time update scheme 00145 VECDATA_DESC* hv2; // pointer to auxiliary vector, used in implicit time update scheme 00146 00147 MATDATA_DESC* tmat; // pointer to [T_ij] matrix structure 00148 MATDATA_DESC* rmat; // pointer to [R_ij] matrix structure 00149 MATDATA_DESC* smat; // pointer to [S_ij] matrix structure 00150 00151 MATDATA_DESC* amat; // pointer to matrix A in final system A * x = rhs 00152 00153 MATDATA_DESC* hmat1; // pointer to auxiliary matrix structure, used in implicit time update scheme 00154 MATDATA_DESC* hmat2; // pointer to auxiliary matrix structure, used in implicit time update scheme 00155 00156 INT (*Assemble)(NP_BASE *base, INT, char**); // pointer to Assembling function 00157 INT (*PreProcess)(NP_BASE *base, INT, char**); // pointer to PreProcessing function 00158 INT (*PostProcess)(NP_BASE *base, INT, char**); // pointer to PostProcessing function 00159 00160 } NP_SELF_CONSISTENT_MAXWELL_PARTICLE_SOLVER; 00161 00162 00163 /****************************************************************************/ 00164 /* */ 00165 /* definition of exported global variables */ 00166 /* */ 00167 /****************************************************************************/ 00168 00169 /****************************************************************************/ 00170 /* */ 00171 /* definition of variables global to this source file only (static!) */ 00172 /* */ 00173 /****************************************************************************/ 00174 00175 /****************************************************************************/ 00176 /* */ 00177 /* forward declarations of functions used before they are defined */ 00178 /* */ 00179 /****************************************************************************/ 00180 00181 00182 00183 /****************************************************************************/ 00184 /****************************************************************************/ 00185 /* Discretization */ 00186 /****************************************************************************/ 00187 /****************************************************************************/ 00188 00189 INT InitSelfConsistentFieldMaxwellParticleSolver(void); /* check class & methods into UG */ 00190 00191 #endif 00192