Page MenuHomec4science

dumper_paraview.hh
No OneTemporary

File Metadata

Created
Sun, Sep 15, 07:27

dumper_paraview.hh

/*
Copyright 2008 Guillaume ANCIAUX (guillaume.anciaux@epfl.ch)
This file is part of ParaViewHelper.
ParaViewHelper 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.
ParaViewHelper 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 ParaViewHelper. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __IOHELPER_DUMPER_PARAVIEW_H__
#define __IOHELPER_DUMPER_PARAVIEW_H__
/* -------------------------------------------------------------------------- */
#include <map>
#include <string>
#include "dumper.h"
#include "field.h"
#include "paraview_helper.h"
/* -------------------------------------------------------------------------- */
__BEGIN_IOHELPER__
/** Class DumperParaview
* Implementation of a dumper to paraview vtu files
*/
class DumperParaview : public Dumper {
/* ------------------------------------------------------------------------ */
/* Constructors/Destructors */
/* ------------------------------------------------------------------------ */
public:
DumperParaview();
~DumperParaview();
/* ------------------------------------------------------------------------ */
/* Methods */
/* ------------------------------------------------------------------------ */
//! dump to file
void Dump();
/* ------------------------------------------------------------------------ */
/* Accessors */
/* ------------------------------------------------------------------------ */
//! set mode for file creation : TEXT, BASE64, COMPRESSED
void SetMode(int mode){Dumper::SetMode(mode);paraHelper->SetMode(mode);};
//! set flag embedded dimension. This allow paraview to complement 1D and 2D to obtain 3D fields
void SetEmbeddedValue(const char * name,int flag);
/* ------------------------------------------------------------------------ */
/* Class Members */
/* ------------------------------------------------------------------------ */
private:
//! flag to produce zipped files
bool flag_compressed;
//! pointer to paraview helper facilities
ParaviewHelper * paraHelper;
};
/* -------------------------------------------------------------------------- */
inline DumperParaview::DumperParaview() :
Dumper(),flag_compressed(false),paraHelper(new ParaviewHelper()){
}
/* -------------------------------------------------------------------------- */
inline DumperParaview::~DumperParaview(){
if (paraHelper)
delete paraHelper;
}
/* -------------------------------------------------------------------------- */
__END_IOHELPER__
#endif /* __IOHELPER_DUMPER_PARAVIEW_H__ */

Event Timeline