Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F64133746
dumper_hdf5.cc
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, May 24, 19:51
Size
2 KB
Mime Type
text/x-c
Expires
Sun, May 26, 19:51 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
17859662
Attached To
rAKA akantu
dumper_hdf5.cc
View Options
/**
* @file dumper_hdf5.cc
*
* @author Nicolas Richart
*
* @date creation Tue Oct 03 2017
*
* @brief Dump data in xdmf format
*
* @section LICENSE
*
* Copyright (©) 2010-2011 EPFL (Ecole Polytechnique Fédérale de Lausanne)
* Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
*
* Akantu is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
* Akantu 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 Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Akantu. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* -------------------------------------------------------------------------- */
#include "dumper_hdf5.hh"
#include "hdf5_file.hh"
#include "support.hh"
/* -------------------------------------------------------------------------- */
#include <boost/filesystem.hpp>
/* -------------------------------------------------------------------------- */
namespace
akantu
{
namespace
fs
=
boost
::
filesystem
;
/* -------------------------------------------------------------------------- */
DumperHDF5
::
DumperHDF5
(
dumper
::
SupportBase
&
support
)
:
Dumper
(
support
)
{}
/* -------------------------------------------------------------------------- */
void
DumperHDF5
::
dumpInternal
()
{
/*
HDF5 structure
/Support[Name]
- /_Nodes_
- /Connectivities
- /_types_
- /...
- /Data
- /Data1
- /_types_
- /...
/Global Data
*/
using
dumper
::
HDF5
::
File
;
if
(
not
h5
)
{
auto
path
=
fs
::
path
(
directory
);
path
/=
filename
+
".h5"
;
h5
=
std
::
make_unique
<
File
>
(
support
,
path
);
}
h5
->
dump
();
H5Eset_auto
(
H5E_DEFAULT
,
nullptr
,
nullptr
);
}
}
// namespace akantu
Event Timeline
Log In to Comment