Cloudy & Associates

Commit e15c592a authored by Chatzikos, Marios's avatar Chatzikos, Marios
Browse files

Enable the prototype GTH algorithm for all species

In the previous implementation, Robin had applied the prototype GTH
algorithm only for the pathological case of Ca 1.

With this changeset, the coverage is extended over all species (whose
sum of sources is 0).  It passes the test suite without any problems
and in fact it improves the wallclock performance of the code.

It is committed to allow for further testing with all the platforms we
support.  The hope is to include this GTH prototype in the upcoming
release.
parent bf87c4d6
......@@ -508,7 +508,7 @@ void Atom_LevelN::operator()(
// matrices in double precision.
bool DO_GTH = false, compareGTH = false;
bool DO_GTH = true, compareGTH = false;
if (DO_GTH || compareGTH )
{
amat2 = amat;
......@@ -563,7 +563,7 @@ void Atom_LevelN::operator()(
if (!DO_GTH)
{
{
// Use old matrix solution infrastructure
ner = solve_system(amat.vals(), bvec, nlev, NULL);
......@@ -590,7 +590,7 @@ void Atom_LevelN::operator()(
{
// Only use GTH solution to deal with problem in hand, look
// to extend the scope of this in due course.
if ( totsrc <= 0. && strcmp(chLabel,"Ca 1") == 0 )
if ( totsrc <= 0. /* && strcmp(chLabel,"Ca 1") == 0 */ )
{
gthsolve(amat2, bvec, nlev, abund);
ner = 0;
......@@ -600,7 +600,7 @@ void Atom_LevelN::operator()(
ner = solve_system(amat.vals(), bvec, nlev, NULL);
}
}
if( lgImgMatrix && save.img_matrix.matchIteration( iteration ) &&
save.img_matrix.matchZone( nzone ) )
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment