Skip to content
Snippets Groups Projects
Commit 88a7c1e1 authored by René Heß's avatar René Heß
Browse files

[skip ci] Avoid cell volumes in weak formulation of test

Due to a bug in dune-geomtry the volume calculation is not accurate enough. For
now we just remove all volume calls from the weak formulation.
parent f9dbbdd0
No related branches found
No related tags found
No related merge requests found
......@@ -15,9 +15,19 @@ n = FacetNormal(cell)('+')
# penalty factor
alpha = 1.0
h_ext = CellVolume(cell) / FacetArea(cell)
# Note: Cell volume calculation by the MultiLinearGeometry is not accurate
# enough (bug). Until this is fixed we just use 1 for h since the test is
# synthetic anyway.
# h_ext = CellVolume(cell) / FacetArea(cell)
h_ext = 1
gamma_ext = (alpha * degree * (degree + dim - 1)) / h_ext
h_int = Min(CellVolume(cell)('+'), CellVolume(cell)('-')) / FacetArea(cell)
# Note: Cell volume calculation by the MultiLinearGeometry is not accurate
# enough (bug). Until this is fixed we just use 1 for h since the test is
# synthetic anyway.
# h_int = Min(CellVolume(cell)('+'), CellVolume(cell)('-')) / FacetArea(cell)
h_int = 1
gamma_int = (alpha * degree * (degree + dim - 1)) / h_int
# SIPG: -1.0, IIPG: 0.0, NIPG: 1.0
......
......@@ -241,7 +241,7 @@ int main(int argc, char** argv){
Dune::printvector(std::cout, native(r), "residual vector", "row");
std::cout.precision(17);
// std::cout.precision(17);
std::vector<RangeType> residual(16);
for (std::size_t i=0; i<16; ++i){
residual[i] = native(r)[i];
......@@ -253,7 +253,8 @@ int main(int argc, char** argv){
std::cout << std::endl;
// One 'correct' numerical solution for unstructured grid
std::vector<RangeType> solution {-0.0024731701973568277, -0.064863385404943089, -0.0018692117846729169, -0.065411955025839102, -0.0027796990290359252, -0.052239481231842126, -0.0018193481682935208, -0.063508021794159181, 0.065761076628550102, 0.0045404278062097835, 0.06063545488963621, 0.0029356233595935256, 0.059339670479959875, 0.0032536306959760684, 0.05626016802162942, 0.002238220754587723};
std::vector<RangeType> solution {-0.057104007824202004, -0.0024731701973568316, -0.046356852559280147, -0.0027796990290359386, -0.059846762373056507, -0.0018692117846729277, -0.059392343130923175, -0.001819348168293539, 0.0045404278062097974, 0.058001699047809038, 0.003253630695976081, 0.053457041807397923, 0.0029356233595935395, 0.055070262236853566, 0.0022382207545877291, 0.052144489358393387};
std::cout << "is_permuation: "
<< fuzzy_is_permutation(solution, residual) << std::endl;
if (!fuzzy_is_permutation(solution, residual)){
......
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