Skip to content
Snippets Groups Projects
Commit 0b99569e authored by Timo Koch's avatar Timo Koch
Browse files

Merge branch 'cleanup/1p-discrete-convtest-period' into 'master'

[test][1p][conv_disc] do not multiply period by pi

See merge request !3121
parents ab15a7a7 c5c5d524
No related branches found
No related tags found
1 merge request!3121[test][1p][conv_disc] do not multiply period by pi
Pipeline #16889 failed with stages
in 0 seconds
[Problem]
Name = 1p_convergence
SourceIntegrationOrder = 3
ExactSolPeriodLength = 2.0
ExactSolPeriodLength = 6.2831
EnableGravity = false
[Grid]
......
......@@ -119,14 +119,12 @@ public:
const auto x = p[0];
const auto y = p[1];
const auto preFactor = -1.0 * periodLength_ * periodLength_ * M_PI * M_PI;
const auto preFactorArg = periodLength_ * M_PI;
const auto sineTerm = sin(preFactorArg * x);
const auto cosTerm = cos(preFactorArg * y);
const auto secondDeriv = preFactor * sineTerm * cosTerm;
const auto sineTerm = sin(periodLength_*x);
const auto cosTerm = cos(periodLength_*y);
const auto secondDeriv = -1.0*periodLength_*periodLength_*sineTerm*cosTerm;
// derivative in x and y are identical
source -= 2.0 * k * secondDeriv * qp.weight() * eg.integrationElement(qp.position());
source -= 2.0*k*secondDeriv*qp.weight()*eg.integrationElement(qp.position());
}
source /= eg.volume();
......@@ -145,9 +143,7 @@ public:
using std::cos;
using std::sin;
const auto preFactorArg = periodLength * M_PI;
const auto u = sin(preFactorArg * x) * cos(preFactorArg * y);
const auto u = sin(periodLength*x)*cos(periodLength*y);
return PrimaryVariables(u);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment