-
Notifications
You must be signed in to change notification settings - Fork 16
1101 Extend integrator classes and reimplement SDE models. #1296
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1296 +/- ##
==========================================
+ Coverage 97.21% 97.29% +0.08%
==========================================
Files 167 169 +2
Lines 14960 14851 -109
==========================================
- Hits 14543 14449 -94
+ Misses 417 402 -15 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@nijawa Could you double check that this PR solves the NaN issues (mathematically) correctly? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code is great :) Some comments. Some functions are short in/missing documentation. Also consider the readthedocs doc. However, it would make sense to update this in the branch there.
using DerivFunction = | ||
std::function<void(Eigen::Ref<const Eigen::VectorX<FP>> y, FP t, Eigen::Ref<Eigen::VectorX<FP>> dydt)>; | ||
|
||
template <typename FP = double> | ||
template <typename FP, size_t Order> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the name "Order" could be misleading (confusing with with integration order)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know, but I have not come up with a better name. Maybe just NumDerivs
or simply N
works well enough? I will add a "@tparam" description later anyways
return true; | ||
} | ||
|
||
void rescale(Eigen::Ref<Eigen::VectorX<FP>> x) const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doc
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
#ifndef MIO_COMPARTMENTS_STOCHASTIC_MODEL_H |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you also adjust the header guards form the other file here with the new notation (especially, flow model)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should I also rename compartmentalmodel.h to compartmental_model.h?
FlowModel<FP, Comp, Pop, Params, Flows>>; | ||
using Base::Base; | ||
|
||
virtual void get_noise(Eigen::Ref<const Eigen::VectorX<FP>> /*pop*/, Eigen::Ref<const Eigen::VectorX<FP>> /*y*/, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doc
Changes and Information
Please briefly list the changes (main added features, changed items, or corrected bugs) made:
get_noise
.If need be, add additional information and what the reviewer should look out for in particular:
Order
template parameter, theget_noise
function and theXdeIntegrator
(maybe "DeIntegrator" or just "Integrator"?).Merge Request - Guideline Checklist
Please check our git workflow. Use the draft feature if the Pull Request is not yet ready to review.
Checks by code author
Checks by code reviewer(s)
Closes #1009
Closes #1101
Closes #1165
Closes #1218