lcpp-org / crane

A MOOSE application dedicated to general Chemical ReAction NEtworks for plasma chemistry and thermochemistry problems.
https://crane-plasma-chemistry.readthedocs.io/
GNU Lesser General Public License v2.1
21 stars 20 forks source link

Add const to getValue method in ElectricFieldCalculator #109

Closed cticenhour closed 1 year ago

cticenhour commented 1 year ago

Zapdos is currently failing devel testing due to a change in MOOSE that adds const-ness to the postprocessor getValue() method: https://civet.inl.gov/event/138892/.

This PR adds const-ness to that in ElectricFieldCalculator and updates the MOOSE submodule.

Tagging @smpeyres and @dcurreli for review and merge. This is necessary to get shannon-lab/zapdos#203 passing.

smpeyres commented 1 year ago

Error during compilation of a clone of your fork + branch (with git submodule update --init moose):



/Users/seanpeyres/moose-projects/casey-crane/src/base/CraneApp.C:34:34: error: 'CraneApp' does not refer to a value
  ModulesApp::registerAllObjects<CraneApp>(f, af, s);
                                 ^
/Users/seanpeyres/moose-projects/casey-crane/build/header_symlinks/CraneApp.h:15:7: note: declared here
class CraneApp : public MooseApp
      ^
/Users/seanpeyres/moose-projects/casey-crane/src/base/CraneApp.C:34:15: error: no member named 'registerAllObjects' in 'ModulesApp'; did you mean 'registerObjects'?
  ModulesApp::registerAllObjects<CraneApp>(f, af, s);
  ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
              registerObjects
/Users/seanpeyres/moose-projects/casey-crane/moose/modules/module_loader/build/header_symlinks/ModulesApp.h:24:15: note: 'registerObjects' declared here
  static void registerObjects(Factory & factory);
              ^
/Users/seanpeyres/moose-projects/casey-crane/src/base/CraneApp.C:34:44: warning: expression result unused [-Wunused-value]
  ModulesApp::registerAllObjects<CraneApp>(f, af, s);
                                           ^
/Users/seanpeyres/moose-projects/casey-crane/src/base/CraneApp.C:34:47: warning: expression result unused [-Wunused-value]
  ModulesApp::registerAllObjects<CraneApp>(f, af, s);
                                              ^~
2 warnings and 2 errors generated.
make: *** [/Users/seanpeyres/moose-projects/casey-crane/moose/framework/build.mk:145: /Users/seanpeyres/moose-projects/casey-crane/src/base/CraneApp.aarch64-apple-darwin20.0.0.opt.lo] Error 1
make: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/Users/seanpeyres/moose-projects/casey-crane/moose/framework/contrib/hit'
cticenhour commented 1 year ago

This doesn't have anything to do with my changes. Not sure where that is coming from. Are you on a Linux (thus, using GCC), or Mac (using clang)?

cticenhour commented 1 year ago

Ah - I see what's going on. I would double-check that the moose submodule is actually up-to-date. The registerAllObjects method as it currently is was added to CRANE three months ago, and MOOSE just before that. Suggests that a previously built library did not get rebuilt on your machine, or that the submodule update command did not actually update correctly (check with git log).

smpeyres commented 1 year ago

Ok, I updated my moose clone along with libraries with 'mamba update --all' while the moose environment was activated. Compiled successfully and all tests passed.

I then made two clones of your fork, one where I updated the moose submodule after switching to the "fixup-const-getValue" branch and one where I did not update the moose submodule at all. I compiled and tested each while within the "fixup-const-getValue" branch.

One without the moose submodule update compiled successfully and all tests passed. The one with the moose submodule update also compiled successfully and all tests passed. I imagine my original issues originated from a faulty update--either my libraries were not up-to-date or I failed to update the submodule within the proper branch.

Thanks, Casey!