Support more parameters in simulation

This commit is contained in:
Your Name 2011-02-22 14:36:17 -05:00
parent 4c08fdc90d
commit 707eaefbe1
2 changed files with 11 additions and 0 deletions

View File

@ -196,6 +196,8 @@ typedef struct
double aexp;
double boxSize;
double unit_t;
double omega_m;
double omega_lambda;
} InfoData;
int readInfoFile(const char *basename, int outputId, InfoData& info)
@ -251,6 +253,8 @@ int readInfoFile(const char *basename, int outputId, InfoData& info)
info.aexp = infoMap["aexp"];
info.boxSize = infoMap["boxlen"];
info.unit_t = infoMap["unit_t"];
info.omega_m = infoMap["omega_m"];
info.omega_lambda = infoMap["omega_l"];
return 1;
}
@ -311,6 +315,9 @@ CosmoTool::SimuData *CosmoTool::loadRamsesSimu(const char *basename, int outputI
data->time = info.aexp;
data->NumPart = 0;
data->TotalNumPart = totPart;
data->Hubble = hubble;
data->Omega_M = info.omega_m;
data->Omega_Lambda = info.omega_lambda;
if (cpuid < 0)
cpuid = 1;

View File

@ -14,6 +14,10 @@ namespace CosmoTool
public:
float BoxSize;
float time;
float Hubble;
float Omega_M;
float Omega_Lambda;
long NumPart;
long TotalNumPart;