|
Feel++ 0.91.0
|
export Feel generated data to some file formatsUse the visitor and factory pattern. More...
#include <exporter.hpp>
Classes | |
| struct | Factory |
Public Types | |
Typedefs | |
| typedef VisitorBase | super1 |
| typedef Visitor< MeshType > | super2 |
| typedef TimeSet< MeshType, N > | timeset_type |
|
typedef boost::shared_ptr < timeset_type > | timeset_ptrtype |
|
typedef std::vector < timeset_ptrtype > | timeset_set_type |
| typedef timeset_set_type::iterator | timeset_iterator |
|
typedef timeset_set_type::const_iterator | timeset_const_iterator |
| typedef timeset_type::step_type | step_type |
| typedef timeset_type::step_ptrtype | step_ptrtype |
Public Member Functions | |
Accessors | |
| bool | doExport () const |
| std::string const & | type () const |
| std::string const & | prefix () const |
| int | freq () const |
| file_type | fileType () const |
| std::string | path () const |
Mutators | |
| void | setDoExport (bool do_export) |
| virtual Exporter< MeshType, N > * | setOptions (po::variables_map const &vm, std::string const &exp_prefix="") |
| Exporter< MeshType, N > * | setType (std::string const &__type) |
| Exporter< MeshType, N > * | addPath (boost::format fmt) |
| Exporter< MeshType, N > * | setPrefix (std::string const &__prefix) |
| Exporter< MeshType, N > * | setFreq (int __freq) |
| Exporter< MeshType, N > * | setFileType (file_type __ft) |
| timeset_iterator | beginTimeSet () |
| timeset_iterator | endTimeSet () |
| timeset_const_iterator | beginTimeSet () const |
| timeset_const_iterator | endTimeSet () const |
| timeset_ptrtype | defaultTimeSet () |
| timeset_ptrtype | timeSet (int ts) |
| step_ptrtype | step (double time) |
| step_ptrtype | step (double time, int s) |
Methods | |
| void | addTimeSet (timeset_ptrtype const &__ts) |
| virtual void | save () const =0 |
Protected Attributes | |
| bool | M_do_export |
| std::string | M_type |
| std::string | M_prefix |
| int | M_freq |
| file_type | M_ft |
| std::string | M_path |
| timeset_set_type | M_ts_set |
Constructors, destructor | |
| Exporter (std::string const &type, std::string const &prefix="", int freq=1) | |
| Exporter (po::variables_map const &vm, std::string const &exporter_prefix="") | |
| Exporter (Exporter const &exporter) | |
| virtual | ~Exporter () |
| static Exporter< MeshType, N > * | New (std::string const &exportername, std::string prefix="export") |
| static Exporter< MeshType, N > * | New (po::variables_map const &vm, std::string prefix="export") |
export Feel generated data to some file formats
Use the visitor and factory pattern.
Here is a snippet on how to use the Exporter class
#include <feel/feelfilters/exporter.hpp> typedef Exporter<mesh_type> export_type; typedef boost::shared_ptr<export_type> export_ptrtype; // vm is a po::variables_map to get the command lines options export_ptrtype exporter( export_type::New( vm ); // U is an element of a function space which we want to visualise exporter->step(0)->setMesh( U.functionSpace()->mesh() ); exporter->step(0)->add( "u", U );
| Feel::Exporter< MeshType, N >::Exporter | ( | std::string const & | type, |
| std::string const & | prefix = "", |
||
| int | freq = 1 |
||
| ) |
Constructor
| type | string containing the type of exporter (gmsh, ensight,...) |
| prefix | the prefix for the file names of the exported data |
| freq | an integer giving the frequency at which the data should be saved |
| Feel::Exporter< MeshType, N >::Exporter | ( | po::variables_map const & | vm, |
| std::string const & | exporter_prefix = "" |
||
| ) |
Constructor
| vm | variables_map containing the type of exporter and other exporter options |
| prefix | the prefix for the file names of the exported data |
| freq | an integer giving the frequency at which the data should be saved |
References Feel::Exporter< MeshType, N >::doExport().
| Feel::Exporter< MeshType, N >::Exporter | ( | Exporter< MeshType, N > const & | exporter | ) |
copy constructor
| Feel::Exporter< MeshType, N >::~Exporter | ( | ) | [virtual] |
destructor
| Exporter< MeshType, N > * Feel::Exporter< MeshType, N >::addPath | ( | boost::format | fmt | ) |
add an extra path to the current directory to save the data using the boost::format object fmt
| void Feel::Exporter< MeshType, N >::addTimeSet | ( | timeset_ptrtype const & | __ts | ) | [inline] |
add the timeset __ts to the Exporter
Referenced by Feel::Exporter< MeshType, N >::New().
| bool Feel::Exporter< MeshType, N >::doExport | ( | ) | const [inline] |
Referenced by Feel::Exporter< MeshType, N >::Exporter().
| file_type Feel::Exporter< MeshType, N >::fileType | ( | ) | const [inline] |
| int Feel::Exporter< MeshType, N >::freq | ( | ) | const [inline] |
| Exporter< MeshType, N > * Feel::Exporter< MeshType, N >::New | ( | po::variables_map const & | vm, |
| std::string | prefix = "export" |
||
| ) | [static] |
Static function instantiating from the Exporter Factory an exporter out of the variables_map vm and using prefix for the prefix of the data files.
References Feel::ExporterGmsh< MeshType, N >::setOptions().
| Exporter< MeshType, N > * Feel::Exporter< MeshType, N >::New | ( | std::string const & | exportername, |
| std::string | prefix = "export" |
||
| ) | [static] |
Static function instantiating from the Exporter Factory an exporter out of the exportername and using prefix for the prefix of the data files.
References Feel::Exporter< MeshType, N >::addTimeSet(), and Feel::Exporter< MeshType, N >::setPrefix().
| std::string Feel::Exporter< MeshType, N >::path | ( | ) | const [inline] |
| std::string const& Feel::Exporter< MeshType, N >::prefix | ( | ) | const [inline] |
| virtual void Feel::Exporter< MeshType, N >::save | ( | ) | const [pure virtual] |
this p save function is defined by the Exporter subclasses and implement saving the data to files
Implemented in Feel::ExporterEnsight< MeshType, N >, Feel::ExporterGmsh< MeshType, N >, and Feel::ExporterGnuplot< MeshType >.
| void Feel::Exporter< MeshType, N >::setDoExport | ( | bool | do_export | ) | [inline] |
set the doExport to do_export
| Exporter<MeshType,N>* Feel::Exporter< MeshType, N >::setFileType | ( | file_type | __ft | ) | [inline] |
set the file type to __ft (binary or ascii)
| Exporter<MeshType,N>* Feel::Exporter< MeshType, N >::setFreq | ( | int | __freq | ) | [inline] |
set the save frequency to __freq
| Exporter< MeshType, N > * Feel::Exporter< MeshType, N >::setOptions | ( | po::variables_map const & | vm, |
| std::string const & | exp_prefix = "" |
||
| ) | [virtual] |
set the options from the variables_map vm as well as the prefix exp_prefix
Reimplemented in Feel::ExporterEnsight< MeshType, N >, Feel::ExporterGmsh< MeshType, N >, and Feel::ExporterGnuplot< MeshType >.
Referenced by Feel::ExporterGmsh< MeshType, N >::setOptions(), and Feel::ExporterEnsight< MeshType, N >::setOptions().
| Exporter<MeshType,N>* Feel::Exporter< MeshType, N >::setPrefix | ( | std::string const & | __prefix | ) | [inline] |
set the prefix to __prefix
Referenced by Feel::Exporter< MeshType, N >::New().
| Exporter<MeshType,N>* Feel::Exporter< MeshType, N >::setType | ( | std::string const & | __type | ) | [inline] |
set to __type the type of exporter (gmsh, ensight...)
| std::string const& Feel::Exporter< MeshType, N >::type | ( | ) | const [inline] |
1.7.4