What may a "Parameter _fe_problem_base is NULL" means? #24182
-
Hi all, I'm trying to modify a MOOSE-based app to have my custom ability. The compilation process went smoothly, while when I run, an error raised "Parameter _fe_problem_base is NULL". What could be the reason for this error? I inherit my custom UserObject from TransientInterface to use Please let me know if more information about my modification needed. And any suggestions will be appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 18 replies
-
Hello It s very odd that your user object inherits from FEProblemBase and user objects. The parameter error is not hard to fix I think. You need to find where it's retrieving the _fe_problem_base pointer parameter, and either change that code OR set the parameter like this:
before retrieving it Guillaume |
Beta Was this translation helpful? Give feedback.
Hi @WayneX-Wong the actual issue is that the Problem classes in MOOSE are constructed before pretty much any other objects (except the
[Mesh]
). So within the constructor forOpenMCCellAverageProblem
, functions, postprocessors, and user objects don't exist yet. So you need to fetch the function from insideOpenMCCellAverageProblem::initialSetup
, which you can think of as an extended part of the constructor which we call after all the other objects in your input file have been constructed. My apologies for missing that detail!To double-check everything, I implemented all the changes you would need as an example here: neams-th-coe/cardinal#671 and confirmed that this works properly.