Commit 9d352199 authored by Praetorius, Simon's avatar Praetorius, Simon

resolved some review comments on initefile and meshstructure

parent 5b211985
Pipeline #1657 passed with stages
in 43 minutes and 3 seconds
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
#include <boost/lexical_cast.hpp> #include <boost/lexical_cast.hpp>
#include <boost/numeric/conversion/cast.hpp> #include <boost/numeric/conversion/cast.hpp>
#include <boost/thread/shared_mutex.hpp> // requires c++14
#include <boost/type_traits.hpp> #include <boost/type_traits.hpp>
...@@ -423,8 +422,6 @@ namespace AMDiS { ...@@ -423,8 +422,6 @@ namespace AMDiS {
template<typename T> template<typename T>
static void get(const std::string tag, T& value, int debugInfo = -1) static void get(const std::string tag, T& value, int debugInfo = -1)
{ {
// boost::shared_lock<boost::shared_mutex> lock(singlett().mutex_);
if (debugInfo == -1) if (debugInfo == -1)
debugInfo = singlett().getMsgInfo(); debugInfo = singlett().getMsgInfo();
else { else {
...@@ -498,8 +495,6 @@ namespace AMDiS { ...@@ -498,8 +495,6 @@ namespace AMDiS {
/// return InitEntry object for tag tag /// return InitEntry object for tag tag
static InitEntry get(const std::string tag) static InitEntry get(const std::string tag)
{ {
// boost::shared_lock<boost::shared_mutex> lock(singlett().mutex_);
InitEntry result; InitEntry result;
std::string valStr; std::string valStr;
...@@ -527,8 +522,6 @@ else if(error_code == TAG_NOT_FOUND_BREAK) ...@@ -527,8 +522,6 @@ else if(error_code == TAG_NOT_FOUND_BREAK)
template<typename T> template<typename T>
static void set(const std::string tag, T const& value, int debugInfo= -1) static void set(const std::string tag, T const& value, int debugInfo= -1)
{ {
// boost::unique_lock<boost::shared_mutex> lock(singlett().mutex_);
if (debugInfo == -1) if (debugInfo == -1)
debugInfo = singlett().getMsgInfo(); debugInfo = singlett().getMsgInfo();
...@@ -578,14 +571,14 @@ else if(error_code == TAG_NOT_FOUND_BREAK) ...@@ -578,14 +571,14 @@ else if(error_code == TAG_NOT_FOUND_BREAK)
{ {
singlett().clear(); singlett().clear();
} }
/// save singlett-data to file with filename fn /// save singlett-data to file with filename fn
static void save(std::string fn) static void save(std::string fn)
{ {
singlett().write(fn); singlett().write(fn);
} }
// list of included filenames // list of included filenames
static std::set< std::string >& getIncludeList() static std::set< std::string >& getIncludeList()
...@@ -593,7 +586,7 @@ else if(error_code == TAG_NOT_FOUND_BREAK) ...@@ -593,7 +586,7 @@ else if(error_code == TAG_NOT_FOUND_BREAK)
static std::set< std::string > include_list; static std::set< std::string > include_list;
return include_list; return include_list;
} }
protected: protected:
Initfile() Initfile()
: msgInfo(0), : msgInfo(0),
...@@ -656,8 +649,6 @@ protected: ...@@ -656,8 +649,6 @@ protected:
void getInternalParameters(); void getInternalParameters();
int msgInfo, msgWait, paramInfo, breakOnMissingTag; int msgInfo, msgWait, paramInfo, breakOnMissingTag;
// mutable boost::shared_mutex mutex_;
}; };
typedef Initfile Parameters; typedef Initfile Parameters;
......
...@@ -280,25 +280,25 @@ namespace AMDiS { ...@@ -280,25 +280,25 @@ namespace AMDiS {
bool cont = true; bool cont = true;
while (cont) { while (cont) {
bool cont1; bool cont1;
// #ifndef NDEBUG #ifndef NDEBUG
bool cont2; bool cont2;
// #endif #endif
if (structure1->isLeafElement() == structure2->isLeafElement()) { if (structure1->isLeafElement() == structure2->isLeafElement()) {
cont1 = structure1->nextElement(result); cont1 = structure1->nextElement(result);
// #ifndef NDEBUG #ifndef NDEBUG
cont2 = structure2->nextElement(); cont2 = structure2->nextElement();
// #endif #endif
} else { } else {
if (structure1->isLeafElement()) { if (structure1->isLeafElement()) {
cont1 = structure1->nextElement(); cont1 = structure1->nextElement();
// #ifndef NDEBUG #ifndef NDEBUG
cont2 = structure2->skipBranch(result); cont2 = structure2->skipBranch(result);
// #endif #endif
} else { } else {
cont1 = structure1->skipBranch(result); cont1 = structure1->skipBranch(result);
// #ifndef NDEBUG #ifndef NDEBUG
cont2 = structure2->nextElement(); cont2 = structure2->nextElement();
// #endif #endif
} }
} }
TEST_EXIT_DBG(cont1 == cont2)("Structures don't match!\n"); TEST_EXIT_DBG(cont1 == cont2)("Structures don't match!\n");
...@@ -504,7 +504,7 @@ namespace AMDiS { ...@@ -504,7 +504,7 @@ namespace AMDiS {
elInfo = stack.traverseNext(elInfo); elInfo = stack.traverseNext(elInfo);
} }
} }
void MeshStructure::setMeshStructureValues(int macroElIndex, void MeshStructure::setMeshStructureValues(int macroElIndex,
DOFVector<double>* vec, DOFVector<double>* vec,
...@@ -519,7 +519,7 @@ namespace AMDiS { ...@@ -519,7 +519,7 @@ namespace AMDiS {
Mesh *mesh = feSpace->getMesh(); Mesh *mesh = feSpace->getMesh();
bool feSpaceHasNonVertexDofs = (feSpace->getBasisFcts()->getDegree() > 1); bool feSpaceHasNonVertexDofs = (feSpace->getBasisFcts()->getDegree() > 1);
int nVertexPreDofs = feSpace->getAdmin()->getNumberOfPreDofs(VERTEX); int nVertexPreDofs = feSpace->getAdmin()->getNumberOfPreDofs(VERTEX);
std::size_t counter = 0; std::size_t counter = 0;
if (withElIndex) { if (withElIndex) {
TEST_EXIT(static_cast<int>(values[0]) == macroElIndex) TEST_EXIT(static_cast<int>(values[0]) == macroElIndex)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment