Skip to content

Commit

Permalink
Add biorthogonal check to all reset locations
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin D. Weinberg committed Oct 1, 2023
1 parent 13bebf1 commit 4979ca4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/Cylinder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,6 @@ Cylinder::Cylinder(Component* c0, const YAML::Node& conf, MixtureBasis *m) :
ortho = std::make_shared<CylEXP>
(nmaxfid, lmaxfid, mmax, nmax, acyl, hcyl, ncylodd, cachename);

// Test for basis consistency
//
orthoTest(ortho->orthoCheck(), "Cylinder", "m");

// Set azimuthal harmonic order restriction?
//
if (mlim>=0) ortho->set_mlim(mlim);
Expand Down Expand Up @@ -379,6 +375,13 @@ Cylinder::Cylinder(Component* c0, const YAML::Node& conf, MixtureBasis *m) :
}
#endif

// Test for basis consistency
//
std::cout << "---- ";
orthoTest(ortho->orthoCheck(), "Cylinder", "m");

// Initialize internal variables
//
ncompcyl = 0;

pos.resize(nthrds);
Expand Down
11 changes: 11 additions & 0 deletions src/Sphere.cc
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ Sphere::Sphere(Component* c0, const YAML::Node& conf, MixtureBasis* m) :
}


// Test for basis consistency
//
std::cout << "---- ";
orthoTest(ortho->orthoCheck(std::max<int>(nmax*5, 100)), "Sphere", "l");

setup();
}

Expand Down Expand Up @@ -322,6 +327,7 @@ void Sphere::make_model_bin()

// Test for basis consistency
//
std::cout << "---- ";
orthoTest(ortho->orthoCheck(std::max<int>(nmax*5, 100)), "Sphere", "l");

// Update time trigger
Expand Down Expand Up @@ -464,6 +470,11 @@ void Sphere::make_model_plummer()
std::string cachename = outdir + cache_file + "." + runtag;
ortho = std::make_shared<SLGridSph>(mod, Lmax, nmax, numr, Rmin, Rmax, false, 1, 1.0, cachename);

// Test for basis consistency
//
std::cout << "---- ";
orthoTest(ortho->orthoCheck(std::max<int>(nmax*5, 100)), "Sphere", "l");

// Update time trigger
//
tnext = tnow + dtime;
Expand Down

0 comments on commit 4979ca4

Please sign in to comment.