ksolve/GssaVoxelPools.cpp File Reference

#include "header.h"
#include "RateTerm.h"
#include "FuncTerm.h"
#include "SparseMatrix.h"
#include "KinSparseMatrix.h"
#include "VoxelPoolsBase.h"
#include "../mesh/VoxelJunction.h"
#include "XferInfo.h"
#include "ZombiePoolInterface.h"
#include "Stoich.h"
#include "GssaSystem.h"
#include "GssaVoxelPools.h"
#include "../randnum/randnum.h"
Include dependency graph for GssaVoxelPools.cpp:

Variables

const double SAFETY_FACTOR = 1.0 + 1.0e-9

Variable Documentation

const double SAFETY_FACTOR = 1.0 + 1.0e-9

The SAFETY_FACTOR Protects against the total propensity exceeding the cumulative sum of propensities, atot. We do a lot of adding and subtracting of dependency terms from atot. Roundoff error will eventually cause this to drift from the true sum. To guarantee that we never lose the propensity of the last reaction, this safety factor scales the first calculation of atot to be slightly larger. Periodically this will cause the reaction picking step to exceed the last reaction index. This is safe, we just pick another random number. This will happen rather infrequently. That is also a good time to update the cumulative sum. A double should have >15 digits, so cumulative error will be much smaller than this.

Referenced by GssaVoxelPools::refreshAtot().


Generated on 1 Jul 2015 for MOOSE by  doxygen 1.6.1