Skip to content

Commit

Permalink
Fix tests (idaholab#21885)
Browse files Browse the repository at this point in the history
  • Loading branch information
dschwen committed Aug 19, 2022
1 parent 264605d commit e5419c5
Show file tree
Hide file tree
Showing 20 changed files with 21 additions and 18 deletions.
7 changes: 4 additions & 3 deletions modules/combined/src/base/CombinedApp.C
Expand Up @@ -16,6 +16,7 @@
#include "ChemicalReactionsApp.h"
#include "ContactApp.h"
#include "ElectromagneticsApp.h"
#include "ExternalPetscSolverApp.h"
#include "FluidPropertiesApp.h"
#include "FsiApp.h"
#include "FunctionalExpansionToolsApp.h"
Expand All @@ -24,18 +25,18 @@
#include "LevelSetApp.h"
#include "MiscApp.h"
#include "NavierStokesApp.h"
#include "OptimizationApp.h"
#include "PeridynamicsApp.h"
#include "PhaseFieldApp.h"
#include "PorousFlowApp.h"
#include "RayTracingApp.h"
#include "RdgApp.h"
#include "ReactorApp.h"
#include "RichardsApp.h"
#include "StochasticToolsApp.h"
#include "PeridynamicsApp.h"
#include "TensorMechanicsApp.h"
#include "ThermalHydraulicsApp.h"
#include "XFEMApp.h"
#include "ExternalPetscSolverApp.h"

InputParameters
CombinedApp::validParams()
Expand Down Expand Up @@ -81,6 +82,7 @@ CombinedApp::registerAll(Factory & f, ActionFactory & af, Syntax & s)
LevelSetApp::registerAll(f, af, s);
MiscApp::registerAll(f, af, s);
NavierStokesApp::registerAll(f, af, s);
OptimizationApp::registerAll(f, af, s);
PeridynamicsApp::registerAll(f, af, s);
PhaseFieldApp::registerAll(f, af, s);
PorousFlowApp::registerAll(f, af, s);
Expand All @@ -92,7 +94,6 @@ CombinedApp::registerAll(Factory & f, ActionFactory & af, Syntax & s)
TensorMechanicsApp::registerAll(f, af, s);
ThermalHydraulicsApp::registerAll(f, af, s);
XFEMApp::registerAll(f, af, s);
ExternalPetscSolverApp::registerAll(f, af, s);
}

void
Expand Down
8 changes: 5 additions & 3 deletions modules/combined/test/src/base/CombinedTestApp.C
Expand Up @@ -26,15 +26,16 @@
#include "LevelSetTestApp.h"
#include "MiscTestApp.h"
#include "NavierStokesTestApp.h"
#include "OptimizationTestApp.h"
#include "PeridynamicsTestApp.h"
#include "PhaseFieldTestApp.h"
#include "PorousFlowTestApp.h"
#include "RayTracingTestApp.h"
#include "RichardsTestApp.h"
#include "StochasticToolsTestApp.h"
#include "PorousFlowTestApp.h"
#include "RayTracingTestApp.h"
#include "RdgTestApp.h"
#include "ReactorTestApp.h"
#include "RichardsTestApp.h"
#include "StochasticToolsTestApp.h"
#include "TensorMechanicsTestApp.h"
#include "ThermalHydraulicsTestApp.h"
#include "XFEMTestApp.h"
Expand Down Expand Up @@ -77,6 +78,7 @@ CombinedTestApp::registerAll(Factory & f, ActionFactory & af, Syntax & s, bool u
LevelSetTestApp::registerAll(f, af, s, use_test_objs);
MiscTestApp::registerAll(f, af, s, use_test_objs);
NavierStokesTestApp::registerAll(f, af, s, use_test_objs);
OptimizationTestApp::registerAll(f, af, s, use_test_objs);
PeridynamicsTestApp::registerAll(f, af, s, use_test_objs);
PhaseFieldTestApp::registerAll(f, af, s, use_test_objs);
PorousFlowTestApp::registerAll(f, af, s, use_test_objs);
Expand Down
24 changes: 12 additions & 12 deletions modules/optimization/src/optimizationreporters/ObjectiveMinimize.C
Expand Up @@ -49,24 +49,24 @@ ObjectiveMinimize::updateParameters(const libMesh::PetscVector<Number> & x)
Real value_from_tao = x(n);
if (hasBounds() && value_from_tao < _lower_bounds[n])
{
mooseWarning("Tao Optimization Parameters out of bounds. System will be solved using the "
"lower bound and the objective will be altered accordingly."
"\nTao Parameter Value = ",
value_from_tao,
"; lower_bound = ",
_lower_bounds[n]);
mooseInfo("Tao Optimization Parameters out of bounds. System will be solved using the "
"lower bound and the objective will be altered accordingly."
"\nTao Parameter Value = ",
value_from_tao,
"; lower_bound = ",
_lower_bounds[n]);
val = _lower_bounds[n];
Real diff = value_from_tao - _lower_bounds[n];
_bound_adjustment += diff * diff;
}
else if (hasBounds() && value_from_tao > _upper_bounds[n])
{
mooseWarning("Tao Optimization Parameters out of bounds. System will be solved using the "
"upper bound and the objective will be altered accordingly."
"\nTao Parameter Value = ",
value_from_tao,
"; upper_bound = ",
_upper_bounds[n]);
mooseInfo("Tao Optimization Parameters out of bounds. System will be solved using the "
"upper bound and the objective will be altered accordingly."
"\nTao Parameter Value = ",
value_from_tao,
"; upper_bound = ",
_upper_bounds[n]);
val = _upper_bounds[n];
Real diff = value_from_tao - _upper_bounds[n];
_bound_adjustment += diff * diff;
Expand Down

0 comments on commit e5419c5

Please sign in to comment.