Newer
Older
// ============================================================================
// == ==
// == AMDiS - Adaptive multidimensional simulations ==
// == ==
// ============================================================================
// == ==
// == Institut fr Wissenschaftliches Rechnen ==
// == Zellescher Weg 12-14 ==
// == 01069 Dresden ==
// == germany ==
// == ==
// ============================================================================
// == ==
// == https://gforge.zih.tu-dresden.de/projects/amdis/ ==
// == ==
// ============================================================================
/** \file MacroReader.h */
#ifndef AMDIS_MACROREADER_H
#define AMDIS_MACROREADER_H
#include <deque>
#include "Global.h"
#include "FixVec.h"
#include "Boundary.h"
namespace AMDiS {
/** \defgroup Input Input module */
/** \ingroup Input
*
* \brief
* Static class which reads a macro triangulation file and creates
* the corresponding macro mesh.
*/
class MacroReader
{
public:
/// Creates a Mesh by reading the macro file with the given filename.

Thomas Witkowski
committed
static MacroInfo* readMacro(std::string filename,

Thomas Witkowski
committed
std::string periodicFile,
int check);
protected:
static void computeNeighbours(Mesh *mesh);
static void boundaryDOFs(Mesh *mesh);
static void umb(int *ele, Mesh *mesh,
void (*umbvk)(Mesh *mesh, MacroElement*,int k, int *el));
static int macrotest(Mesh *mesh);
static void macroTest(Mesh *mesh, const char *nameneu);
static bool newEdge(Mesh *mesh, MacroElement *mel,
int mel_edge_no, int *n_neigh);
static void fillMelBoundary(Mesh *, MacroElement *mel,
FixVec<BoundaryType ,NEIGH>);
static void fillMelNeigh(MacroElement *mel,
std::deque<MacroElement*>& macro_elements,
FixVec<int,NEIGH> ind);
static void umbVkantMacro(Mesh *mesh,
MacroElement *,
int ka,
int *ele);
static void recumb(Mesh *mesh,
MacroElement *mel, MacroElement *macroalt,
int *test, double lg, int ka, int *ele,
void (*umbvk)(Mesh *mesh, MacroElement*,int k, int *el));
static void laengstekante(FixVec<WorldVector<double>,VERTEX> coord,
double *l, int *v);
static void checkMesh(Mesh *mesh);
static int basicCheckFct(ElInfo* elInfo, Mesh *mesh);
static void basicDOFCheckFct(ElInfo* elInfo, Mesh *mesh, int iadmin);
static void basicNodeFct(ElInfo* elInfo, Mesh *mesh);
friend class MacroInfo;
};
}
#endif