Commit ee19a4fe authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

error corrected in MacroInfo::readAMDiSMacro due to line-length restrictions

parent f96da515
...@@ -28,7 +28,7 @@ endif() ...@@ -28,7 +28,7 @@ endif()
if(NOT AMDIS_MINOR) if(NOT AMDIS_MINOR)
set(AMDIS_MINOR "9") set(AMDIS_MINOR "9")
endif() endif()
set(COMPILEFLAGS "-DAMDIS_VERSION=${CurrentRevision}") list(APPEND COMPILEFLAGS "-DAMDIS_VERSION=${CurrentRevision}")
#define the build type, empty can be everything and nothing #define the build type, empty can be everything and nothing
if(CMAKE_BUILD_TYPE STREQUAL "") if(CMAKE_BUILD_TYPE STREQUAL "")
...@@ -37,7 +37,7 @@ endif() ...@@ -37,7 +37,7 @@ endif()
if(CMAKE_CXX_COMPILER MATCHES ".*icpc") if(CMAKE_CXX_COMPILER MATCHES ".*icpc")
Message("Compiler: Intel") Message("Compiler: Intel")
set(CMAKE_CXX_FLAGS "-diag-disable 654 -diag-disable 858") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -diag-disable 654 -diag-disable 858")
endif() endif()
......
...@@ -133,7 +133,7 @@ transformDOF(Term term, DOFVector<T>* result) ...@@ -133,7 +133,7 @@ transformDOF(Term term, DOFVector<T>* result)
std::vector<DegreeOfFreedom> localIndices(nBasisFcts); std::vector<DegreeOfFreedom> localIndices(nBasisFcts);
TraverseStack stack; TraverseStack stack;
ElInfo *elInfo = stack.traverseFirst(mesh, -1, ElInfo *elInfo = stack.traverseFirst(mesh, -1,
Mesh::CALL_LEAF_EL | Mesh::CALL_LEAF_EL | Mesh::FILL_BOUND |
Mesh::FILL_COORDS | Mesh::FILL_GRD_LAMBDA); Mesh::FILL_COORDS | Mesh::FILL_GRD_LAMBDA);
term.initElement(&ot, elInfo, NULL, NULL, basisFcts); term.initElement(&ot, elInfo, NULL, NULL, basisFcts);
......
...@@ -243,6 +243,7 @@ namespace AMDiS { ...@@ -243,6 +243,7 @@ namespace AMDiS {
feSpaces = adoptProblem->getFeSpaces(); feSpaces = adoptProblem->getFeSpaces();
traverseInfo = adoptProblem->traverseInfo; traverseInfo = adoptProblem->traverseInfo;
componentSpaces.clear();
if (feSpaces.size() == 1) if (feSpaces.size() == 1)
componentSpaces.resize(nComponents, feSpaces[0]); componentSpaces.resize(nComponents, feSpaces[0]);
else if (adoptProblem->getNumComponents() >= nComponents) { else if (adoptProblem->getNumComponents() >= nComponents) {
......
...@@ -55,7 +55,7 @@ typedef __declspec(align(CACHE_LINE)) size_t aligned_size_t; ...@@ -55,7 +55,7 @@ typedef __declspec(align(CACHE_LINE)) size_t aligned_size_t;
// workaround needed to test for -std=c++11 enabled, since __cplusplus gives wrong values // workaround needed to test for -std=c++11 enabled, since __cplusplus gives wrong values
#include <vector> #include <vector>
#include <functional> #include <functional>
#if defined(_GLIBCXX_TUPLE) || defined(_GLIBCXX_TYPE_TRAITS) || defined(_GLIBCXX_ARRAY) #if defined(_GLIBCXX_TUPLE) || defined(_GLIBCXX_TYPE_TRAITS) || defined(_GLIBCXX_ARRAY) || (__cplusplus > 199711L)
#define HAS_CXX11 1 #define HAS_CXX11 1
......
...@@ -191,6 +191,7 @@ namespace AMDiS ...@@ -191,6 +191,7 @@ namespace AMDiS
const BasisFunction *basisFct = NULL) const BasisFunction *basisFct = NULL)
{ {
int dim = elInfo->getMesh()->getDim(); int dim = elInfo->getMesh()->getDim();
normal.set(0.0);
for (int side = 0; side < dim+1; ++side) { for (int side = 0; side < dim+1; ++side) {
if (elInfo->getBoundary(side) == boundary) { if (elInfo->getBoundary(side) == boundary) {
elInfo->getNormal(side, normal); elInfo->getNormal(side, normal);
......
...@@ -167,7 +167,7 @@ namespace AMDiS { ...@@ -167,7 +167,7 @@ namespace AMDiS {
int nElements, nVertices; int nElements, nVertices;
int j, k; int j, k;
double dbl; double dbl;
char line[256]; char line[1024];
int line_no, n_keys, sort_key[N_KEYS], nv_key, ne_key; int line_no, n_keys, sort_key[N_KEYS], nv_key, ne_key;
int key_def[N_KEYS] = {0,0,0,0,0,0,0,0,0,0,0,0,0}; int key_def[N_KEYS] = {0,0,0,0,0,0,0,0,0,0,0,0,0};
const char *key; const char *key;
...@@ -183,7 +183,7 @@ namespace AMDiS { ...@@ -183,7 +183,7 @@ namespace AMDiS {
// === Looking for all keys in the macro file. === // === Looking for all keys in the macro file. ===
line_no = n_keys = 0; line_no = n_keys = 0;
while (fgets(line, 255, file)) { while (fgets(line, 1023, file)) {
line_no++; line_no++;
if (!strchr(line, ':')) if (!strchr(line, ':'))
continue; continue;
......
...@@ -124,7 +124,20 @@ public: ...@@ -124,7 +124,20 @@ public:
{ FUNCNAME_DBG("ExtendedProblemStat::buildAfterCoarsen()"); { FUNCNAME_DBG("ExtendedProblemStat::buildAfterCoarsen()");
ProblemStat_::buildAfterCoarsen(adaptInfo, flag, asmMatrix, asmVector); ProblemStat_::buildAfterCoarsen(adaptInfo, flag, asmMatrix, asmVector);
bool addPBC = insertPeriodicBC(flag, asmMatrix, asmVector);
bool addDBC = insertDirichletBC(flag, asmMatrix, asmVector);
// update solverMatrix
if (asmMatrix && (addPBC || addDBC))
solverMatrix.setMatrix(*getSystemMatrix());
bc_dof.clear();
}
virtual bool insertPeriodicBC(Flag flag, bool asmMatrix, bool asmVector)
{
// update periodic data // update periodic data
if (oldMeshChangeIdx != getMesh()->getChangeIndex() if (oldMeshChangeIdx != getMesh()->getChangeIndex()
|| flag.isSet(UPDATE_PERIODIC_BC) || flag.isSet(UPDATE_PERIODIC_BC)
...@@ -138,7 +151,13 @@ public: ...@@ -138,7 +151,13 @@ public:
// apply periodic boundary conditions // apply periodic boundary conditions
for (size_t k = 0; k < manualPeriodicBC.size(); k++) for (size_t k = 0; k < manualPeriodicBC.size(); k++)
applyPeriodicBC(manualPeriodicBC[k], asmMatrix, asmVector); applyPeriodicBC(manualPeriodicBC[k], asmMatrix, asmVector);
return (manualPeriodicBC.size() > 0);
}
virtual bool insertDirichletBC(Flag flag, bool asmMatrix, bool asmVector)
{
// update dirichlet data // update dirichlet data
if (oldMeshChangeIdx != getMesh()->getChangeIndex() if (oldMeshChangeIdx != getMesh()->getChangeIndex()
|| flag.isSet(UPDATE_DIRICHLET_BC) || flag.isSet(UPDATE_DIRICHLET_BC)
...@@ -160,14 +179,8 @@ public: ...@@ -160,14 +179,8 @@ public:
MSG("DBC applied at %d DOFs\n", num_dbc); MSG("DBC applied at %d DOFs\n", num_dbc);
#endif #endif
// update solverMatrix return (singularDirichletBC.size() > 0);
if (asmMatrix && (singularDirichletBC.size() > 0 || manualPeriodicBC.size() > 0)) {
solverMatrix.setMatrix(*getSystemMatrix());
}
bc_dof.clear();
} }
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
void solve(AdaptInfo *adaptInfo, void solve(AdaptInfo *adaptInfo,
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#define HEADER_PUGIXML_HPP #define HEADER_PUGIXML_HPP
#include "pugiconfig.hpp" #include "pugiconfig.hpp"
#include <string>
#ifndef PUGIXML_NO_STL #ifndef PUGIXML_NO_STL
namespace std namespace std
...@@ -34,7 +35,7 @@ namespace std ...@@ -34,7 +35,7 @@ namespace std
template <class _Ty> struct char_traits; template <class _Ty> struct char_traits;
template <class _Elem, class _Traits> class basic_istream; template <class _Elem, class _Traits> class basic_istream;
template <class _Elem, class _Traits> class basic_ostream; template <class _Elem, class _Traits> class basic_ostream;
template <class _Elem, class _Traits, class _Ax> class basic_string; // template <class _Elem, class _Traits, class _Ax> class basic_string;
#endif #endif
// Digital Mars compiler has a bug which requires a forward declaration for explicit instantiation (otherwise type selection is messed up later, producing link errors) // Digital Mars compiler has a bug which requires a forward declaration for explicit instantiation (otherwise type selection is messed up later, producing link errors)
......
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