Patch [#31264] Elbeem Fixes by Jason Wilkins.

Thank you for submitting!
This commit is contained in:
Daniel Genrich
2012-05-14 16:19:58 +00:00
parent 1a729d51d0
commit d8ae4b35f2
11 changed files with 32 additions and 30 deletions

View File

@@ -86,6 +86,7 @@ set(SRC
intern/solver_interface.h intern/solver_interface.h
intern/solver_relax.h intern/solver_relax.h
intern/utilities.h intern/utilities.h
intern/globals.h
) )
add_definitions( add_definitions(

View File

@@ -0,0 +1,10 @@
/** \file elbeem/intern/globals.h
* \ingroup elbeem
*/
// required globals
extern bool glob_mpactive;
extern int glob_mpnum;
extern int glob_mpindex;

View File

@@ -18,6 +18,7 @@
#include "ntl_blenderdumper.h" #include "ntl_blenderdumper.h"
#include "ntl_world.h" #include "ntl_world.h"
#include "solver_interface.h" #include "solver_interface.h"
#include "globals.h"
#include <zlib.h> #include <zlib.h>
@@ -46,10 +47,6 @@ ntlBlenderDumper::~ntlBlenderDumper()
debMsgStd("ntlBlenderDumper",DM_NOTIFY, "ntlBlenderDumper done", 10); debMsgStd("ntlBlenderDumper",DM_NOTIFY, "ntlBlenderDumper done", 10);
} }
// required globals
extern bool glob_mpactive;
extern int glob_mpnum, glob_mpindex;
/****************************************************************************** /******************************************************************************
* Only dump time dep. objects to file * Only dump time dep. objects to file
*****************************************************************************/ *****************************************************************************/

View File

@@ -17,6 +17,11 @@
// under windos there seem to be strange // under windos there seem to be strange
// errors when including the STL header too // errors when including the STL header too
// late... // late...
#ifdef _MSC_VER
#define _USE_MATH_DEFINES 1
#endif
#include <iostream> #include <iostream>
#include <map> #include <map>
#include <vector> #include <vector>
@@ -63,14 +68,11 @@ using std::string;
#ifndef snprintf #ifndef snprintf
#define snprintf _snprintf #define snprintf _snprintf
#endif #endif
#ifndef bool
#define bool int #ifdef _MSC_VER
#if _MSC_VER >= 1300
#include <float.h>
#endif #endif
#ifndef false
#define false 0
#endif
#ifndef true
#define true 1
#endif #endif
#else // WIN32 #else // WIN32
@@ -102,6 +104,9 @@ using std::string;
#ifndef M_PI #ifndef M_PI
#define M_PI 3.1415926536 #define M_PI 3.1415926536
#endif
#ifndef M_E
#define M_E 2.7182818284 #define M_E 2.7182818284
#endif #endif

View File

@@ -496,9 +496,6 @@ void ntlWorld::singleStepSims(double targetTime) {
extern bool glob_mpactive;
extern int glob_mpindex;
/****************************************************************************** /******************************************************************************
* Render the current scene * Render the current scene
* uses the global variables from the parser * uses the global variables from the parser

View File

@@ -19,6 +19,7 @@
#include "ntl_matrices.h" #include "ntl_matrices.h"
#include "ntl_ray.h" #include "ntl_ray.h"
#include "ntl_matrices.h" #include "ntl_matrices.h"
#include "globals.h"
#include <zlib.h> #include <zlib.h>
@@ -155,9 +156,6 @@ void ParticleTracer::cleanup() {
} }
} }
extern bool glob_mpactive;
extern int glob_mpindex,glob_mpnum;
/****************************************************************************** /******************************************************************************
*! dump particles if desired *! dump particles if desired
*****************************************************************************/ *****************************************************************************/

View File

@@ -928,9 +928,6 @@ void LbmFsgrSolver::interpolateCellFromCoarse(int lev, int i, int j,int k, int d
// required globals
extern bool glob_mpactive;
extern int glob_mpnum, glob_mpindex;
#define MPTADAP_INTERV 4 #define MPTADAP_INTERV 4
/*****************************************************************************/ /*****************************************************************************/

View File

@@ -15,6 +15,8 @@
#include "solver_relax.h" #include "solver_relax.h"
// for geo init FGI_ defines // for geo init FGI_ defines
#include "elbeem.h" #include "elbeem.h"
#include "globals.h"
// helper for 2d init // helper for 2d init
#define SWAPYZ(vec) { \ #define SWAPYZ(vec) { \
@@ -296,9 +298,6 @@
#endif // LBMDIM==2 #endif // LBMDIM==2
// required globals
extern bool glob_mpactive;
extern int glob_mpnum, glob_mpindex;
/****************************************************************************** /******************************************************************************

View File

@@ -14,6 +14,8 @@
#include "solver_relax.h" #include "solver_relax.h"
#include "particletracer.h" #include "particletracer.h"
#include "loop_tools.h" #include "loop_tools.h"
#include "globals.h"
#include <stdlib.h> #include <stdlib.h>
/*****************************************************************************/ /*****************************************************************************/
@@ -24,8 +26,6 @@ double globdfcnt;
double globdfavg[19]; double globdfavg[19];
double globdfmax[19]; double globdfmax[19];
double globdfmin[19]; double globdfmin[19];
extern int glob_mpindex,glob_mpnum;
extern bool globOutstrForce;
// simulation object interface // simulation object interface
void LbmFsgrSolver::step() { void LbmFsgrSolver::step() {

View File

@@ -390,7 +390,7 @@
#define DEFAULT_STREAM \ #define DEFAULT_STREAM \
m[dC] = RAC(ccel,dC); \ m[dC] = RAC(ccel,dC); \
\ \
if(((!nbored) & CFBnd)) { \ if(0 /* ((!nbored) & CFBnd) */) { \
\ \
m[dN ] = CSRC_N ; m[dS ] = CSRC_S ; \ m[dN ] = CSRC_N ; m[dS ] = CSRC_S ; \
m[dE ] = CSRC_E ; m[dW ] = CSRC_W ; \ m[dE ] = CSRC_E ; m[dW ] = CSRC_W ; \

View File

@@ -18,6 +18,8 @@
#include "ntl_world.h" #include "ntl_world.h"
#include "simulation_object.h" #include "simulation_object.h"
#include "globals.h"
#include <stdlib.h> #include <stdlib.h>
#include <zlib.h> #include <zlib.h>
#ifndef sqrtf #ifndef sqrtf
@@ -31,10 +33,6 @@
// try to enhance surface? // try to enhance surface?
#define SURFACE_ENH 2 #define SURFACE_ENH 2
extern bool glob_mpactive;
extern bool glob_mpnum;
extern bool glob_mpindex;
//! for raytracing //! for raytracing
void LbmFsgrSolver::prepareVisualization( void ) { void LbmFsgrSolver::prepareVisualization( void ) {
int lev = mMaxRefine; int lev = mMaxRefine;