Fixed oversight deriving adaptive refinement options from patch options:

- added missing initialization of max level with patch options
    - added comment to discourage others from making the same mistake
This commit is contained in:
barry 2020-02-10 16:06:26 -08:00
parent 1ab19ec089
commit 673bb1e386

View File

@ -157,7 +157,7 @@ int main(int, char **) {
//
int maxPatchLevel = 3;
Far::PatchTableFactory::Options patchOptions;
Far::PatchTableFactory::Options patchOptions(maxPatchLevel);
patchOptions.SetPatchPrecision<Real>();
patchOptions.useInfSharpPatch = true;
patchOptions.generateVaryingTables = false;
@ -171,6 +171,7 @@ int main(int, char **) {
if (assignAdaptiveOptionsExplicitly) {
adaptiveOptions.useInfSharpPatch = true;
} else {
// Be sure patch options were intialized with the desired max level
adaptiveOptions = patchOptions.GetRefineAdaptiveOptions();
}
assert(adaptiveOptions.useInfSharpPatch == patchOptions.useInfSharpPatch);