Commit 0f706a8c authored by LAMBERT Jean-charles's avatar LAMBERT Jean-charles

RAMSES limit min/max fixed

parent a3eb8da0
Pipeline #204 skipped
......@@ -41,7 +41,7 @@ public:
CAmr(const std::string,const bool _v=true);
~CAmr();
void setBoundary(float x[8]) {
void setBoundary(double x[8]) {
xmin=x[0];
xmax=x[1];
ymin=x[2];
......
......@@ -35,7 +35,7 @@ class CPart {
public:
CPart(const std::string,const bool _v=true);
~CPart();
void setBoundary(float x[6]) {
void setBoundary(double x[6]) {
xmin=x[0];
xmax=x[1];
ymin=x[2];
......@@ -61,7 +61,7 @@ private:
int ndm_box, nstar_box;
std::string s_run_index;
float xmin,xmax,ymin,ymax,zmin,zmax;
double xmin,xmax,ymin,ymax,zmin,zmax;
CFortIO part;
int readHeader();
......
......@@ -17,6 +17,7 @@
#include "snapshotramses.h"
#include "camr.h"
#include "cpart.h"
#include "cgrav.h"
#include <limits>
#include "uns.h"
......@@ -58,6 +59,7 @@ template <class T> CSnapshotRamsesIn<T>::~CSnapshotRamsesIn()
{
delete amr;
delete part;
delete grav;
delete particles;
}
// ============================================================================
......@@ -96,10 +98,10 @@ template <class T> int CSnapshotRamsesIn<T>::nextFrame(uns::UserSelection &user_
unsigned int comp_bits=user_select.compBits();
// set boundaries
float x[8];
double x[8];
x[0]=x[2]=x[4]=std::numeric_limits<float>::min();
x[1]=x[3]=x[5]=std::numeric_limits<float>::max();
x[0]=x[2]=x[4]=std::numeric_limits<double>::max() * -1.0; // LOWEST
x[1]=x[3]=x[5]=std::numeric_limits<double>::max();
x[6]=0.; // level min
x[7]=0.; // nlevelmax
......@@ -112,6 +114,7 @@ template <class T> int CSnapshotRamsesIn<T>::nextFrame(uns::UserSelection &user_
amr->setBoundary(x);
amr->loadData(particles,this->req_bits);
}
grav->loadData(particles,this->req_bits);
std::cerr << "ntot = "<< particles->ntot <<"\n";
std::cerr << "ngas = "<< particles->ngas <<"\n";
std::cerr << "ndm = "<< particles->ndm <<"\n";
......
......@@ -23,6 +23,7 @@
namespace ramses {
class CAmr;
class CPart;
class CGrav;
}
namespace uns {
......@@ -36,7 +37,7 @@ public:
load_bits=0;
}
std::vector <T> pos,vel,mass,hsml,rho,temp,age,metal;
std::vector <T> pos,vel,mass,hsml,rho,acc,phi,temp,age,metal;
std::vector <int> indexes,id;
int ntot, ngas, ndm, nstars;
unsigned int load_bits;
......@@ -64,6 +65,7 @@ public:
private:
ramses::CAmr * amr;
ramses::CPart * part;
ramses::CGrav * grav;
CParticles<T> * particles;
bool first_loc;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment