mirror of
https://github.com/cosmo-sims/MUSIC.git
synced 2024-09-19 17:03:46 +02:00
gadget2 plugin: empty part of header is now initialized to zero, this makes it compatible with non-public gadget-2 and 3
This commit is contained in:
parent
549c1dbd47
commit
65ed455e36
1 changed files with 8 additions and 4 deletions
|
@ -15,6 +15,8 @@
|
|||
#include "mg_interp.hh"
|
||||
#include "mesh.hh"
|
||||
|
||||
const int empty_fill_bytes = 60;
|
||||
|
||||
template< typename T_store=float >
|
||||
class gadget2_output_plugin : public output_plugin
|
||||
{
|
||||
|
@ -48,7 +50,7 @@ protected:
|
|||
int flag_metals;
|
||||
unsigned int npartTotalHighWord[6];
|
||||
int flag_entropy_instead_u;
|
||||
char fill[60];
|
||||
char fill[empty_fill_bytes];
|
||||
}header;
|
||||
|
||||
|
||||
|
@ -839,6 +841,8 @@ public:
|
|||
header_.BoxSize *= 1000.0;
|
||||
|
||||
|
||||
for( int i=0; i<empty_fill_bytes; ++i )
|
||||
header_.fill[i] = 0;
|
||||
}
|
||||
|
||||
void write_dm_mass( const grid_hierarchy& gh )
|
||||
|
|
Loading…
Reference in a new issue