1
0
Fork 0
mirror of https://github.com/cosmo-sims/MUSIC.git synced 2024-09-19 17:03:46 +02:00

tetmesh : added new option 'gadget_lagrangevertid' (default=yes) to toggle the usage of lagrange ids as vertex indices

This commit is contained in:
Oliver Hahn 2013-10-24 19:53:29 +02:00
parent 6c80b317c8
commit ace5dde0af

View file

@ -421,6 +421,7 @@ protected:
std::ofstream ofs_;
bool bmultimass_;
bool blongids_;
bool blagrangeids_as_vertids_;
typedef struct io_header
@ -986,6 +987,10 @@ public:
//... write displacements in kpc/h rather than Mpc/h?
kpcunits_ = cf.getValueSafe<bool>("output","gadget_usekpc",false);
msolunits_ = cf.getValueSafe<bool>("output","gadget_usemsol",false);
blagrangeids_as_vertids_ = cf.getValueSafe<bool>("output","gadget_lagrangevertid",true);
/*bndparticletype_ = cf.getValueSafe<unsigned>("output","gadget_coarsetype",5);
if( bndparticletype_ == 0 || bndparticletype_ == 1 || bndparticletype_ == 4 ||
@ -1272,8 +1277,12 @@ public:
if( P[ip].Type == 2 )
lid = -1;
else
lid = (long long)idmap[ REMOVE_DECORATION_BITS(P[ip].get_vertex(j)) ];
else{
if( blagrangeids_as_vertids_ )
lid = REMOVE_DECORATION_BITS(P[ip].get_vertex(j));
else
lid = (long long)idmap[ REMOVE_DECORATION_BITS(P[ip].get_vertex(j)) ];
}
if( temp_dat.size() < block_buf_size_ )
temp_dat.push_back( lid );