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

[skip ci] Use sine instead of exp in test problem

parent 7ff9a910
No related branches found
No related tags found
No related merge requests found
...@@ -155,10 +155,10 @@ int main(int argc, char** argv){ ...@@ -155,10 +155,10 @@ int main(int argc, char** argv){
auto xg = e.geometry().global(xl); auto xg = e.geometry().global(xl);
auto center = e.geometry().center(); auto center = e.geometry().center();
if (center.two_norm() < 2){ if (center.two_norm() < 2){
return std::exp((xg.two_norm2()+xg[0]/3)/10); return std::sin((xg.two_norm2()+xg[0]/3)/10);
} }
else{ else{
return std::exp((xg.two_norm2())/10); return std::sin((xg.two_norm2())/10);
} }
}; };
auto interpolate = Dune::PDELab::makeGridFunctionFromCallable(gv, interpolate_lambda); auto interpolate = Dune::PDELab::makeGridFunctionFromCallable(gv, interpolate_lambda);
......
...@@ -225,10 +225,10 @@ int main(int argc, char** argv){ ...@@ -225,10 +225,10 @@ int main(int argc, char** argv){
auto xg = e.geometry().global(xl); auto xg = e.geometry().global(xl);
auto center = e.geometry().center(); auto center = e.geometry().center();
if (center.two_norm() < 2){ if (center.two_norm() < 2){
return std::exp((xg.two_norm2()+xg[0]/3)/10); return std::sin((xg.two_norm2()+xg[0]/3)/10);
} }
else{ else{
return std::exp((xg.two_norm2())/10); return std::sin((xg.two_norm2())/10);
} }
}; };
auto interpolate = Dune::PDELab::makeGridFunctionFromCallable(gv, interpolate_lambda); auto interpolate = Dune::PDELab::makeGridFunctionFromCallable(gv, interpolate_lambda);
...@@ -252,11 +252,8 @@ int main(int argc, char** argv){ ...@@ -252,11 +252,8 @@ int main(int argc, char** argv){
} }
std::cout << std::endl; std::cout << std::endl;
// One 'correct' numerical solution for affine grid
// std::vector<RangeType> solution {-0.21358362254819668, -0.0045507639649666034, -0.23387940454782893, -0.0034803883238202818, -0.28388435136052764, -0.0036071199470257055, -0.29616724425275992, -0.0024060631441813391, 0.22624550160613904, 0.0045507639649666042, 0.27434343572036174, 0.0036071199470257055, 0.23994330599654518, 0.0034803883238202823, 0.28698237938626731, 0.0024060631441813391};
// One 'correct' numerical solution for unstructured grid // One 'correct' numerical solution for unstructured grid
std::vector<RangeType> solution {-0.0030863841236362867, -0.22978168281746664, -0.0026150390153585243, -0.30698780391619385, -0.0030412123593492268, -0.26485878265863122, -0.0020999781238573659, -0.35427141400292156, 0.23561980741366476, 0.0050734736837098667, 0.29964642552207699, 0.0036935145389913175, 0.26978414234091797, 0.0035678302855472873, 0.34706642223985529, 0.0022906809926513372}; 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::cout << "is_permuation: " std::cout << "is_permuation: "
<< fuzzy_is_permutation(solution, residual) << std::endl; << fuzzy_is_permutation(solution, residual) << std::endl;
if (!fuzzy_is_permutation(solution, residual)){ 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