// ============================================================================ // == == // == 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 GridWriter.h */ #ifndef AMDIS_GRID_WRITER_H #define AMDIS_GRID_WRITER_H #include "Global.h" #include "AMDiS_fwd.h" namespace AMDiS { /** \ingroup Output * \brief * Produces a grid-based output of a dof-vector */ template class GridWriter { public: /** \brief * Produces a grid-based output of a dof-vector or vector of dof-vectors * \param p array of world coordinates. * - p[0] defines origin of grid-system. * - p[1] defines first basis vector by p[1] - p[0]. * - p[2] defines second basis vector by p[2] - p[0] (dim >= 2). * - p[3] defines third basis vector by p[3] - p[0] (dim == 3). * \param numPoints number of grid points for the different dirctions * - numPoints[0] number of grid points in the first direction * - numPoints[1] number of grid points in the second direction * - numPoints[2] number of grid points in the third direction * \param dist distance between two points in the different directions * - dist[0] distance in the first direction * - dist[1] distance in the second direction * - dist[2] distance in the third direction * \param vec DOFVector which is interpolated to the grid. * \param filename file to which the grid will be written * \param outFilePrecision precision used to write file */ static void writeGrid(const WorldVector *p, int *numPoints, double *dist, DOFVector *vec, const char* filename, int outFilePrecision=6); static void writeGrid(const WorldVector *p, int *numPoints, double *dist, std::vector< DOFVector * > vec, const char* filename, int outFilePrecision=6); }; } #include "GridWriter.hh" #endif