Skip to content

Commit

Permalink
Merge pull request #238 from smpark7/fix-prec-iter
Browse files Browse the repository at this point in the history
Update MOOSE submodule and fix precursor tests
  • Loading branch information
abachma2 authored Aug 23, 2023
2 parents 3bbeb5d + ca6f44a commit 9c37fc7
Show file tree
Hide file tree
Showing 18 changed files with 50 additions and 752 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/auto-update-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
conda deactivate
conda activate moose-env
git submodule init && git submodule update
make NAVIER_STOKES:='no' PHASE_FIELD:='no' -j 2
make NAVIER_STOKES:='no' PHASE_FIELD:='no' REACTOR:='no' -j 2
cd doc
./moosedocs.py build --destination html
Expand Down
735 changes: 10 additions & 725 deletions .gitignore

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,26 @@ ALL_MODULES := no

CHEMICAL_REACTIONS := no
CONTACT := no
ELECTROMAGNETICS := no
EXTERNAL_PETSC_SOLVER := no
FLUID_PROPERTIES := no
FSI := no
FUNCTIONAL_EXPANSION_TOOLS := no
GEOCHEMISTRY := no
HEAT_CONDUCTION := no
LEVEL_SET := no
MISC := no
NAVIER_STOKES := yes
OPTIMIZATION := no
PERIDYNAMICS := no
PHASE_FIELD := yes
POROUS_FLOW := no
RAY_TRACING := no
REACTOR := yes
RDG := no
RICHARDS := no
STOCHASTIC_TOOLS := no
THERMAL_HYDRAULICS := no
TENSOR_MECHANICS := no
XFEM := no

Expand Down
5 changes: 4 additions & 1 deletion include/postprocessors/AverageFissionHeat.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ class AverageFissionHeat : public ElmIntegTotFissHeatPostprocessor

static InputParameters validParams();

using Postprocessor::getValue;
virtual Real getValue() const override;

protected:
virtual void initialize() override;
virtual void execute() override;
virtual Real getValue() override;
virtual void threadJoin(const UserObject & y) override;
virtual void finalize() override;

Real _volume;
};
4 changes: 3 additions & 1 deletion include/postprocessors/DivisionPostprocessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ class DivisionPostprocessor : public DifferencePostprocessor

static InputParameters validParams();

using Postprocessor::getValue;
virtual PostprocessorValue getValue() const override;

protected:
virtual PostprocessorValue getValue() override;
};
8 changes: 3 additions & 5 deletions include/postprocessors/ElementL2Diff.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ class ElementL2Diff : public ElementIntegralVariablePostprocessor

static InputParameters validParams();

protected:
/**
* Get the L2 Error.
*/
virtual Real getValue() override;
using Postprocessor::getValue;
virtual Real getValue() const override;

protected:
virtual Real computeQpIntegral() override;

const VariableValue & _u_old;
Expand Down
6 changes: 2 additions & 4 deletions include/postprocessors/LimitK.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@ class LimitK : public TimestepSize
virtual void initialize() override {}
virtual void execute() override {}

/**
* This will return the current time step size.
*/
virtual Real getValue() override;
using Postprocessor::getValue;
virtual Real getValue() const override;

protected:
const PostprocessorValue & _k;
Expand Down
2 changes: 1 addition & 1 deletion moose
Submodule moose updated 9807 files
16 changes: 9 additions & 7 deletions src/postprocessors/AverageFissionHeat.C
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,13 @@ void
AverageFissionHeat::execute()
{
ElmIntegTotFissHeatPostprocessor::execute();

_volume += _current_elem_volume;
}

Real
AverageFissionHeat::getValue()
AverageFissionHeat::getValue() const
{
Real integral = ElmIntegTotFissHeatPostprocessor::getValue();

gatherSum(_volume);

return integral / _volume;
return _integral_value / _volume;
}

void
Expand All @@ -46,3 +41,10 @@ AverageFissionHeat::threadJoin(const UserObject & y)
const AverageFissionHeat & pps = static_cast<const AverageFissionHeat &>(y);
_volume += pps._volume;
}

void
AverageFissionHeat::finalize()
{
gatherSum(_volume);
gatherSum(_integral_value);
}
2 changes: 1 addition & 1 deletion src/postprocessors/DivisionPostprocessor.C
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ DivisionPostprocessor::DivisionPostprocessor(const InputParameters & parameters)
}

PostprocessorValue
DivisionPostprocessor::getValue()
DivisionPostprocessor::getValue() const
{
return _value1 / _value2;
}
2 changes: 1 addition & 1 deletion src/postprocessors/ElementL2Diff.C
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ElementL2Diff::ElementL2Diff(const InputParameters & parameters)
}

Real
ElementL2Diff::getValue()
ElementL2Diff::getValue() const
{
return std::sqrt(ElementIntegralVariablePostprocessor::getValue());
}
Expand Down
2 changes: 1 addition & 1 deletion src/postprocessors/LimitK.C
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ LimitK::LimitK(const InputParameters & parameters)
}

Real
LimitK::getValue()
LimitK::getValue() const
{
Real dt = _feproblem.dt();
if (_k > _k_threshold)
Expand Down
Binary file modified tests/pre/gold/pre_loop_ins_out.e
Binary file not shown.
Binary file modified tests/pre/gold/pre_loop_out.e
Binary file not shown.
3 changes: 2 additions & 1 deletion tests/pre/pre_loop.i
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ global_temperature=922

[Executioner]
type = Transient
end_time = 500
end_time = 400
nl_rel_tol = 1e-6
nl_abs_tol = 1e-5
solve_type = 'NEWTON'
Expand All @@ -61,6 +61,7 @@ global_temperature=922
fixed_point_rel_tol = 1e-6
fixed_point_abs_tol = 1e-5
dtmin = 1e-2
dtmax = 5
[./TimeStepper]
type = IterationAdaptiveDT
dt = 1e-2
Expand Down
3 changes: 2 additions & 1 deletion tests/pre/pre_loop_ins.i
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ ymax=100

[Executioner]
type = Transient
end_time = 500
end_time = 400
nl_rel_tol = 1e-6
nl_abs_tol = 1e-5
solve_type = 'NEWTON'
Expand All @@ -194,6 +194,7 @@ ymax=100
fixed_point_rel_tol = 1e-6
fixed_point_abs_tol = 1e-5
dtmin = 1e-2
dtmax = 4
[./TimeStepper]
type = IterationAdaptiveDT
dt = 1e-2
Expand Down
3 changes: 2 additions & 1 deletion tests/pre/sub.i
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ global_temperature=922

[Executioner]
type = Transient
end_time = 500
end_time = 400
nl_rel_tol = 1e-6
nl_abs_tol = 1e-5
solve_type = 'NEWTON'
Expand All @@ -56,6 +56,7 @@ global_temperature=922
nl_max_its = 20
l_max_its = 50
dtmin = 1e-2
dtmax = 5
[./TimeStepper]
type = IterationAdaptiveDT
dt = 1e-2
Expand Down
3 changes: 2 additions & 1 deletion tests/pre/sub_ins.i
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ global_temperature=922

[Executioner]
type = Transient
end_time = 500
end_time = 400
nl_rel_tol = 1e-6
nl_abs_tol = 1e-5
solve_type = 'NEWTON'
Expand All @@ -56,6 +56,7 @@ global_temperature=922
nl_max_its = 20
l_max_its = 50
dtmin = 1e-2
dtmax = 4
[./TimeStepper]
type = IterationAdaptiveDT
dt = 1e-2
Expand Down

0 comments on commit 9c37fc7

Please sign in to comment.