Skip to content

Commit b7f6ba4

Browse files
committed
improve code comments regarding reaction jacobian
1 parent fe78cfb commit b7f6ba4

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

src/libcadet/model/ColumnModel1D.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ class ColumnModel1D : public UnitOperationBase
501501
}
502502
}
503503

504-
// particle jacobian (including film diffusion, isotherm and time derivative)
504+
// particle jacobian (including film diffusion, isotherm, reaction and time derivative)
505505
for (int colNode = 0; colNode < _disc.nPoints; colNode++)
506506
{
507507
for (int type = 0; type < _disc.nParType; type++)
@@ -519,7 +519,7 @@ class ColumnModel1D : public UnitOperationBase
519519
// inlet and bulk jacobian
520520
_convDispOp.calcTransportJacobian(_globalJac, _jacInlet, idxr.offsetC());
521521

522-
// particle jacobian (without isotherm, which is handled in residualKernel)
522+
// particle transport jacobian
523523
for (int colNode = 0; colNode < _disc.nPoints; colNode++)
524524
{
525525
for (int parType = 0; parType < _disc.nParType; parType++)

src/libcadet/model/parts/ParticleDiffusionOperatorDG.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -912,11 +912,12 @@ namespace parts
912912
// ======================================== DG particle Jacobian ============================================= //
913913
// ========================================================================================================================================================== //
914914

915-
void ParticleDiffusionOperatorDG::parBindingPattern(std::vector<Eigen::Triplet<double>>& tripletList, const int offset, const unsigned int colNode)
915+
void ParticleDiffusionOperatorDG::parBindingAndReactionPattern(std::vector<Eigen::Triplet<double>>& tripletList, const int offset, const unsigned int colNode)
916916
{
917-
// every bound state might depend on every bound and liquid state
918917
for (int parNode = 0; parNode < _nParPoints; parNode++)
919918
{
919+
// binding: every bound state might depend on every bound and liquid state
920+
// reaction: every liquid and bound state might depend on every liquid and bound state
920921
for (int state = 0; state < strideParPoint(); state++)
921922
{
922923
for (int stateDep = 0; stateDep < strideParPoint(); stateDep++) {
@@ -928,14 +929,14 @@ namespace parts
928929
}
929930
}
930931
}
932+
931933
/**
932934
* @brief calculates the particle dispersion jacobian Pattern, including entries for the dependence of particle entries on bulk entries through film diffusion boundary condition
933935
* @detail Does NOT add film diffusion entries for the dependence of bulk conc. on particle conc.
934936
*/
935937
void ParticleDiffusionOperatorDG::setParticleJacobianPattern(std::vector<ParticleDiffusionOperatorDG::T>& tripletList, unsigned int offsetPar, unsigned int offsetBulk, unsigned int colNode, unsigned int secIdx)
936938
{
937-
938-
parBindingPattern(tripletList, offsetPar, colNode);
939+
parBindingAndReactionPattern(tripletList, offsetPar, colNode);
939940

940941
// Ordering of particle surface diffusion:
941942
// bnd0comp0, bnd1comp0, bnd0comp1, bnd1comp1, bnd0comp2, bnd1comp2

src/libcadet/model/parts/ParticleDiffusionOperatorDG.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ namespace parts
143143

144144
protected:
145145

146-
void parBindingPattern(std::vector<Eigen::Triplet<double>>& tripletList, const int offset, const unsigned int colNode);
146+
void parBindingAndReactionPattern(std::vector<Eigen::Triplet<double>>& tripletList, const int offset, const unsigned int colNode);
147147

148148
template <typename StateType, typename ResidualType, typename ParamType, bool wantJac, bool wantRes>
149149
int residualImpl(double t, unsigned int secIdx, StateType const* yPar, StateType const* yBulk, double const* yDotPar, ResidualType* resPar, linalg::BandedEigenSparseRowIterator& jacBase);

0 commit comments

Comments
 (0)