Commit f2f2cbed authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Fixed problem with VecAtQP terms without function definition.

parent 204012be
......@@ -179,8 +179,11 @@ namespace AMDiS {
VectorGradient_FOT::VectorGradient_FOT(DOFVectorBase<double> *dv,
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");
auxFeSpaces.insert(dv->getFeSpace());
......@@ -205,7 +208,6 @@ namespace AMDiS {
else
for (int iq = 0; iq < nPoints; iq++)
lb(grdLambda, gradAtQPs[iq], Lb[iq], 1.0);
}
void VectorGradient_FOT::eval(int nPoints,
......
......@@ -68,6 +68,8 @@ namespace AMDiS {
template< typename Matrix, typename Vector, typename Mapper >
int solve(const Matrix& A, Vector& x, Vector& b, Mapper& mapper)
{
FUNCNAME("MTL4Solver::solve()");
Timer t;
if(num_rows(matrix) == 0 || !getMultipleRhs() ) {
init(mapper, mtl::traits::is_distributed<MTLMatrix>());
......
......@@ -65,7 +65,7 @@ namespace AMDiS {
// check if all terms are pw_const
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()) {
pwConst = false;
break;
......@@ -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 *phi = colFeSpace->getBasisFcts();
......@@ -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) {
q00 = Q00PsiPhi::provideQ00PsiPhi(rowFeSpace->getBasisFcts(),
colFeSpace->getBasisFcts(),
......@@ -289,17 +293,18 @@ namespace AMDiS {
}
}
} else {
for (int i = 0; i < nRow; i++) {
for (int j = 0; j < nCol; j++) {
for (int i = 0; i < nRow; i++)
for (int j = 0; j < nCol; 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) {
q00 = Q00PsiPhi::provideQ00PsiPhi(rowFeSpace->getBasisFcts(),
colFeSpace->getBasisFcts(),
......
......@@ -19,8 +19,11 @@ namespace AMDiS {
VecAtQP_ZOT::VecAtQP_ZOT(DOFVectorBase<double> *dv,
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");
auxFeSpaces.insert(dv->getFeSpace());
......
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