-
Notifications
You must be signed in to change notification settings - Fork 109
Add ability to use variables from grid file in input file expressions #3222
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: next
Are you sure you want to change the base?
Changes from all commits
58397e0
ab96f26
c5ef3d1
a843556
7c44c66
d3b1346
42b88b4
5491001
7901046
e9475ff
ab22970
d0726d9
2e96778
5e18e16
95b01d8
fe00722
cd04c41
7875384
f94a1e1
64bb897
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -605,7 +605,7 @@ public: | |
| virtual int getLocalZIndexNoBoundaries(int zglobal) const = 0; | ||
|
|
||
| /// Size of the mesh on this processor including guard/boundary cells | ||
| int LocalNx, LocalNy, LocalNz; | ||
| int LocalNx{0}, LocalNy{0}, LocalNz{0}; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: member variable 'LocalNy' has public visibility [cppcoreguidelines-non-private-member-variables-in-classes] int LocalNx{0}, LocalNy{0}, LocalNz{0};
^
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: member variable 'LocalNz' has public visibility [cppcoreguidelines-non-private-member-variables-in-classes] int LocalNx{0}, LocalNy{0}, LocalNz{0};
^ |
||
|
|
||
| /// Local ranges of data (inclusive), excluding guard cells | ||
| int xstart, xend, ystart, yend, zstart, zend; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,20 @@ | ||
| /*!************************************************************************ | ||
| * \file physicsmodel.hxx | ||
| * | ||
| * | ||
| * @brief Base class for Physics Models | ||
| * | ||
| * | ||
| * | ||
| * | ||
| * | ||
| * Changelog: | ||
| * | ||
| * | ||
| * 2013-08 Ben Dudson <benjamin.dudson@york.ac.uk> | ||
| * * Initial version | ||
| * | ||
| * | ||
| ************************************************************************** | ||
| * Copyright 2013 B.D.Dudson | ||
| * | ||
| * Contact: Ben Dudson, bd512@york.ac.uk | ||
| * | ||
| * | ||
| * This file is part of BOUT++. | ||
| * | ||
| * BOUT++ is free software: you can redistribute it and/or modify | ||
|
|
@@ -167,9 +167,9 @@ public: | |
| * | ||
| * Output | ||
| * ------ | ||
| * | ||
| * | ||
| * The time derivatives will be put in the ddt() variables | ||
| * | ||
| * | ||
| * Returns a flag: 0 indicates success, non-zero an error flag | ||
| */ | ||
| int runRHS(BoutReal time, bool linear = false); | ||
|
|
@@ -203,7 +203,7 @@ public: | |
| bool hasPrecon(); | ||
|
|
||
| /*! | ||
| * Run the preconditioner. The system state should be in the | ||
| * Run the preconditioner. The system state should be in the | ||
| * evolving variables, and the vector to be solved in the ddt() variables. | ||
| * The result will be put in the ddt() variables. | ||
| * | ||
|
|
@@ -219,7 +219,7 @@ public: | |
|
|
||
| /*! | ||
| * Run the Jacobian-vector multiplication function | ||
| * | ||
| * | ||
| * Note: this is usually only called by the Solver | ||
| */ | ||
| int runJacobian(BoutReal t); | ||
|
|
@@ -241,10 +241,10 @@ protected: | |
| // The init and rhs functions are implemented by user code to specify problem | ||
| /*! | ||
| * @brief This function is called once by the solver at the start of a simulation. | ||
| * | ||
| * | ||
| * A valid PhysicsModel must implement this function | ||
| * | ||
| * Variables should be read from the inputs, and the variables to | ||
| * | ||
| * Variables should be read from the inputs, and the variables to | ||
| * be evolved should be specified. | ||
| */ | ||
| virtual int init(bool restarting) = 0; | ||
|
|
@@ -258,7 +258,7 @@ protected: | |
| /*! | ||
| * @brief This function is called by the time integration solver | ||
| * at least once per time step | ||
| * | ||
| * | ||
| * Variables being evolved will be set by the solver | ||
| * before the call, and this function must calculate | ||
| * and set the time-derivatives. | ||
|
|
@@ -278,10 +278,10 @@ protected: | |
| /// Add additional variables other than the evolving variables to the restart files | ||
| virtual void restartVars(Options& options); | ||
|
|
||
| /* | ||
| /* | ||
| If split operator is set to true, then | ||
| convective() and diffusive() are called instead of rhs() | ||
|
|
||
| For implicit-explicit schemes, convective() will typically | ||
| be treated explicitly, whilst diffusive() will be treated implicitly. | ||
| For unsplit methods, both convective and diffusive will be called | ||
|
|
@@ -334,7 +334,7 @@ protected: | |
| * | ||
| * @param[in] var The variable to evolve | ||
| * @param[in] name The name to use for variable initialisation and output | ||
| * | ||
| * | ||
| * Note that the variable must not be destroyed (e.g. go out of scope) | ||
| * after this call, since a pointer to \p var is stored in the solver. | ||
| * | ||
|
|
@@ -358,11 +358,11 @@ protected: | |
| * Specify a constrained variable \p var, which will be | ||
| * adjusted to make \p F_var equal to zero. | ||
| * If the solver does not support constraints then this will throw an exception | ||
| * | ||
| * | ||
| * @param[in] var The variable the solver should modify | ||
| * @param[in] F_var The control variable, which the user will set | ||
| * @param[in] name The name to use for initialisation and output | ||
| * | ||
| * | ||
| */ | ||
| bool bout_constrain(Field3D& var, Field3D& F_var, const char* name); | ||
|
|
||
|
|
@@ -491,8 +491,7 @@ private: | |
|
|
||
| /// Add fields to the solver. | ||
| /// This should accept up to ten arguments | ||
| #define SOLVE_FOR(...) \ | ||
| { MACRO_FOR_EACH(SOLVE_FOR1, __VA_ARGS__) } | ||
| #define SOLVE_FOR(...) {MACRO_FOR_EACH(SOLVE_FOR1, __VA_ARGS__)} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: variadic macro 'SOLVE_FOR' used; consider using a 'constexpr' variadic template function [cppcoreguidelines-macro-usage] #define SOLVE_FOR(...) {MACRO_FOR_EACH(SOLVE_FOR1, __VA_ARGS__)}
^ |
||
|
|
||
| /// Write this variable once to the grid file | ||
| #define SAVE_ONCE1(var) dump.addOnce(var, #var); | ||
|
|
@@ -532,8 +531,7 @@ private: | |
| dump.addOnce(var6, #var6); \ | ||
| } | ||
|
|
||
| #define SAVE_ONCE(...) \ | ||
| { MACRO_FOR_EACH(SAVE_ONCE1, __VA_ARGS__) } | ||
| #define SAVE_ONCE(...) {MACRO_FOR_EACH(SAVE_ONCE1, __VA_ARGS__)} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: variadic macro 'SAVE_ONCE' used; consider using a 'constexpr' variadic template function [cppcoreguidelines-macro-usage] #define SAVE_ONCE(...) {MACRO_FOR_EACH(SAVE_ONCE1, __VA_ARGS__)}
^ |
||
|
|
||
| /// Write this variable every timestep | ||
| #define SAVE_REPEAT1(var) dump.addRepeat(var, #var); | ||
|
|
@@ -573,7 +571,6 @@ private: | |
| dump.addRepeat(var6, #var6); \ | ||
| } | ||
|
|
||
| #define SAVE_REPEAT(...) \ | ||
| { MACRO_FOR_EACH(SAVE_REPEAT1, __VA_ARGS__) } | ||
| #define SAVE_REPEAT(...) {MACRO_FOR_EACH(SAVE_REPEAT1, __VA_ARGS__)} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: variadic macro 'SAVE_REPEAT' used; consider using a 'constexpr' variadic template function [cppcoreguidelines-macro-usage] #define SAVE_REPEAT(...) {MACRO_FOR_EACH(SAVE_REPEAT1, __VA_ARGS__)}
^ |
||
|
|
||
| #endif // BOUT_PHYSICS_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.
warning: member variable 'LocalNx' has public visibility [cppcoreguidelines-non-private-member-variables-in-classes]