Rename Mesh::coordinates -> Mesh::getCoordinates; deprecate old name - #1310
Conversation
More consistent naming
|
I'm sure I've already changed the coordinates routine to use asserts so not sure why it looks like I haven't! |
Ah yes, in #1293 (not yet merged) https://github.com/boutproject/BOUT-dev/blob/vecops-consistent-cell-default/include/bout/mesh.hxx#L433 |
|
As this touches a lot of files we might want to hold this until all other changes are into the rc? |
I don't think it should always be on as we have a large number of these calls throughout the code. |
|
Yes, probably hold off on merging this till the other PRs are in. |
* v4.2-rc: (58 commits) Invert conditional in Div_par and Div_par_flux Make test-yupdown work with new test for TwistShift=true Check TwistShift==true in ShiftedMetric Remove output location from Curl properly Fix whitespace in vecops header Deprecate Curl overloads that take a location Fix locations of Jacobian in Div Set yup/ydown fields for Div_par_flux() Use curly braces with if statements Fix V_dot_Grad documentation Use std::map::emplace to avoid naming complicated type with insert Add method argument to Grad2_par2 Remove const on arguments passed by value Remove bracket_location() function, replace with ASSERT1 Tidying up more location setting in derivatives Remove unnecessary interp_to in Grad2_par2 Make mesh::getRegion?? const Add const(_iterator) overload of Region::begin/end Provide `getRegion` method on Fields to return the requested Region from fieldmesh Fix some sphinx whitespace/code blocks ...
|
This is good to go in now -- all other PRs have been resolved. Last commit just fixed the conflicts |
While we are polishing things for the release candidate -- renames
Mesh::coordinatestoMesh::getCoordinatesto be more in line with our naming convention. The old name is deprecated.I used rtags to rename the symbol, so it got all instances of
Mesh::coordinatesand not just things named->coordinates. Some of these could potentially use the fields version, but I couldn't be bothered to go through and checkThere's a couple of other quick changes I'd like to make to
Mesh::getCoordinates:change the
coords_map.insert(...)tocoords_map.emplace(location, createDefaultCoordinates(location));. I'm not 100% sureemplaceshould be used here. At least,make_paircould be used to remove the type nameMove the throw to the top as a precondition, rather than burying it in the middle of the conditional. Should it always be on, or at
CHECK > 1/2/3?