@@ -176,6 +176,7 @@ namespace model
176176 paramProvider.popScope ();
177177 }
178178
179+ MultiplexedScopeSelector scopeGuard (paramProvider, " reaction" , _dynReaction->usesParamProviderInDiscretizationConfig ());
179180 reactionConfSuccess = _dynReaction->configureModelDiscretization (paramProvider, _nComp, _nBound.get (), _boundOffset) && reactionConfSuccess;
180181 }
181182
@@ -404,24 +405,22 @@ namespace model
404405
405406 void HomogeneousParticle::setParJacPattern (std::vector<Eigen::Triplet<double >>& tripletList, const unsigned int offsetPar, const unsigned int offsetBulk, unsigned int colNode, unsigned int secIdx) const
406407 {
407- // binding Jacobian pattern
408- // add dense nComp * nBound blocks, since all solid and liquid entries can be coupled through binding.
408+ // binding and reaction Jacobian pattern
409+ // add dense nComp * nBound blocks, since all solid and liquid entries can be coupled through reaction and or binding.
409410 for (unsigned int parState = 0 ; parState < _nComp + _strideBound; parState++) {
410411 for (unsigned int toParState = 0 ; toParState < _nComp + _strideBound; toParState++) {
411412 tripletList.push_back (Eigen::Triplet<double >(offsetPar + parState, offsetPar + toParState, 0.0 ));
412413 }
413414 }
414415
415416 // flux Jacobian pattern
416-
417417 for (unsigned int comp = 0 ; comp < _nComp; comp++)
418418 {
419419 tripletList.push_back (Eigen::Triplet<double >(offsetPar + comp, offsetBulk + comp, 0.0 ));
420420 tripletList.push_back (Eigen::Triplet<double >(offsetBulk + comp, offsetPar + comp, 0.0 ));
421421 }
422422 }
423423
424-
425424 unsigned int HomogeneousParticle::jacobianNNZperParticle () const
426425 {
427426 return (_nComp + _strideBound) * (_nComp + _strideBound) + _nComp * 4 ; // reaction, binding patter + film diffusion pattern for one particle
0 commit comments