Commit 1dba0d87 authored by Praetorius, Simon's avatar Praetorius, Simon

Vector_FOT with factor

parent 80fd0375
......@@ -203,13 +203,13 @@ namespace AMDiS {
{
public:
/// Constructor.
Vector_FOT(WorldVector<double> *wv)
: FirstOrderTerm(0), b(wv)
Vector_FOT(WorldVector<double> *wv, double fac_ = 1.0)
: FirstOrderTerm(0), b(wv), fac(fac_)
{}
/// Constructor.
Vector_FOT(int bIdx)
: FirstOrderTerm(0)
Vector_FOT(int bIdx, double fac_ = 1.0)
: FirstOrderTerm(0), fac(fac_)
{
bOne = bIdx;
}
......@@ -223,10 +223,10 @@ namespace AMDiS {
if (bOne > -1) {
for (int iq = 0; iq < nPoints; iq++)
lb_one(grdLambda, Lb[iq], 1.0);
lb_one(grdLambda, Lb[iq], fac);
} else {
for (int iq = 0; iq < nPoints; iq++)
lb(grdLambda, *b, Lb[iq], 1.0);
lb(grdLambda, *b, Lb[iq], fac);
}
}
......@@ -238,14 +238,17 @@ namespace AMDiS {
mtl::dense_vector<double>& result,
double factor)
{
if (num_rows(grdUhAtQP) > 0)
if (num_rows(grdUhAtQP) > 0) {
double factor_ = factor * fac;
for (int iq = 0; iq < nPoints; iq++)
result[iq] += *b * grdUhAtQP[iq] * factor;
result[iq] += *b * grdUhAtQP[iq] * factor_;
}
}
protected:
/// Vector which is multiplied with \f$ \nabla u(\vec{x}) \f$
WorldVector<double> *b;
double fac;
};
/**
......
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