Skip to content
Snippets Groups Projects
Commit 85b6142e authored by Naumann, Andreas's avatar Naumann, Andreas
Browse files

updated meshtest with dofadmins and checking the functionname pointer in addGlobalParameter now

parent a0c32c71
No related branches found
No related tags found
No related merge requests found
...@@ -691,7 +691,13 @@ namespace AMDiS { ...@@ -691,7 +691,13 @@ namespace AMDiS {
if (key.size() == 0 || par.size() == 0) if (key.size() == 0 || par.size() == 0)
return; return;
singlett->addParam(key, par, std::string(file), line, fname); std::string file_str;
if(file != NULL)
file_str = std::string(file);
std::string fname_str;
if(fname != NULL)
fname_str = std::string(fname);
singlett->addParam(key, par, file_str, line, fname_str);
int val = 10; // defualt for level of information int val = 10; // defualt for level of information
getGlobalParameter(0, "level of information", "%d", &val); getGlobalParameter(0, "level of information", "%d", &val);
......
#include "Mesh.h" #include "Mesh.h"
#include "Parameters.h" #include "Parameters.h"
#include "ProblemScal.h"
#include <sstream>
using namespace AMDiS; using namespace AMDiS;
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();
}
int main(int argc, char** argv) { int main(int argc, char** argv) {
FUNCNAME("no function");
//cannot use Parameters::addGlobalParameter(...) because of some string errors //cannot use Parameters::addGlobalParameter(...) because of some string errors
// ADD_PARAMETER(1,"dimension of world","1"); Parameters::addGlobalParameter(0,"testMesh1->macro file name","macro/macro.stand.1d");
// ADD_PARAMETER(1,"testMesh1->macro file name","macro/macro.stand.1d"); Parameters::addGlobalParameter(0,"testMesh2->macro file name","macro/macro.stand.2d");
// ADD_PARAMETER(1,"testMesh2->macro file name","macro/macro.stand.2d"); Parameters::addGlobalParameter(0,"testMesh3->macro file name","macro/macro.stand.3d");
// ADD_PARAMETER(1,"testMesh3->macro file name","macro/macro.stand.3d");
Parameters::init(1,"init/ball.dat.2d");
Global::init();
Mesh mesh1("ballMesh",2); testMesh(1);
Mesh mesh2("testMesh1",2); testMesh(2);
Mesh mesh3("testMesh1",3); testMesh(3);
mesh1.initialize();
mesh2.initialize();
mesh3.initialize();
return 0; return 0;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment