Meshtest.cpp 861 Bytes
Newer Older
1
2
#include "Mesh.h"
#include "Parameters.h"
3
4
5
#include "ProblemScal.h"

#include <sstream>
6
7

using namespace AMDiS;
8
9
10
11
12
13
14
15
16
17
18
19
void testMesh(int dim) {
	std::stringstream ss;
	ss<< dim;
	Parameters::addGlobalParameter(0, "dimension of world", ss.str());
	Global::init();
	Mesh mesh("testMesh", dim);
	DimVec< int > ln_dof(dim, DEFAULT_VALUE, 0);
	ln_dof[VERTEX]=1;
	mesh.createDOFAdmin("vertex_dofs", ln_dof);
	mesh.initialize();
}

20
21
int main(int argc, char** argv) {
  //cannot use Parameters::addGlobalParameter(...) because of some string errors
22
23
24
  Parameters::addGlobalParameter(0,"testMesh1->macro file name","macro/macro.stand.1d");
  Parameters::addGlobalParameter(0,"testMesh2->macro file name","macro/macro.stand.2d");
  Parameters::addGlobalParameter(0,"testMesh3->macro file name","macro/macro.stand.3d");
25

26
27
28
  testMesh(1);
  testMesh(2);
  testMesh(3);
29
30
31
32

  return 0;
}