Liebe Gitlab-Nutzer, lieber Gitlab-Nutzer, es ist nun möglich sich mittels des ZIH-Logins/LDAP an unserem Dienst anzumelden. Ein Anmelden über dieses erzeugt ein neues Konto. Das alte Konto ist über den Reiter "Standard" erreichbar. Die Administratoren

Dear Gitlab user, it is now possible to log in to our service using the ZIH login/LDAP. Logging in via this will create a new account. The old account can be accessed via the "Standard" tab. The administrators

Commit 932281a3 authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Merge of two version.

parent 9ff3e2b6
...@@ -97,6 +97,7 @@ ...@@ -97,6 +97,7 @@
#include "Traverse.h" #include "Traverse.h"
#include "Triangle.h" #include "Triangle.h"
#include "ValueWriter.h" #include "ValueWriter.h"
#include "VertexVector.h"
#include "VtkWriter.h" #include "VtkWriter.h"
#include "ZeroOrderTerm.h" #include "ZeroOrderTerm.h"
......
...@@ -19,6 +19,7 @@ namespace AMDiS { ...@@ -19,6 +19,7 @@ namespace AMDiS {
} }
} }
void AdaptInfo::serialize(std::ostream& out) void AdaptInfo::serialize(std::ostream& out)
{ {
out << name << "\n"; out << name << "\n";
...@@ -42,9 +43,9 @@ namespace AMDiS { ...@@ -42,9 +43,9 @@ namespace AMDiS {
SerUtil::serialize(out, solverTolerance); SerUtil::serialize(out, solverTolerance);
SerUtil::serialize(out, solverResidual); SerUtil::serialize(out, solverResidual);
int size = static_cast<int>(scalContents.size()); unsigned int size = scalContents.size();
SerUtil::serialize(out, size); SerUtil::serialize(out, size);
for (int i = 0; i < size; i++) { for (unsigned int i = 0; i < size; i++) {
SerUtil::serialize(out, scalContents[i]->est_sum); SerUtil::serialize(out, scalContents[i]->est_sum);
SerUtil::serialize(out, scalContents[i]->est_t_sum); SerUtil::serialize(out, scalContents[i]->est_t_sum);
SerUtil::serialize(out, scalContents[i]->est_max); SerUtil::serialize(out, scalContents[i]->est_max);
...@@ -61,6 +62,7 @@ namespace AMDiS { ...@@ -61,6 +62,7 @@ namespace AMDiS {
} }
} }
void AdaptInfo::deserialize(std::istream& in) void AdaptInfo::deserialize(std::istream& in)
{ {
in >> name; in >> name;
......
...@@ -12,31 +12,35 @@ namespace AMDiS { ...@@ -12,31 +12,35 @@ namespace AMDiS {
std::map<BoundaryType, std::vector<BoundaryCondition*> > std::map<BoundaryType, std::vector<BoundaryCondition*> >
BoundaryManager::globalBoundaryMap; BoundaryManager::globalBoundaryMap;
BoundaryManager::BoundaryManager(const FiniteElemSpace *feSpace) BoundaryManager::BoundaryManager(const FiniteElemSpace *feSpace)
{ {
localBounds.resize(omp_get_overall_max_threads()); localBounds.resize(omp_get_overall_max_threads());
dofIndices.resize(omp_get_overall_max_threads()); dofIndices.resize(omp_get_overall_max_threads());
allocatedMemoryLocalBounds = feSpace->getBasisFcts()->getNumber(); allocatedMemoryLocalBounds = feSpace->getBasisFcts()->getNumber();
for (int i = 0; i < static_cast<int>(localBounds.size()); i++) for (unsigned int i = 0; i < localBounds.size(); i++)
localBounds[i] = new BoundaryType[allocatedMemoryLocalBounds]; localBounds[i] = new BoundaryType[allocatedMemoryLocalBounds];
} }
BoundaryManager::BoundaryManager(BoundaryManager &bm) BoundaryManager::BoundaryManager(BoundaryManager &bm)
{ {
localBCs = bm.localBCs; localBCs = bm.localBCs;
allocatedMemoryLocalBounds = bm.allocatedMemoryLocalBounds; allocatedMemoryLocalBounds = bm.allocatedMemoryLocalBounds;
localBounds.resize(bm.localBounds.size()); localBounds.resize(bm.localBounds.size());
dofIndices.resize(bm.localBounds.size()); dofIndices.resize(bm.localBounds.size());
for (int i = 0; i < static_cast<int>(localBounds.size()); i++) for (unsigned int i = 0; i < localBounds.size(); i++)
localBounds[i] = new BoundaryType[allocatedMemoryLocalBounds]; localBounds[i] = new BoundaryType[allocatedMemoryLocalBounds];
} }
BoundaryManager::~BoundaryManager() BoundaryManager::~BoundaryManager()
{ {
for (int i = 0; i < static_cast<int>(localBounds.size()); i++) for (unsigned int i = 0; i < localBounds.size(); i++)
delete [] localBounds[i]; delete [] localBounds[i];
} }
double BoundaryManager::boundResidual(ElInfo *elInfo, double BoundaryManager::boundResidual(ElInfo *elInfo,
DOFMatrix *matrix, DOFMatrix *matrix,
const DOFVectorBase<double> *dv) const DOFVectorBase<double> *dv)
...@@ -49,6 +53,7 @@ namespace AMDiS { ...@@ -49,6 +53,7 @@ namespace AMDiS {
return result; return result;
} }
void BoundaryManager::fillBoundaryConditions(ElInfo *elInfo, void BoundaryManager::fillBoundaryConditions(ElInfo *elInfo,
DOFVectorBase<double> *vec) DOFVectorBase<double> *vec)
{ {
...@@ -80,6 +85,7 @@ namespace AMDiS { ...@@ -80,6 +85,7 @@ namespace AMDiS {
} }
} }
void BoundaryManager::fillBoundaryConditions(ElInfo *elInfo, DOFMatrix *mat) void BoundaryManager::fillBoundaryConditions(ElInfo *elInfo, DOFMatrix *mat)
{ {
if (localBCs.size() <= 0) if (localBCs.size() <= 0)
...@@ -111,6 +117,7 @@ namespace AMDiS { ...@@ -111,6 +117,7 @@ namespace AMDiS {
localBound, nBasFcts); localBound, nBasFcts);
} }
void BoundaryManager::initMatrix(DOFMatrix *matrix) void BoundaryManager::initMatrix(DOFMatrix *matrix)
{ {
for (BoundaryIndexMap::iterator it = localBCs.begin(); it != localBCs.end(); ++it) for (BoundaryIndexMap::iterator it = localBCs.begin(); it != localBCs.end(); ++it)
...@@ -122,6 +129,7 @@ namespace AMDiS { ...@@ -122,6 +129,7 @@ namespace AMDiS {
(*it).second->initMatrix(matrix); (*it).second->initMatrix(matrix);
} }
void BoundaryManager::exitMatrix(DOFMatrix *matrix) void BoundaryManager::exitMatrix(DOFMatrix *matrix)
{ {
for (BoundaryIndexMap::iterator it = localBCs.begin(); it != localBCs.end(); ++it) for (BoundaryIndexMap::iterator it = localBCs.begin(); it != localBCs.end(); ++it)
...@@ -133,6 +141,7 @@ namespace AMDiS { ...@@ -133,6 +141,7 @@ namespace AMDiS {
(*it).second->exitMatrix(matrix); (*it).second->exitMatrix(matrix);
} }
void BoundaryManager::initVector(DOFVectorBase<double> *vector) void BoundaryManager::initVector(DOFVectorBase<double> *vector)
{ {
for (BoundaryIndexMap::iterator it = localBCs.begin(); it != localBCs.end(); ++it) for (BoundaryIndexMap::iterator it = localBCs.begin(); it != localBCs.end(); ++it)
...@@ -144,6 +153,7 @@ namespace AMDiS { ...@@ -144,6 +153,7 @@ namespace AMDiS {
(*it).second->initVector(vector); (*it).second->initVector(vector);
} }
void BoundaryManager::exitVector(DOFVectorBase<double> *vector) void BoundaryManager::exitVector(DOFVectorBase<double> *vector)
{ {
for (BoundaryIndexMap::iterator it = localBCs.begin(); it != localBCs.end(); ++it) for (BoundaryIndexMap::iterator it = localBCs.begin(); it != localBCs.end(); ++it)
......
...@@ -14,6 +14,7 @@ namespace AMDiS { ...@@ -14,6 +14,7 @@ namespace AMDiS {
auxFeSpaces.insert(dv->getFeSpace()); auxFeSpaces.insert(dv->getFeSpace());
} }
void VecAtQP_ZOT::initElement(const ElInfo* elInfo, void VecAtQP_ZOT::initElement(const ElInfo* elInfo,
SubAssembler* subAssembler, SubAssembler* subAssembler,
Quadrature *quad) Quadrature *quad)
...@@ -21,6 +22,7 @@ namespace AMDiS { ...@@ -21,6 +22,7 @@ namespace AMDiS {
vecAtQPs = getVectorAtQPs(vec, elInfo, subAssembler, quad); vecAtQPs = getVectorAtQPs(vec, elInfo, subAssembler, quad);
} }
void VecAtQP_ZOT::initElement(const ElInfo* smallElInfo, void VecAtQP_ZOT::initElement(const ElInfo* smallElInfo,
const ElInfo* largeElInfo, const ElInfo* largeElInfo,
SubAssembler* subAssembler, SubAssembler* subAssembler,
...@@ -29,6 +31,7 @@ namespace AMDiS { ...@@ -29,6 +31,7 @@ namespace AMDiS {
vecAtQPs = getVectorAtQPs(vec, smallElInfo, largeElInfo, subAssembler, quad); vecAtQPs = getVectorAtQPs(vec, smallElInfo, largeElInfo, subAssembler, quad);
} }
void VecAtQP_ZOT::getC(const ElInfo *, int nPoints, std::vector<double> &C) void VecAtQP_ZOT::getC(const ElInfo *, int nPoints, std::vector<double> &C)
{ {
if (f) { if (f) {
...@@ -40,6 +43,7 @@ namespace AMDiS { ...@@ -40,6 +43,7 @@ namespace AMDiS {
} }
} }
void VecAtQP_ZOT::eval(int nPoints, void VecAtQP_ZOT::eval(int nPoints,
const double *uhAtQP, const double *uhAtQP,
const WorldVector<double> *grdUhAtQP, const WorldVector<double> *grdUhAtQP,
...@@ -73,6 +77,7 @@ namespace AMDiS { ...@@ -73,6 +77,7 @@ namespace AMDiS {
auxFeSpaces.insert(dv2->getFeSpace()); auxFeSpaces.insert(dv2->getFeSpace());
} }
void MultVecAtQP_ZOT::initElement(const ElInfo* elInfo, void MultVecAtQP_ZOT::initElement(const ElInfo* elInfo,
SubAssembler* subAssembler, SubAssembler* subAssembler,
Quadrature *quad) Quadrature *quad)
...@@ -81,12 +86,14 @@ namespace AMDiS { ...@@ -81,12 +86,14 @@ namespace AMDiS {
vecAtQPs2 = getVectorAtQPs(vec2, elInfo, subAssembler, quad); vecAtQPs2 = getVectorAtQPs(vec2, elInfo, subAssembler, quad);
} }
void MultVecAtQP_ZOT::getC(const ElInfo *, int nPoints, std::vector<double> &C) void MultVecAtQP_ZOT::getC(const ElInfo *, int nPoints, std::vector<double> &C)
{ {
for (int iq = 0; iq < nPoints; iq++) for (int iq = 0; iq < nPoints; iq++)
C[iq] += (*f1)(vecAtQPs1[iq]) * (*f2)(vecAtQPs2[iq]); C[iq] += (*f1)(vecAtQPs1[iq]) * (*f2)(vecAtQPs2[iq]);
} }
void MultVecAtQP_ZOT::eval(int nPoints, void MultVecAtQP_ZOT::eval(int nPoints,
const double *uhAtQP, const double *uhAtQP,
const WorldVector<double> *grdUhAtQP, const WorldVector<double> *grdUhAtQP,
...@@ -113,6 +120,7 @@ namespace AMDiS { ...@@ -113,6 +120,7 @@ namespace AMDiS {
auxFeSpaces.insert(dv2->getFeSpace()); auxFeSpaces.insert(dv2->getFeSpace());
} }
void Vec2AtQP_ZOT::initElement(const ElInfo* elInfo, void Vec2AtQP_ZOT::initElement(const ElInfo* elInfo,
SubAssembler* subAssembler, SubAssembler* subAssembler,
Quadrature *quad) Quadrature *quad)
...@@ -520,35 +528,38 @@ namespace AMDiS { ...@@ -520,35 +528,38 @@ namespace AMDiS {
{ {
vecsAtQPs.resize(vecs.size()); vecsAtQPs.resize(vecs.size());
for (int i = 0; i < static_cast<int>(dv.size()); i++) { for (unsigned int i = 0; i < dv.size(); i++) {
TEST_EXIT(dv[i])("One vector is NULL!\n"); TEST_EXIT(dv[i])("One vector is NULL!\n");
auxFeSpaces.insert(dv[i]->getFeSpace()); auxFeSpaces.insert(dv[i]->getFeSpace());
} }
} }
void VecOfDOFVecsAtQP_ZOT::initElement(const ElInfo* elInfo, void VecOfDOFVecsAtQP_ZOT::initElement(const ElInfo* elInfo,
SubAssembler* subAssembler, SubAssembler* subAssembler,
Quadrature *quad) Quadrature *quad)
{ {
int size = static_cast<int>(vecs.size()); unsigned int size = vecs.size();
for (int i = 0; i < size; i++) for (unsigned int i = 0; i < size; i++)
vecsAtQPs[i] = getVectorAtQPs(vecs[i], elInfo, subAssembler, quad); vecsAtQPs[i] = getVectorAtQPs(vecs[i], elInfo, subAssembler, quad);
} }
void VecOfDOFVecsAtQP_ZOT::getC(const ElInfo *, int nPoints, std::vector<double> &C) void VecOfDOFVecsAtQP_ZOT::getC(const ElInfo *, int nPoints, std::vector<double> &C)
{ {
int size = static_cast<int>(vecs.size()); unsigned int size = vecs.size();
std::vector<double> arg(size); std::vector<double> arg(size);
for (int iq = 0; iq < nPoints; iq++) { for (int iq = 0; iq < nPoints; iq++) {
for (int i = 0; i < size; i++) for (unsigned int i = 0; i < size; i++)
arg[i] = vecsAtQPs[i][iq]; arg[i] = vecsAtQPs[i][iq];
C[iq] += (*f)(arg); C[iq] += (*f)(arg);
} }
} }
void VecOfDOFVecsAtQP_ZOT::eval(int nPoints, void VecOfDOFVecsAtQP_ZOT::eval(int nPoints,
const double *uhAtQP, const double *uhAtQP,
const WorldVector<double> *grdUhAtQP, const WorldVector<double> *grdUhAtQP,
......
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