particleswarm.h

Go to the documentation of this file.
00001 
00072 // include standard header files
00073 #include <math.h>
00074 #include <stdlib.h>
00075 #include <stdio.h>
00076 #include <string.h>
00077 #include <vector>
00078 #include <list>
00079 
00080 // include UG header files
00081 #include "gm.h"                             /* for data structure                                                */
00082 #include "shapes.h"                         /* general element shape calculations                                */
00083 #include "ugstruct.h"                       /* for GetStringValue                                                */
00084 #include "misc.h"                           /* for MIN, MAX, PI, ...                                             */
00085 #include "ugdevices.h"                      /* for UserWrite, PrintErrorMessage                                  */ 
00086 #include "commands.h"                       /* for GetCurrentMultigrid                                           */
00087 #include "cmdint.h"                         /* for CreateCommand                                                 */
00088 #include "cmdline.h"                        /* for command line processing                                       */
00089 #include "general.h"                        /* for general desclarations                                         */
00090 #include "np.h"                             /* for NUMPROC implementation                                        */
00091 #include "assemble.h"                       /* for CreateCLASS implementation                                    */
00092 
00093 // proprietary includes
00094 #include "whitney.h"                        /* include Whitney base function definitions and procedures          */
00095 #include "tdwaveforms.h"                    /* time domain shapes of excitation: gaussian etc.                   */
00096 #include "aqhdSysParams.h"                  /* get system parameters from standard include file                  */
00097 #include "aqhdReleaseInfo.h"                /* get release information                                           */
00098 #include "aqhdPhysicoMath.h"                /* get mathematical & physical constants                             */
00099 #include "aqhdBaseTypes.h"                  /* get mathematical & physical constants                             */
00100 #include "auxiliary.h"
00101 
00102 
00103 #ifdef HAVE_RLOG
00104 /* Include the files for rlog. */
00105 #include <rlog/rlog.h>
00106 #include <rlog/rloglocation.h>
00107 #include <rlog/Error.h>
00108 #include <rlog/RLogChannel.h>
00109 #include <rlog/StdioNode.h>
00110 // Include this if you want to log the time.
00111 #include <rlog/RLogTime.h>
00112 #endif // HAVE_RLOG
00113 
00114 using namespace rlog;
00115 USING_UG_NAMESPACE
00116 USING_UGDIM_NAMESPACE
00117 
00118 #ifdef ModelP
00119 USING_PPIF_NAMESPACE
00120 #endif
00121 
00122 #ifndef PARTICLESWARM_H_
00123 #define PARTICLESWARM_H_
00124 
00125 #define PARTICLE_SWARM_SOURCE_CLASS_NAME "particle_swarm"
00126 
00127 
00128 /* declare NUMPROC class and methods for particleswarm current density source */
00129 struct np_particle_swarm_source
00130 {
00131   NP_BASE base;                            // inherits base class
00132 
00133   INT fl;                                  // from level with respect to multigrid
00134   INT tl;                                  // to level with respect to multigrid
00135   
00136   ELEMENT *theElement;                     // pointer to element containing source location
00137   VECDATA_DESC* force;                     // pointer to excitation aka force vector
00138   
00139   std::vector<std::vector<double> > particlepos;      
00144   // function adapts the discrete system obtained from the FE approach
00145   // by setting the respective coefficients of the involved matrices
00146   DOUBLE (*ParticleSwarmSourceSetup)(struct np_particle_swarm_source *);
00147 
00148   // function calculates the value of the time domain excitation and
00149   // and adapts the right hand side of the linear system to be solved
00150   DOUBLE (*ParticleSwarmSourceUpdate)(struct np_particle_swarm_source *, DOUBLE);
00151 
00152 };
00153 typedef struct np_particle_swarm_source NP_PARTICLE_SWARM_SOURCE;
00154 
00155 
00157 INT InitParticleSwarmSource(void);
00158 
00159 #endif /*PARTICLESWARM_H_*/

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