Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return inlet concentration instead of first axial cell #74

Merged
merged 3 commits into from
May 10, 2021

Conversation

schmoelder
Copy link
Contributor

Fixes #55

@schmoelder schmoelder force-pushed the feature/fix_inlet_concentration branch from c94075b to 32cd482 Compare May 10, 2021 15:25
@schmoelder schmoelder requested a review from sleweke May 10, 2021 15:55
@schmoelder schmoelder mentioned this pull request May 10, 2021
@@ -433,7 +433,7 @@ class GeneralRateModel2D : public UnitOperationBase
virtual double const* inlet(unsigned int port, unsigned int& stride) const
{
stride = _idx.strideColComp();
return &_idx.c(_data, 0, port, 0);
return _data;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not quite correct since it ignores the ports. Instead of

return _data;

you should do

return _data + port * _disc.nComp;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, fixed that.

Copy link
Contributor

@sleweke sleweke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the GeneralRateModel2D, the ports need to be taken into account.

@sleweke sleweke merged commit f5129e8 into master May 10, 2021
@schmoelder schmoelder deleted the feature/fix_inlet_concentration branch May 12, 2021 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Return concentration of inlet stream instead of concentration in first axial cell
2 participants