/* output_generic.cc - This file is part of MUSIC - a code to generate multi-scale initial conditions for cosmological simulations Copyright (C) 2010 Oliver Hahn This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifdef HAVE_HDF5 #include "output.hh" #include "HDF_IO.hh" class generic_output_plugin : public output_plugin { protected: using output_plugin::cf_; template< typename Tt > void write2HDF5( std::string fname, std::string dname, const MeshvarBnd& data ) { int n0 = data.size(0), n1 = data.size(1), n2 = data.size(2), nb = data.m_nbnd; std::vector vdata; vdata.reserve((unsigned)(n0+2*nb)*(n1+2*nb)*(n2+2*nb)); for(int i=-nb; i creator("generic"); } #endif