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 f2f2cbed authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Fixed problem with VecAtQP terms without function definition.

parent 204012be
...@@ -148,8 +148,8 @@ namespace AMDiS { ...@@ -148,8 +148,8 @@ namespace AMDiS {
init(); init();
char number[5]; char number[5];
for (int i = 0; i < size; i++) { for (int i = 0; i < size; i++) {
sprintf(number, "[%d]", i); sprintf(number, "[%d]", i);
scalContents[i] = new ScalContent(name + std::string(number)); scalContents[i] = new ScalContent(name + std::string(number));
} }
} }
......
...@@ -179,8 +179,11 @@ namespace AMDiS { ...@@ -179,8 +179,11 @@ namespace AMDiS {
VectorGradient_FOT::VectorGradient_FOT(DOFVectorBase<double> *dv, VectorGradient_FOT::VectorGradient_FOT(DOFVectorBase<double> *dv,
AbstractFunction<WorldVector<double>, WorldVector<double> > *af) AbstractFunction<WorldVector<double>, WorldVector<double> > *af)
: FirstOrderTerm(af->getDegree()), vec(dv), f(af) : FirstOrderTerm(af ? af->getDegree() : dv->getFeSpace()->getBasisFcts()->getDegree()),
vec(dv), f(af)
{ {
FUNCNAME("VectorGradient_FOT::VectorGradient_FOT()");
TEST_EXIT(dv)("No vector!\n"); TEST_EXIT(dv)("No vector!\n");
auxFeSpaces.insert(dv->getFeSpace()); auxFeSpaces.insert(dv->getFeSpace());
...@@ -201,11 +204,10 @@ namespace AMDiS { ...@@ -201,11 +204,10 @@ namespace AMDiS {
if (f) if (f)
for (int iq = 0; iq < nPoints; iq++) for (int iq = 0; iq < nPoints; iq++)
lb(grdLambda, (*f)(gradAtQPs[iq]), Lb[iq], 1.0); lb(grdLambda, (*f)(gradAtQPs[iq]), Lb[iq], 1.0);
else else
for (int iq = 0; iq < nPoints; iq++) for (int iq = 0; iq < nPoints; iq++)
lb(grdLambda, gradAtQPs[iq], Lb[iq], 1.0); lb(grdLambda, gradAtQPs[iq], Lb[iq], 1.0);
} }
void VectorGradient_FOT::eval(int nPoints, void VectorGradient_FOT::eval(int nPoints,
......
...@@ -68,6 +68,8 @@ namespace AMDiS { ...@@ -68,6 +68,8 @@ namespace AMDiS {
template< typename Matrix, typename Vector, typename Mapper > template< typename Matrix, typename Vector, typename Mapper >
int solve(const Matrix& A, Vector& x, Vector& b, Mapper& mapper) int solve(const Matrix& A, Vector& x, Vector& b, Mapper& mapper)
{ {
FUNCNAME("MTL4Solver::solve()");
Timer t; Timer t;
if(num_rows(matrix) == 0 || !getMultipleRhs() ) { if(num_rows(matrix) == 0 || !getMultipleRhs() ) {
init(mapper, mtl::traits::is_distributed<MTLMatrix>()); init(mapper, mtl::traits::is_distributed<MTLMatrix>());
......
...@@ -65,7 +65,7 @@ namespace AMDiS { ...@@ -65,7 +65,7 @@ namespace AMDiS {
// check if all terms are pw_const // check if all terms are pw_const
bool pwConst = true; bool pwConst = true;
for (int i = 0; i < static_cast<int>(op->zeroOrder.size()); i++) { for (unsigned int i = 0; i < op->zeroOrder.size(); i++) {
if (!op->zeroOrder[i]->isPWConst()) { if (!op->zeroOrder[i]->isPWConst()) {
pwConst = false; pwConst = false;
break; break;
...@@ -79,7 +79,7 @@ namespace AMDiS { ...@@ -79,7 +79,7 @@ namespace AMDiS {
if (pwConst) if (pwConst)
newAssembler = new PrecalcZOA(op, assembler, quad); newAssembler = new PrecalcZOA(op, assembler, quad);
else else
newAssembler = new FastQuadZOA(op, assembler, quad); newAssembler = new FastQuadZOA(op, assembler, quad);
} }
subAssemblers->push_back(newAssembler); subAssemblers->push_back(newAssembler);
...@@ -94,7 +94,8 @@ namespace AMDiS { ...@@ -94,7 +94,8 @@ namespace AMDiS {
} }
void StandardZOA::calculateElementMatrix(const ElInfo *elInfo, ElementMatrix& mat) void StandardZOA::calculateElementMatrix(const ElInfo *elInfo,
ElementMatrix& mat)
{ {
const BasisFunction *psi = rowFeSpace->getBasisFcts(); const BasisFunction *psi = rowFeSpace->getBasisFcts();
const BasisFunction *phi = colFeSpace->getBasisFcts(); const BasisFunction *phi = colFeSpace->getBasisFcts();
...@@ -261,8 +262,11 @@ namespace AMDiS { ...@@ -261,8 +262,11 @@ namespace AMDiS {
} }
void PrecalcZOA::calculateElementMatrix(const ElInfo *elInfo, ElementMatrix& mat) void PrecalcZOA::calculateElementMatrix(const ElInfo *elInfo,
ElementMatrix& mat)
{ {
FUNCNAME("PrecalcZOA::calculateElementMatrix()");
if (firstCall) { if (firstCall) {
q00 = Q00PsiPhi::provideQ00PsiPhi(rowFeSpace->getBasisFcts(), q00 = Q00PsiPhi::provideQ00PsiPhi(rowFeSpace->getBasisFcts(),
colFeSpace->getBasisFcts(), colFeSpace->getBasisFcts(),
...@@ -281,25 +285,26 @@ namespace AMDiS { ...@@ -281,25 +285,26 @@ namespace AMDiS {
if (symmetric) { if (symmetric) {
for (int i = 0; i < nRow; i++) { for (int i = 0; i < nRow; i++) {
mat[i][i] += c[0] * q00->getValue(i,i); mat[i][i] += c[0] * q00->getValue(i,i);
for (int j = i + 1; j < nCol; j++) { for (int j = i + 1; j < nCol; j++) {
double val = c[0] * q00->getValue(i, j); double val = c[0] * q00->getValue(i, j);
mat[i][j] += val; mat[i][j] += val;
mat[j][i] += val; mat[j][i] += val;
} }
} }
} else { } else {
for (int i = 0; i < nRow; i++) { for (int i = 0; i < nRow; i++)
for (int j = 0; j < nCol; j++) { for (int j = 0; j < nCol; j++)
mat[i][j] += c[0] * q00->getValue(i, j); mat[i][j] += c[0] * q00->getValue(i, j);
}
}
} }
} }
void PrecalcZOA::calculateElementVector(const ElInfo *elInfo, ElementVector& vec) void PrecalcZOA::calculateElementVector(const ElInfo *elInfo,
ElementVector& vec)
{ {
FUNCNAME("PrecalcZOA::calculateElementVector()");
if (firstCall) { if (firstCall) {
q00 = Q00PsiPhi::provideQ00PsiPhi(rowFeSpace->getBasisFcts(), q00 = Q00PsiPhi::provideQ00PsiPhi(rowFeSpace->getBasisFcts(),
colFeSpace->getBasisFcts(), colFeSpace->getBasisFcts(),
......
...@@ -19,8 +19,11 @@ namespace AMDiS { ...@@ -19,8 +19,11 @@ namespace AMDiS {
VecAtQP_ZOT::VecAtQP_ZOT(DOFVectorBase<double> *dv, VecAtQP_ZOT::VecAtQP_ZOT(DOFVectorBase<double> *dv,
AbstractFunction<double, double> *af) AbstractFunction<double, double> *af)
: ZeroOrderTerm(af ? af->getDegree() : 0), vec(dv), f(af) : ZeroOrderTerm(af ? af->getDegree() : dv->getFeSpace()->getBasisFcts()->getDegree()),
vec(dv), f(af)
{ {
FUNCNAME("VecAtQP_ZOT::VecAtQP_ZOT()");
TEST_EXIT(dv)("No vector!\n"); TEST_EXIT(dv)("No vector!\n");
auxFeSpaces.insert(dv->getFeSpace()); auxFeSpaces.insert(dv->getFeSpace());
...@@ -48,10 +51,10 @@ namespace AMDiS { ...@@ -48,10 +51,10 @@ namespace AMDiS {
{ {
if (f) { if (f) {
for (int iq = 0; iq < nPoints; iq++) for (int iq = 0; iq < nPoints; iq++)
C[iq] += (*f)(vecAtQPs[iq]); C[iq] += (*f)(vecAtQPs[iq]);
} else { } else {
for (int iq = 0; iq < nPoints; iq++) for (int iq = 0; iq < nPoints; iq++)
C[iq] += vecAtQPs[iq]; C[iq] += vecAtQPs[iq];
} }
} }
...@@ -65,10 +68,10 @@ namespace AMDiS { ...@@ -65,10 +68,10 @@ namespace AMDiS {
{ {
if (f) { if (f) {
for (int iq = 0; iq < nPoints; iq++) for (int iq = 0; iq < nPoints; iq++)
result[iq] += fac * (*f)(vecAtQPs[iq]) * uhAtQP[iq]; result[iq] += fac * (*f)(vecAtQPs[iq]) * uhAtQP[iq];
} else { } else {
for (int iq = 0; iq < nPoints; iq++) for (int iq = 0; iq < nPoints; iq++)
result[iq] += fac * vecAtQPs[iq] * uhAtQP[iq]; result[iq] += fac * vecAtQPs[iq] * uhAtQP[iq];
} }
} }
......
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