00001 // copyright by benedikt oswald, all rights reserved, 2002-2006. 00002 // project - aqhdes2003 00003 // file name - linmaterials.h 00004 // file type - C include file 00005 // objective - define NUMPROC for linear, non-dispersive electrical materials 00006 // creation - 2003 sep 17 ~ 20:56:00 by benedikt oswald 00007 // modified - 00008 // required software - UG 3.1 or higher 00009 // rights for UG - cf. paper by Bastian et al., 1997 00010 // file id - 00011 // inheritance - none 00012 // feature - defines the NUMPROCS required for the implementation of 00013 // feature - linear, non-dispersive electrical material properties, 00014 // feature - such as relative dielectric permittivity, relative magnetic 00015 // feature - permeability and ohmic conductivity 00016 00017 00018 #ifndef __LINEARMATERIALS__ 00019 #define __LINEARMATERIALS__ 00020 00021 #include <math.h> 00022 #include <stdlib.h> 00023 #include <stdio.h> 00024 #include <string.h> 00025 00026 #include "gm.h" /* for data structure */ 00027 #include "shapes.h" /* general element shape calculations */ 00028 #include "ugstruct.h" /* for GetStringValue */ 00029 #include "misc.h" /* for MIN, MAX, PI, ... */ 00030 #include "ugdevices.h" /* for UserWrite, PrintErrorMessage */ 00031 #include "commands.h" /* for GetCurrentMultigrid */ 00032 #include "cmdint.h" /* for CreateCommand */ 00033 #include "cmdline.h" /* for command line processing */ 00034 #include "general.h" /* for general desclarations */ 00035 #include "np.h" /* for NUMPROC implementation */ 00036 #include "assemble.h" /* for CreateCLASS implementation */ 00037 #include "compiler.h" 00038 #include "namespace.h" 00039 00040 00041 // proprietary includes 00042 #include "aqhdSysParams.h" /* get system parameters from standard include file */ 00043 #include "aqhdReleaseInfo.h" /* get release information */ 00044 #include "aqhdPhysicoMath.h" /* get mathematical & physical constants */ 00045 #include "aqhdBaseTypes.h" /* get mathematical & physical constants */ 00046 00047 00048 USING_UG_NAMESPACE 00049 USING_UGDIM_NAMESPACE 00050 00051 00052 /****************************************************************************/ 00053 /* */ 00054 /* defines in the following order */ 00055 /* */ 00056 /* compile time constants defining static data size (i.e. arrays) */ 00057 /* other constants */ 00058 /* macros */ 00059 /* */ 00060 /****************************************************************************/ 00061 00062 #define LINEAR_MATERIALS_CLASS_NAME "linear_materials" 00063 00064 /****************************************************************************/ 00065 /* */ 00066 /* data structures used in this source file (exported data structures are */ 00067 /* in the corresponding include file!) */ 00068 /* */ 00069 /****************************************************************************/ 00070 00071 /* declare NUMPROC class and methods for linear, non-dispersive electrical material properties */ 00072 struct np_linear_materials 00073 { 00074 NP_BASE base; // inherits base class 00075 00076 DOUBLE (*RelativePermittivity)(struct np_linear_materials *, /* pointer to derived object */ 00077 ELEMENT *); /* global coordinates */ 00078 00079 DOUBLE (*TanDeltaDiel)(struct np_linear_materials *, /* pointer to derived object */ 00080 DOUBLE *); /* global coordinates */ 00081 00082 DOUBLE (*RelativePermeability)(struct np_linear_materials *, /* pointer to derived object */ 00083 ELEMENT *); /* global coordinates */ 00084 00085 DOUBLE (*TanDeltaMagnetic)(struct np_linear_materials *, /* pointer to derived object */ 00086 ELEMENT *); /* global coordinates */ 00087 00088 DOUBLE (*OhmicConductivity)(struct np_linear_materials *, /* pointer to derived object */ 00089 ELEMENT *); /* global coordinates */ 00090 00091 }; 00092 typedef struct np_linear_materials NP_LINEAR_MATERIALS; 00093 00094 /****************************************************************************/ 00095 /* */ 00096 /* definition of exported global variables */ 00097 /* */ 00098 /****************************************************************************/ 00099 00100 /****************************************************************************/ 00101 /* */ 00102 /* definition of variables global to this source file only (static!) */ 00103 /* */ 00104 /****************************************************************************/ 00105 00106 /****************************************************************************/ 00107 /* */ 00108 /* forward declarations of functions used before they are defined */ 00109 /* */ 00110 /****************************************************************************/ 00111 00112 /****************************************************************************/ 00113 /****************************************************************************/ 00114 /* */ 00115 /****************************************************************************/ 00116 /****************************************************************************/ 00117 00118 #endif 00119 00120 00121 00122