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

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

parent f96da515
......@@ -28,7 +28,7 @@ endif()
if(NOT AMDIS_MINOR)
set(AMDIS_MINOR "9")
endif()
set(COMPILEFLAGS "-DAMDIS_VERSION=${CurrentRevision}")
list(APPEND COMPILEFLAGS "-DAMDIS_VERSION=${CurrentRevision}")
#define the build type, empty can be everything and nothing
if(CMAKE_BUILD_TYPE STREQUAL "")
......@@ -37,7 +37,7 @@ endif()
if(CMAKE_CXX_COMPILER MATCHES ".*icpc")
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()
......
......@@ -133,7 +133,7 @@ transformDOF(Term term, DOFVector<T>* result)
std::vector<DegreeOfFreedom> localIndices(nBasisFcts);
TraverseStack stack;
ElInfo *elInfo = stack.traverseFirst(mesh, -1,
Mesh::CALL_LEAF_EL |
Mesh::CALL_LEAF_EL | Mesh::FILL_BOUND |
Mesh::FILL_COORDS | Mesh::FILL_GRD_LAMBDA);
term.initElement(&ot, elInfo, NULL, NULL, basisFcts);
......
......@@ -243,6 +243,7 @@ namespace AMDiS {
feSpaces = adoptProblem->getFeSpaces();
traverseInfo = adoptProblem->traverseInfo;
componentSpaces.clear();
if (feSpaces.size() == 1)
componentSpaces.resize(nComponents, feSpaces[0]);
else if (adoptProblem->getNumComponents() >= nComponents) {
......
......@@ -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
#include <vector>
#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
......
......@@ -191,6 +191,7 @@ namespace AMDiS
const BasisFunction *basisFct = NULL)
{
int dim = elInfo->getMesh()->getDim();
normal.set(0.0);
for (int side = 0; side < dim+1; ++side) {
if (elInfo->getBoundary(side) == boundary) {
elInfo->getNormal(side, normal);
......
......@@ -167,7 +167,7 @@ namespace AMDiS {
int nElements, nVertices;
int j, k;
double dbl;
char line[256];
char line[1024];
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};
const char *key;
......@@ -183,7 +183,7 @@ namespace AMDiS {
// === Looking for all keys in the macro file. ===
line_no = n_keys = 0;
while (fgets(line, 255, file)) {
while (fgets(line, 1023, file)) {
line_no++;
if (!strchr(line, ':'))
continue;
......
......@@ -124,7 +124,20 @@ public:
{ FUNCNAME_DBG("ExtendedProblemStat::buildAfterCoarsen()");
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
if (oldMeshChangeIdx != getMesh()->getChangeIndex()
|| flag.isSet(UPDATE_PERIODIC_BC)
......@@ -138,7 +151,13 @@ public:
// apply periodic boundary conditions
for (size_t k = 0; k < manualPeriodicBC.size(); k++)
applyPeriodicBC(manualPeriodicBC[k], asmMatrix, asmVector);
return (manualPeriodicBC.size() > 0);
}
virtual bool insertDirichletBC(Flag flag, bool asmMatrix, bool asmVector)
{
// update dirichlet data
if (oldMeshChangeIdx != getMesh()->getChangeIndex()
|| flag.isSet(UPDATE_DIRICHLET_BC)
......@@ -160,14 +179,8 @@ public:
MSG("DBC applied at %d DOFs\n", num_dbc);
#endif
// update solverMatrix
if (asmMatrix && (singularDirichletBC.size() > 0 || manualPeriodicBC.size() > 0)) {
solverMatrix.setMatrix(*getSystemMatrix());
}
bc_dof.clear();
return (singularDirichletBC.size() > 0);
}
//////////////////////////////////////////////////////////////////////////////
void solve(AdaptInfo *adaptInfo,
......
......@@ -15,6 +15,7 @@
#define HEADER_PUGIXML_HPP
#include "pugiconfig.hpp"
#include <string>
#ifndef PUGIXML_NO_STL
namespace std
......@@ -34,7 +35,7 @@ namespace std
template <class _Ty> struct char_traits;
template <class _Elem, class _Traits> class basic_istream;
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
// 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