itdi.h

00001 // copyright by benedikt oswald, all rights reserved, 2002-2006.
00002 // project - aqhdes2003
00003 // file name - itdi.h
00004 // file type - C include file
00005 // objective - define class and its methods for implicit time domain integration
00006 // objective - of the curl-curl equation
00007 // creation - 2003 jun 10 ~ 14:00:00 by benedikt oswald
00008 // modified - 2003 jun 11 ~ 17:55:00 by benedikt oswald
00009 // required software - UG 3.1 or higher
00010 // rights for UG - cf. paper by Bastian et al., 1997
00011 // file id -
00012 // inheritance - etdi.h
00013 // feature - defines class and its methods of a class, i.e. numproc in UG speak,
00014 // feature - for the implicit time domain integration of the curl-curl equation
00015 // feature - discretized using Galerkin's principle and Whitney edge elements
00016 // feature - of the first kind
00017 
00018 /****************************************************************************/
00019 /*                                                                          */
00020 /* include files                                                            */
00021 /*            system include files                                          */
00022 /*            application include files                                     */
00023 /*                                                                          */
00024 /****************************************************************************/
00025 
00026 #ifndef __ITDI__
00027 #define __ITDI__
00028 
00029 #include <math.h>
00030 #include <stdlib.h>
00031 #include <stdio.h>
00032 #include <string.h>
00033 
00034 #include "gm.h"                             /* for data structure                                                */
00035 #include "shapes.h"                         /* general element shape calculations                                */
00036 #include "ugstruct.h"                       /* for GetStringValue                                                */
00037 #include "misc.h"                           /* for MIN, MAX, PI, ...                                             */
00038 #include "ugdevices.h"                      /* for UserWrite, PrintErrorMessage                                  */ 
00039 #include "commands.h"                       /* for GetCurrentMultigrid                                           */
00040 #include "cmdint.h"                         /* for CreateCommand                                                 */
00041 #include "cmdline.h"                        /* for command line processing                                       */
00042 #include "general.h"                        /* for general desclarations                                         */
00043 #include "np.h"                             /* for NUMPROC implementation                                        */
00044 #include "assemble.h"                       /* for CreateCLASS implementation                                    */
00045 #include "parallel.h"                       /* required for parallel operation                                   */
00046 #include "compiler.h"
00047 #include "namespace.h"
00048 
00049 
00050 /* include our own header files */
00051 #include "disconst.h"                       /* discretization constants                                          */
00052 #include "tdwaveforms.h"                    /* time doman source waveforms                                       */
00053 #include "iembc.h"                          /* include functions for implicit electromagneti boundary conditions */
00054 #include "aqhdSysParams.h"                  /* get system parameters from standard include file                  */
00055 #include "aqhdReleaseInfo.h"                /* get release information                                           */
00056 #include "aqhdPhysicoMath.h"                /* get mathematical & physical constants                             */
00057 #include "aqhdBaseTypes.h"                  /* get mathematical & physical constants                             */
00058 #include "idiscretization.h"                /* get discretization of Maxwell equations                           */
00059 #include "whitney.h"                        /* include basis functions                                           */
00060 #include "linmaterials.h"                   /* include NUMPROC definitions for linear, non-dispersive materials  */
00061 #include "iinternalsrc.h"                   /* include NUMPROC definitions for internal excitation aka source   */ 
00062 
00063 
00064 USING_UG_NAMESPACE
00065 USING_UGDIM_NAMESPACE
00066 
00067 
00068 /****************************************************************************/
00069 /*                                                                          */
00070 /* defines in the following order                                           */
00071 /*                                                                          */
00072 /*        compile time constants defining static data size (i.e. arrays)    */
00073 /*        other constants                                                   */
00074 /*        macros                                                            */
00075 /*                                                                          */
00076 /****************************************************************************/
00077 
00078 #define T_IMPLICIT_TIME_SOLVER_CLASS_NAME "itsclass"
00079 
00080 /****************************************************************************/
00081 /*                                                                          */
00082 /* data structures used in this source file (exported data structures are   */
00083 /*        in the corresponding include file!)                               */
00084 /*                                                                          */
00085 /****************************************************************************/
00086 
00087 /* declare NUMPROC class and methods for 'NP_IMPLICIT_TIME_DOMAIN_INTEGRATION' */
00088 
00089 typedef struct
00090 {
00091     NP_BASE base;                              // inherits base class
00092 
00093     NP_LINEAR_MATERIALS *linmat;               // pointer to NUMPROC that provides linear, non-dispersive electrical materials
00094     NP_IMPLICIT_INTERNAL_SOURCE *iinternalsrc; // pointer to NUMPROCE that provides internal source for the electric field
00095 
00096     DOUBLE dt;                                 // time step for explicit scheme
00097     DOUBLE t;                                  // current time
00098 
00099     INT fl;                                    // from level with respect to multigrid
00100     INT tl;                                    // to level with respect to multigrid
00101 
00102     VECDATA_DESC* efldp;                       // pointer to electric field vector at t_(n+1)
00103     VECDATA_DESC* efldn;                       // pointer to electric field vector at t_n
00104     VECDATA_DESC* efldm;                       // pointer to electric field vector at t_(m-1)
00105  
00106     VECDATA_DESC* rhs;                         // pointer to right hand side vector
00107     VECDATA_DESC* force;                       // pointer to excitation aka force vector
00108 
00109     VECDATA_DESC* hv1;                         // pointer to auxiliary vector, used in implicit time update scheme
00110     VECDATA_DESC* hv2;                         // pointer to auxiliary vector, used in implicit time update scheme
00111 
00112     MATDATA_DESC* tmat;                        // pointer to [T_ij] matrix structure
00113     MATDATA_DESC* rmat;                        // pointer to [R_ij] matrix structure
00114     MATDATA_DESC* smat;                        // pointer to [S_ij] matrix structure
00115 
00116     MATDATA_DESC* amat;                        // pointer to matrix A in final system A * x = rhs
00117 
00118     MATDATA_DESC* hmat1;                       // pointer to auxiliary matrix structure, used in implicit time update scheme
00119     MATDATA_DESC* hmat2;                       // pointer to auxiliary matrix structure, used in implicit time update scheme
00120 
00121     INT (*Assemble)(NP_BASE *base, INT, char**);          // pointer to Assembling function
00122     INT (*PreProcess)(NP_BASE *base, INT, char**);        // pointer to PreProcessing function
00123     INT (*PostProcess)(NP_BASE *base, INT, char**);       // pointer to PostProcessing function
00124 
00125 } NP_IMPLICIT_TIME_SOLVER;
00126 
00127 
00128 /****************************************************************************/
00129 /*                                                                          */
00130 /* definition of exported global variables                                  */
00131 /*                                                                          */
00132 /****************************************************************************/
00133 
00134 /****************************************************************************/
00135 /*                                                                          */
00136 /* definition of variables global to this source file only (static!)        */
00137 /*                                                                          */
00138 /****************************************************************************/
00139 
00140 /****************************************************************************/
00141 /*                                                                          */
00142 /* forward declarations of functions used before they are defined           */
00143 /*                                                                          */
00144 /****************************************************************************/
00145 
00146 
00147 
00148 /****************************************************************************/
00149 /****************************************************************************/
00150 /*                              Discretization                              */
00151 /****************************************************************************/
00152 /****************************************************************************/
00153 
00154 INT InitImplicitTimeDomainIntegration(void); /* check class & methods into UG */
00155 
00156 #endif
00157 

Generated on Fri Oct 26 14:04:29 2007 for acheron3d by  doxygen 1.4.7