-
Notifications
You must be signed in to change notification settings - Fork 104
Field3DParallel #3149
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
Field3DParallel #3149
Conversation
Removes some clang-tidy warnings and silences one about reinterpret_cast
Resolves: #3127
CI: Backport various fixes
--- updated-dependencies: - dependency-name: externalpackages/boutdata dependency-version: 7164a89c16dba1049d42e1715506b988c0af5926 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
`FieldFactory` expects an `input` section, so this cannot be used as a variable name in the input file
…kward euler SNES solver. The user sets target_its a desired number of nonlinear iterations and the timestep is updated based on the ratio of that number and the actual number on nonlinear iteration of each Newton step. The exponent can be tuned to the problem needs. A smaller exponent results in smaller changes of dt.
Code changes suggested by ZedThree Co-authored-by: Peter Hill <peter.hill@york.ac.uk>
Co-authored-by: Peter Hill <peter.hill@york.ac.uk>
Co-authored-by: Peter Hill <peter.hill@york.ac.uk>
Co-authored-by: Peter Hill <peter.hill@york.ac.uk>
Co-authored-by: Peter Hill <peter.hill@york.ac.uk>
Co-authored-by: Peter Hill <peter.hill@york.ac.uk>
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.
clang-tidy made some suggestions
|
|
||
| template <typename T> | ||
| auto& getStore() { | ||
| if constexpr (std::is_same<T, Field3DParallel>::value) { |
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.
warning: no header providing "Field3DParallel" is directly included [misc-include-cleaner]
include/bout/deriv_store.hxx:36:
- #include <bout/scorepwrapper.hxx>
+ #include "bout/field3d.hxx"
+ #include <bout/scorepwrapper.hxx>|
|
||
| template <typename T> | ||
| auto& getStore() { | ||
| if constexpr (std::is_same<T, Field3DParallel>::value) { |
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.
warning: no header providing "std::is_same" is directly included [misc-include-cleaner]
include/bout/deriv_store.hxx:34:
- #include <unordered_map>
+ #include <type_traits>
+ #include <unordered_map>| template <typename T> | ||
| auto& getStore() { | ||
| if constexpr (std::is_same<T, Field3DParallel>::value) { | ||
| return DerivativeStore<Field3D>::getInstance(); |
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.
warning: no header providing "Field3D" is directly included [misc-include-cleaner]
return DerivativeStore<Field3D>::getInstance();
^| return are_unaligned ? fromFieldAligned(result, region) : result; | ||
| } | ||
| } | ||
| inline Field3D VDDY(const Field3D& v, const Field3DParallel& f, |
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.
warning: no header providing "Field3DParallel" is directly included [misc-include-cleaner]
include/bout/index_derivs_interface.hxx:31:
- #include "bout/traits.hxx"
+ #include "bout/field3d.hxx"
+ #include "bout/traits.hxx"| result.setRegion(lhs.getMesh()->getCommonRegion(lhs.getRegionID(), rhs.getRegionID())); | ||
| if (lhs.isFci()) { | ||
| result.splitParallelSlices(); | ||
| for (size_t i{0}; i < lhs.numberParallelSlices(); ++i) { |
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.
warning: no header providing "size_t" is directly included [misc-include-cleaner]
src/field/generated_fieldops.cxx:7:
+ #include <cstddef>|
|
||
| Field3D Coordinates::DDY(const Field3D& f, CELL_LOC outloc, const std::string& method, | ||
| const std::string& region) const { | ||
| Field3D Coordinates::DDY(const Field3DParallel& f, CELL_LOC outloc, |
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.
warning: no header providing "Field3DParallel" is directly included [misc-include-cleaner]
Field3D Coordinates::DDY(const Field3DParallel& f, CELL_LOC outloc,
^| ////////////// Y DERIVATIVE ///////////////// | ||
|
|
||
| Field3D DDY(const Field3D& f, CELL_LOC outloc, const std::string& method, | ||
| Field3D DDY(const Field3DParallel& f, CELL_LOC outloc, const std::string& method, |
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.
warning: no header providing "Field3DParallel" is directly included [misc-include-cleaner]
Field3D DDY(const Field3DParallel& f, CELL_LOC outloc, const std::string& method,
^|
Nice, thanks @dschwoerer! Please could you add a docstring to the class to explain the motivation for it, when it should be used and how? I think most of the clang-tidy warnings can be fixed automatically if you run it locally |
Merge Jacobian coloring into PETSc solver
MPI_Comm can be a pointer or an int (or anything else) Co-authored-by: Peter Hill <peter.hill@york.ac.uk>
They are not needed anymore with cmake
It was very outdated
Remove vagrant config
BoutComm::get() might return int
Configure cleanup
276917d
into
fci-auto-with-debug-higher-order
This should replace #3004