use of cbit.vcell.math.MembraneSubDomain in project vcell by virtualcell.
the class MembraneParticleDiffusionVisitor method hasMembraneDiffusion.
private boolean hasMembraneDiffusion(MathDescription mathDesc) throws ExpressionException {
//
for (SubDomain subDomain : Collections.list(mathDesc.getSubDomains())) {
if (subDomain instanceof MembraneSubDomain) {
MembraneSubDomain membraneSubDomain = (MembraneSubDomain) subDomain;
for (ParticleProperties particleProperties : membraneSubDomain.getParticleProperties()) {
Expression diffusionCoef = particleProperties.getDiffusion();
diffusionCoef = MathUtilities.substituteFunctions(diffusionCoef, mathDesc);
diffusionCoef = diffusionCoef.flatten();
if (!diffusionCoef.isZero()) {
return true;
}
}
}
}
return false;
}
Aggregations