Skip to content
Snippets Groups Projects
ValueWriter.h 2.93 KiB
Newer Older
// ============================================================================
// ==                                                                        ==
// == AMDiS - Adaptive multidimensional simulations                          ==
// ==                                                                        ==
// ============================================================================
// ==                                                                        ==
// ==  TU Dresden                                                            ==
// ==  Institut für Wissenschaftliches Rechnen                               ==
// ==  Zellescher Weg 12-14                                                  ==
// ==  01069 Dresden                                                         ==
// ==  germany                                                               ==
// ==                                                                        ==
// ============================================================================
// ==                                                                        ==
// ==  https://gforge.zih.tu-dresden.de/projects/amdis/                      ==
// ==                                                                        ==
// ============================================================================

/** \file ValueWriter.h */

#ifndef AMDIS_VALUEWRITER_H
#define AMDIS_VALUEWRITER_H

#include <list>

#include "Global.h"
#include "FixVec.h"
#include "Flag.h"
#include "Mesh.h"
#include "DataCollector.h"
Thomas Witkowski's avatar
Thomas Witkowski committed
#include "AMDiS_fwd.h"
  /** \ingroup Output
   * \brief
   * ValueWriter is a static class which writes the values of a DOFVector
   * values to an ascii file named values->name.'dat'. This output is done
   * via two leaf-traversals of values->feSpace->mesh. In the first traversal
   * the values at the vertices are printed, in the second these at the
   * interpolation points of each element. For a closer disription of the
   * output format see (...link fehlt noch)
Thomas Witkowski's avatar
Thomas Witkowski committed
    /// Writes DOFVector values to values->feSpace->mesh.
    static void writeValues(DataCollector *dc,
Thomas Witkowski's avatar
Thomas Witkowski committed
			    std::string filename,
			    double time = 0.0,
			    int level = -1,
			    Flag traverseFlag = Mesh::CALL_LEAF_EL,
			    bool (*writeElem)(ElInfo*) = NULL);
			   
  protected:
Thomas Witkowski's avatar
Thomas Witkowski committed
    /// File to which the values should be written
Thomas Witkowski's avatar
Thomas Witkowski committed
    /// Global interpolation point indexing
    static DOFVector<int> *interpPointInd;

Thomas Witkowski's avatar
Thomas Witkowski committed
    /// list of coords for each dof
    static DOFVector< std::list<WorldVector<double> > > *dofCoords;
Thomas Witkowski's avatar
Thomas Witkowski committed
    /// DOFAdmin of values
Thomas Witkowski's avatar
Thomas Witkowski committed
    /// Pointer to have a global access to values
    static DOFVector<double> *valueVec;

Thomas Witkowski's avatar
Thomas Witkowski committed
    /// Total number of interpolation points.

}

#endif // AMDIS_VALUEWRITER_H