Skip to content

Commit

Permalink
Add support for FV variables for projection aux
Browse files Browse the repository at this point in the history
refs #22373
  • Loading branch information
GiudGiud committed Jun 26, 2024
1 parent 835781c commit 966c92f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion framework/include/auxkernels/ProjectionAux.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ class ProjectionAux : public AuxKernel
const VariableValue & _v;

/// A reference to the variable to project from
const MooseVariable & _source_variable;
/// We must use a field variable to support finite volume variables
const MooseVariableFieldBase & _source_variable;

/// The system owning the source variable
const System & _source_sys;
Expand Down
2 changes: 1 addition & 1 deletion framework/src/auxkernels/ProjectionAux.C
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ ProjectionAux::validParams()
ProjectionAux::ProjectionAux(const InputParameters & parameters)
: AuxKernel(parameters),
_v(coupledValue("v")),
_source_variable(*getVar("v", 0)),
_source_variable(*getFieldVar("v", 0)),
_source_sys(_c_fe_problem.getSystem(coupledName("v")))
{
// Output some messages to user
Expand Down
2 changes: 1 addition & 1 deletion test/tests/auxkernels/projection_aux/tests
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
type = 'CSVDiff'
input = '1d.i'
csvdiff = '1d_constant.csv'
cli_args = 'Outputs/file_base=1d_constant'
cli_args = 'AuxVariables/base_elem/type=MooseVariableFVReal Outputs/file_base=1d_constant'
detail = "a constant to all variable families supported in 1d at various orders,"
[]
[1d_linear]
Expand Down

0 comments on commit 966c92f

Please sign in to comment.