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