29 #ifndef __ExporterExodus_H
30 #define __ExporterExodus_H 1
36 #include <boost/lambda/lambda.hpp>
37 #include <boost/filesystem/path.hpp>
38 #include <boost/filesystem/operations.hpp>
40 #include <feel/feelfilters/exporter.hpp>
45 namespace fs = boost::filesystem;
54 template<
typename MeshType,
int N>
67 typedef MeshType mesh_type;
70 typedef typename super::timeset_ptrtype timeset_ptrtype;
71 typedef typename super::timeset_iterator timeset_iterator;
72 typedef typename super::timeset_const_iterator timeset_const_iterator;
122 ExporterExodus( WorldComm
const& worldComm = Environment::worldComm() );
123 ExporterExodus( std::string
const& __p =
"default",
int freq = 1, WorldComm
const& worldComm = Environment::worldComm() );
124 ExporterExodus( po::variables_map
const& vm=Environment::vm(), std::string
const& exp_prefix =
"", WorldComm
const& worldComm = Environment::worldComm() );
149 return M_element_type;
185 void visit( mesh_type* mesh );
203 mutable std::string M_filename;
204 std::string M_element_type;
207 template<
typename MeshType,
int N>
216 template<
typename MeshType,
int N>
219 super(
"exodus", __p, freq, worldComm ),
224 template<
typename MeshType,
int N>
227 super( vm, exp_prefix, worldComm )
232 template<
typename MeshType,
int N>
236 M_element_type( __ex.M_element_type )
240 template<
typename MeshType,
int N>
241 ExporterExodus<MeshType,N>::~ExporterExodus()
244 template<
typename MeshType,
int N>
246 ExporterExodus<MeshType,N>::init()
248 if ( mesh_type::nDim == 1 )
249 if ( mesh_type::Shape == SHAPE_LINE )
250 M_element_type = ( mesh_type::nOrder == 1 )?
"bar2":
"bar3";
252 if ( mesh_type::nDim == 2 )
254 if ( mesh_type::Shape == SHAPE_TRIANGLE )
255 M_element_type = ( mesh_type::nOrder == 1 )?
"tria3":
"tria6";
257 else if ( mesh_type::Shape == SHAPE_QUAD )
258 M_element_type = ( mesh_type::nOrder == 1 )?
"quad4":
"quad8";
261 if ( mesh_type::nDim == 3 )
263 if ( mesh_type::Shape == SHAPE_TETRA )
264 M_element_type = ( mesh_type::nOrder == 1 )?
"tetra4":
"tetra10";
266 else if ( mesh_type::Shape == SHAPE_HEXA )
267 M_element_type = ( mesh_type::nOrder == 1 )?
"hexa8":
"hexa20";
270 template<
typename MeshType,
int N>
274 if ( !this->worldComm().isActive() )
return;
279 template<
typename MeshType,
int N>
exporter to Exodus format
Definition: exporterexodus.hpp:55
virtual Exporter< MeshType, N > * setOptions(std::string const &exp_prefix="")
Definition: exporterimpl.hpp:175
export Feel generated data to some file formatsUse the visitor and factory pattern.
Definition: exporter.hpp:82
data TimeSet
Definition: timeset.hpp:90
#define FEELPP_DEPRECATED
Definition: feelmacros.hpp:352
Exporter< MeshType, N > * setOptions(po::variables_map const &vm, std::string const &exp_prefix="") FEELPP_DEPRECATED
Definition: exporterexodus.hpp:159
ExporterExodus(WorldComm const &worldComm=Environment::worldComm())
Definition: exporterexodus.hpp:208
std::string const & elementType() const
Definition: exporterexodus.hpp:147
void visit(mesh_type *mesh)
visit a data structure
Definition: exporterexodus.hpp:281
int freq() const
Definition: exporter.hpp:209
Exporter< MeshType, N > * setOptions(std::string const &exp_prefix="")
Definition: exporterexodus.hpp:166
void save() const
Definition: exporterexodus.hpp:272