Fixed test. Compilation fixes

This commit is contained in:
Guilhem Lavaux 2010-03-02 10:59:41 -06:00
parent f029c037f3
commit 7d39b98db5
5 changed files with 40 additions and 6 deletions

View file

@ -224,7 +224,7 @@ void UnformattedWrite::endCheckpoint()
if (checkPointAccum == 0)
throw InvalidUnformattedAccess();
ostream::streampos curPos = f->tellp();
streampos curPos = f->tellp();
int64_t deltaPos = curPos-checkPointRef;

View file

@ -1,3 +1,4 @@
#include <sys/types.h>
#include <regex.h>
#include <cmath>
#include <cstring>
@ -436,12 +437,13 @@ CosmoTool::PhaseSpaceData *CosmoTool::loadRamsesPhase(const char *basename, int
if (!readInfoFile(basename, outputId, info))
return 0;
double unit_vel = info.unitLength/info.unit_t/1e5;
double hubble = info.aexp*info.aexp/info.unit_t / (1e5/CM_IN_MPC);
double L0 = info.boxSize*info.unitLength/CM_IN_MPC/info.aexp;
double L0 = info.boxSize*info.unitLength*hubble/(100*CM_IN_MPC)/info.aexp;
double unit_vel = 100*L0/info.aexp;
if (!quiet) {
cout << "L0=" << L0 << " Mpc" << endl;
cout << "H=" << hubble << " km/s/Mpc" << endl;
cout << "unit_vel=" << unit_vel << " km/s" << endl;
}
if (!quiet)

View file

@ -212,6 +212,7 @@ namespace CosmoTool {
template<typename T>
void loadArray(const char *fname,
T*&array, uint32_t *&dimList, uint32_t& rank)
throw (NoSuchFileException)
{
NcFile f(fname, NcFile::ReadOnly);

View file

@ -183,9 +183,11 @@ namespace CosmoTool
template<typename T>
void saveArray(const char *fname,
T *array, uint32_t *dimList, uint32_t rank);
template<typename T>
void loadArray(const char *fname,
T*& array, uint32_t *& dimList, uint32_t& rank);
T*& array, uint32_t *& dimList, uint32_t& rank)
throw (NoSuchFileException);
ProgressiveDoubleOutput saveDoubleArrayProgressive(const char *fname, uint32_t *dimList, uint32_t rank);
};