Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Use namespace for global variables 'mesh' and 'dump' #1470
Use namespace for global variables 'mesh' and 'dump' #1470
Changes from 39 commits
c9a8bc0
ffec7b6
759a623
de60d01
eda81e7
9d05657
41f8795
38191f6
b494e99
b150d10
057ddf7
17057e7
7f5255f
fb22382
ad932aa
1d6570d
6ce32e6
a812c7c
4427ce4
e6ea110
6deed69
7fff20f
aa1879e
95146f2
566614f
e2d18ed
721c1a8
653057f
8d762d7
de8552f
0e204f0
146f60b
e9356ab
71d0a9e
32b172c
caabb9c
d0401ee
8886ff8
08cc9f2
9d74be0
606c201
fc2db92
64cbef3
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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
mesh_in
really benullptr
here? Presumably this is passed to the constructor noted above (or equivalent) which can then choose what to do if it receivesnullptr
?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.
Agreed --
nullptr
is a better default, it's what we do in other bits of the code, as well as giving us some space to potential remove the global mesh entirely.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 can't just pass
nullptr
here becauseLaplaceFactory
usesmesh_in
to check whether we can use a serial solverBOUT-dev/src/invert/laplace/laplacefactory.cxx
Lines 46 to 47 in 08cc9f2
I think this was originally to allow the default Laplace solver to switch between
serial_tri
andspt
depending on whether a serial or parallel solver was needed, but now the default iscyclic
in either case. I think it would be better now to allow any Laplace solver to be created, and move the check into the constructor of the serial solvers. Does that sound reasonable, and should I do it here or create a separate PR?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.
If
LaplaceFactory
gets anullptr
, it could just fetch the global mesh though?LaplaceFactory
should get rewritten anyway (e.g. usingGenericFactory
), so I would leave that to another PR