Skip to content

Commit

Permalink
Refactor SolutionUserObject (idaholab#29639)
Browse files Browse the repository at this point in the history
  • Loading branch information
dschwen committed Jan 7, 2025
1 parent 0d9b1a1 commit 3b2ab65
Show file tree
Hide file tree
Showing 13 changed files with 1,814 additions and 1,734 deletions.
494 changes: 5 additions & 489 deletions framework/include/userobjects/SolutionUserObject.h

Large diffs are not rendered by default.

514 changes: 514 additions & 0 deletions framework/include/userobjects/SolutionUserObjectBase.h

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion framework/src/auxkernels/SolutionAux.C
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ SolutionAux::validParams()

SolutionAux::SolutionAux(const InputParameters & parameters)
: AuxKernel(parameters),
_solution_object(getUserObject<SolutionUserObject>("solution")),
_solution_object(getUserObject<SolutionUserObjectBase>("solution")),
_direct(getParam<bool>("direct")),
_scale_factor(getParam<Real>("scale_factor")),
_add_factor(getParam<Real>("add_factor"))
Expand Down
2 changes: 1 addition & 1 deletion framework/src/auxkernels/SolutionScalarAux.C
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ SolutionScalarAux::validParams()

SolutionScalarAux::SolutionScalarAux(const InputParameters & parameters)
: AuxScalarKernel(parameters),
_solution_object(getUserObject<SolutionUserObject>("solution")),
_solution_object(getUserObject<SolutionUserObjectBase>("solution")),
_scale_factor(getParam<Real>("scale_factor")),
_add_factor(getParam<Real>("add_factor"))
{
Expand Down
2 changes: 1 addition & 1 deletion framework/src/functions/Axisymmetric2D3DSolutionFunction.C
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Axisymmetric2D3DSolutionFunction::initialSetup()
// Get a pointer to the SolutionUserObject. A pointer is used because the UserObject is not
// available during the
// construction of the function
_solution_object_ptr = &getUserObject<SolutionUserObject>("solution");
_solution_object_ptr = &getUserObject<SolutionUserObjectBase>("solution");

// If 'from_variable' is not specified, get the value from the SolutionUserObject
if (_var_names.size() == 0)
Expand Down
2 changes: 1 addition & 1 deletion framework/src/functions/SolutionFunction.C
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ SolutionFunction::initialSetup()
// Get a pointer to the SolutionUserObject. A pointer is used because the UserObject is not
// available during the
// construction of the function
_solution_object_ptr = &getUserObject<SolutionUserObject>("solution");
_solution_object_ptr = &getUserObject<SolutionUserObjectBase>("solution");

std::string var_name;

Expand Down
2 changes: 1 addition & 1 deletion framework/src/ics/ScalarSolutionIC.C
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ScalarSolutionIC::validParams()

ScalarSolutionIC::ScalarSolutionIC(const InputParameters & parameters)
: ScalarInitialCondition(parameters),
_solution_object(getUserObject<SolutionUserObject>("solution_uo")),
_solution_object(getUserObject<SolutionUserObjectBase>("solution_uo")),
_solution_object_var_name(getParam<VariableName>("from_variable"))
{
}
Expand Down
2 changes: 1 addition & 1 deletion framework/src/ics/SolutionIC.C
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ SolutionIC::validParams()

SolutionIC::SolutionIC(const InputParameters & parameters)
: InitialCondition(parameters),
_solution_object(getUserObject<SolutionUserObject>("solution_uo")),
_solution_object(getUserObject<SolutionUserObjectBase>("solution_uo")),
_solution_object_var_name(getParam<VariableName>("from_variable"))
{
}
Expand Down
Loading

0 comments on commit 3b2ab65

Please sign in to comment.