Skip to content
Snippets Groups Projects
ValueWriter.h 2.33 KiB
Newer Older
// ============================================================================
// ==                                                                        ==
// == AMDiS - Adaptive multidimensional simulations                          ==
// ==                                                                        ==
// ==                                                                        ==
// ============================================================================
//
// Software License for AMDiS
//
// Copyright (c) 2010 Dresden University of Technology 
// All rights reserved.
// Authors: Simon Vey, Thomas Witkowski et al.
//
// This file is part of AMDiS
//
// See also license.opensource.txt in the distribution.



/** \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