Skip to content

Commit

Permalink
Fix nBin check
Browse files Browse the repository at this point in the history
  • Loading branch information
jbreue16 committed Dec 19, 2024
1 parent 1d6bfd9 commit d8a0c43
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/libcadet/model/reaction/CrystallizationReaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -470,16 +470,8 @@ class CrystallizationReaction : public IDynamicReactionModel
{
readScalarParameterOrArray(_bins, paramProvider, "CRY_BINS", 1);

if (_usePBM)
{
if (_bins.size() != _nBins + 2)
throw InvalidParameterException("Expected CRY_BINS to have " + std::to_string(_nBins + 2) + " elements (got " + std::to_string(_bins.size()) + ")");
}
else
{
if (_bins.size() != _nBins + 1)
throw InvalidParameterException("Expected CRY_BINS to have " + std::to_string(_nBins + 1) + " elements (got " + std::to_string(_bins.size()) + ")");
}

registerParam1DArray(_parameters, _bins, [=](bool multi, unsigned int idx) { return makeParamId(hashString("CRY_BINS"), unitOpIdx, CompIndep, ParTypeIndep, BoundStateIndep, idx, SectionIndep); });

Expand Down

0 comments on commit d8a0c43

Please sign in to comment.