mirror of
https://github.com/cosmo-sims/monofonIC.git
synced 2024-09-19 17:03:45 +02:00
fixed bug where sometimes arepo plugin instead of gadget-4 plugin was called
This commit is contained in:
parent
a2d83df9b3
commit
6940d8f328
6 changed files with 13 additions and 12 deletions
|
@ -33,7 +33,7 @@ std::vector<T> from_value(const T a)
|
|||
}
|
||||
|
||||
template <typename write_real_t>
|
||||
class gadget_hdf5_output_plugin : public output_plugin
|
||||
class arepo_output_plugin : public output_plugin
|
||||
{
|
||||
struct header_t
|
||||
{
|
||||
|
@ -73,7 +73,7 @@ protected:
|
|||
|
||||
public:
|
||||
//! constructor
|
||||
explicit gadget_hdf5_output_plugin(config_file &cf, std::unique_ptr<cosmology::calculator>& pcc)
|
||||
explicit arepo_output_plugin(config_file &cf, std::unique_ptr<cosmology::calculator>& pcc)
|
||||
: output_plugin(cf, pcc, "AREPO-HDF5")
|
||||
{
|
||||
num_files_ = 1;
|
||||
|
@ -148,7 +148,7 @@ public:
|
|||
}
|
||||
|
||||
// use destructor to write header post factum
|
||||
~gadget_hdf5_output_plugin()
|
||||
~arepo_output_plugin()
|
||||
{
|
||||
HDFCreateGroup(this_fname_, "Header");
|
||||
HDFWriteGroupAttribute(this_fname_, "Header", "NumPart_ThisFile", from_6array<unsigned>(header_.npart));
|
||||
|
@ -271,9 +271,9 @@ public:
|
|||
namespace
|
||||
{
|
||||
#if !defined(USE_SINGLEPRECISION)
|
||||
output_plugin_creator_concrete<gadget_hdf5_output_plugin<double>> creator1("AREPO");
|
||||
output_plugin_creator_concrete<arepo_output_plugin<double>> creator880("AREPO");
|
||||
#else
|
||||
output_plugin_creator_concrete<gadget_hdf5_output_plugin<float>> creator1("AREPO");
|
||||
output_plugin_creator_concrete<arepo_output_plugin<float>> creator881("AREPO");
|
||||
#endif
|
||||
} // namespace
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ protected:
|
|||
public:
|
||||
//! constructor
|
||||
explicit gadget_hdf5_output_plugin(config_file &cf, std::unique_ptr<cosmology::calculator> &pcc)
|
||||
: output_plugin(cf, pcc, "GADGET-HDF5")
|
||||
: output_plugin(cf, pcc, (std::string("GADGET-HDF5-")+typeid(write_real_t).name()).c_str() )
|
||||
{
|
||||
num_files_ = 1;
|
||||
#ifdef USE_MPI
|
||||
|
@ -88,6 +88,7 @@ public:
|
|||
num_simultaneous_writers_ = cf_.get_value_safe<int>("output", "NumSimWriters", num_files_);
|
||||
|
||||
bgadget2_compatibility_ = cf_.get_value_safe<bool>("output", "Gadget2Compatibility", false);
|
||||
music::ilog << std::setw(32) << std::left << "Gadget2Compatibility" << " : " << (bgadget2_compatibility_? "yes" : "no") << std::endl;
|
||||
|
||||
for (int i = 0; i < 6; ++i)
|
||||
{
|
||||
|
@ -305,9 +306,9 @@ public:
|
|||
|
||||
namespace
|
||||
{
|
||||
output_plugin_creator_concrete<gadget_hdf5_output_plugin<float>> creator1("gadget_hdf5");
|
||||
output_plugin_creator_concrete<gadget_hdf5_output_plugin<float>> creator991("gadget_hdf5");
|
||||
#if !defined(USE_SINGLEPRECISION)
|
||||
output_plugin_creator_concrete<gadget_hdf5_output_plugin<double>> creator3("gadget_hdf5_double");
|
||||
output_plugin_creator_concrete<gadget_hdf5_output_plugin<double>> creator992("gadget_hdf5_double");
|
||||
#endif
|
||||
} // namespace
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ void generic_output_plugin::write_grid_data(const Grid_FFT<real_t> &g, const cos
|
|||
|
||||
namespace
|
||||
{
|
||||
output_plugin_creator_concrete<generic_output_plugin> creator1("generic");
|
||||
output_plugin_creator_concrete<generic_output_plugin> creator001("generic");
|
||||
} // namespace
|
||||
|
||||
#endif
|
|
@ -157,7 +157,7 @@ public:
|
|||
|
||||
namespace
|
||||
{
|
||||
output_plugin_creator_concrete<genericio_output_plugin> creator1("genericio");
|
||||
output_plugin_creator_concrete<genericio_output_plugin> creator101("genericio");
|
||||
} // namespace
|
||||
|
||||
#endif // ENABLE_GENERICIO
|
|
@ -323,5 +323,5 @@ void grafic2_output_plugin::write_ramses_namelist(void) const
|
|||
|
||||
namespace
|
||||
{
|
||||
output_plugin_creator_concrete<grafic2_output_plugin> creator1("grafic2");
|
||||
output_plugin_creator_concrete<grafic2_output_plugin> creator201("grafic2");
|
||||
} // namespace
|
||||
|
|
|
@ -369,7 +369,7 @@ public:
|
|||
|
||||
namespace
|
||||
{
|
||||
output_plugin_creator_concrete<swift_output_plugin<double>> creator1("SWIFT");
|
||||
output_plugin_creator_concrete<swift_output_plugin<double>> creator301("SWIFT");
|
||||
} // namespace
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue