-
Notifications
You must be signed in to change notification settings - Fork 30
WIP copy before refinement and TensorFieldData #1067
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
Conversation
BROKEN adding the patch refine strategy for the magnetic field 3D for magnetic regriding the path of the SAMRAI cleanup and comments back to NaNs 3d fixes + refactoring back to iterating on the fine field box (in mpi the fine_box might be different from the patch box) pr comments initial commit, E accumulation BROKEN refluxing without divB new magnetic field refinement implementing Toth and Roe (2002) adding the patch refine strategy for the magnetic field forcing even number of ghost cells 3D for magnetic regriding the path of the SAMRAI cleanup and comments back to NaNs 3d fixes + refactoring back to iterating on the fine field box (in mpi the fine_box might be different from the patch box) pr comments initial commit, E accumulation BROKEN adding the patch refine strategy for the magnetic field 3D for magnetic regriding the path of the SAMRAI cleanup and comments back to NaNs 3d fixes + refactoring back to iterating on the fine field box (in mpi the fine_box might be different from the patch box) pr comments BROKEN refluxing without divB rebase master
|
Important Review skippedIgnore keyword(s) in the title. ⛔ Ignored keywords (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
| auto& by = FieldDataT::getField(fine, by_id_); | ||
| auto& bz = FieldDataT::getField(fine, bz_id_); | ||
| auto& fields = TensorFieldDataT::getFields(fine, b_id_); | ||
| auto& [bx, by, bz] = fields; |
Check notice
Code scanning / CodeQL
Unused local variable
| auto& by = FieldDataT::getField(fine, by_id_); | ||
| auto& bz = FieldDataT::getField(fine, bz_id_); | ||
| auto& fields = TensorFieldDataT::getFields(fine, b_id_); | ||
| auto& [bx, by, bz] = fields; |
Check notice
Code scanning / CodeQL
Unused local variable
| { | ||
| auto static constexpr dim = Dst::dimension; | ||
|
|
||
| auto const& [localDestBox, localSrcBox, alpha] = std::forward_as_tuple(args...); |
Check notice
Code scanning / CodeQL
Unused local variable
| class HybridMessengerInfo : public IMessengerInfo | ||
| { | ||
| using VecFieldNames = core::VecFieldNames; | ||
| // using std::string = core::std::string; |
Check notice
Code scanning / CodeQL
Commented-out code
| #include "core/def.hpp" | ||
| #include "core/data/field/field.hpp" | ||
| #include "core/utilities/types.hpp" | ||
| // #include "core/data/field/field.hpp" |
Check notice
Code scanning / CodeQL
Commented-out code
| // EXPECT_EQ("EM_B_x", modelInfo.modelMagnetic.xName); | ||
| // EXPECT_EQ("EM_B_y", modelInfo.modelMagnetic.yName); | ||
| // EXPECT_EQ("EM_B_z", modelInfo.modelMagnetic.zName); |
Check notice
Code scanning / CodeQL
Commented-out code
| // EXPECT_EQ("EM_E_x", modelInfo.modelElectric.xName); | ||
| // EXPECT_EQ("EM_E_y", modelInfo.modelElectric.yName); | ||
| // EXPECT_EQ("EM_E_z", modelInfo.modelElectric.zName); |
Check notice
Code scanning / CodeQL
Commented-out code
|
|
||
|
|
||
| TYPED_TEST(SimulatorTest, knowsWhichSolverisOnAGivenLevel) | ||
| TYPED_TEST(SimulatorTest, knowsWhichSolverIsOnAGivenLevel) |
Check notice
Code scanning / CodeQL
Unused static variable
|
|
||
|
|
||
| TYPED_TEST(SimulatorTest, returnsCorrecMessengerForEachLevel) | ||
| TYPED_TEST(SimulatorTest, returnsCorrectMessengerForEachLevel) |
Check notice
Code scanning / CodeQL
Unused static variable
|
|
||
| // no fill pattern given for this init | ||
| // will use boxgeometryvariable fillpattern, itself using the | ||
| // gield geometry with overwrit_interior true from SAMRAI |
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.
gield :D
| // auto& mhdModel = *sim.getMHDModel(); | ||
| // |
Check notice
Code scanning / CodeQL
Commented-out code
| // if (isInMHDdRange(iLevel)) | ||
| // { | ||
| // auto Bid = mhdModel.resourcesManager->getIDs(mhdModel.state.B); | ||
| // auto Vid = mhdModel.resourcesManager->getIDs(mhdModel.state.V); | ||
| // | ||
| // std::array<std::vector<int> const*, 2> allIDs{{&Bid, &Vid}}; | ||
| // | ||
| // for (auto& idVec : allIDs) | ||
| // { | ||
| // for (auto& id : *idVec) | ||
| // { | ||
| // auto level = hierarchy.getPatchLevel(iLevel); | ||
| // auto patch = level->begin(); | ||
| // EXPECT_TRUE(patch->checkAllocated(id)); | ||
| // } | ||
| // } | ||
| // } |
Check notice
Code scanning / CodeQL
Commented-out code
| extra_diag_options["mode"] = "overwrite" | ||
| extra_diag_options["dir"] = diag_outputs | ||
| self.register_diag_dir_for_cleanup(diag_outputs) | ||
| # self.register_diag_dir_for_cleanup(diag_outputs) |
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.
we probably want to revert this
* PatchGhostLess * comments * Update particles_variable_fill_pattern.hpp * slightly raise empirical threshold for PGL * blackened \m/ * torm * point conventions --------- Co-authored-by: Nicolas Aunai <[email protected]>
- PatchData NaN initialized on construction - fix tests failing as result of above - comment a field refinement test (useless, wrong refinement op for E,B) - debug plots for advance field overlap test - copy done before refinement (boolean false in variable) - overwrite_interior false also for refinement is default for FieldFillPattern - J manually init to zero in model init, fine init and regrid init (Jx unused in ampere but used in Ohm with its now NaN values) - Grid/NdarrayVector take default value overrides (for test) - UsableTensorField is default constructed with zero init.
|
replaced by #1068 |
This branch is on top of #1061 and #1062.
This adds the TensorFieldOverlap and modifies the TensorFieldData and Geometry to work with it. The goal is to have a SAMRAI algorithm for an entire TensorField without relying on several RegisterRefine with different fillpaterns per geometry, which we saw was not a solution as SAMRAI remove our fill patern in its internal schedules (eg copy to a temporary level) thus putting each component in a single equivalent class and using the same geometry for all components.
With this PR the overlaps for all components are computed together and used for copy and refinement.
What's WIP: