MCPcopy Create free account
hub / github.com/Cantera/cantera / error

Method error

src/equil/MultiPhaseEquil.cpp:626–651  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

624}
625
626double MultiPhaseEquil::error()
627{
628 double err, maxerr = 0.0;
629
630 // examine every reaction
631 for (size_t j = 0; j < nFree(); j++) {
632 size_t ik = j + m_nel;
633
634 // don't require formation reactions for solution species
635 // present in trace amounts to be equilibrated
636 if (!isStoichPhase(ik) && fabs(moles(ik)) <= SmallNumber) {
637 err = 0.0;
638 }
639
640 // for stoichiometric phase species, no error if not present and
641 // delta G for the formation reaction is positive
642 if (isStoichPhase(ik) && moles(ik) <= 0.0 &&
643 m_deltaG_RT[j] >= 0.0) {
644 err = 0.0;
645 } else {
646 err = fabs(m_deltaG_RT[j]);
647 }
648 maxerr = std::max(maxerr, err);
649 }
650 return maxerr;
651}
652
653double MultiPhaseEquil::phaseMoles(size_t iph) const
654{

Callers 14

to_sconsMethod · 0.45
regression_testFunction · 0.45
compare_text_filesFunction · 0.45
compare_profilesFunction · 0.45
compare_csv_filesFunction · 0.45
our_spawnFunction · 0.45
checkout_submoduleFunction · 0.45
check_for_pythonFunction · 0.45
config_errorFunction · 0.45
setLoggerFunction · 0.45
get_python_keywordsFunction · 0.45
get_matlab_keywordsFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected