Skip to content

Commit

Permalink
update examples to use new registry
Browse files Browse the repository at this point in the history
follow up to idaholab#10952
  • Loading branch information
rwcarlsen committed Mar 9, 2018
1 parent 339541e commit d085581
Show file tree
Hide file tree
Showing 59 changed files with 177 additions and 108 deletions.
6 changes: 4 additions & 2 deletions examples/ex01_inputfile/src/base/ExampleApp.C
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ ExampleApp::ExampleApp(InputParameters parameters) : MooseApp(parameters)
}

void
ExampleApp::registerObjects(Factory & /*factory*/)
ExampleApp::registerObjects(Factory & factory)
{
Registry::registerObjectsTo(factory, {"ExampleApp"});
}

void
Expand All @@ -43,6 +44,7 @@ ExampleApp::registerApps()
}

void
ExampleApp::associateSyntax(Syntax & /*syntax*/, ActionFactory & /*action_factory*/)
ExampleApp::associateSyntax(Syntax & /*syntax*/, ActionFactory & action_factory)
{
Registry::registerActionsTo(action_factory, {"ExampleApp"});
}
6 changes: 3 additions & 3 deletions examples/ex02_kernel/src/base/ExampleApp.C
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ ExampleApp::ExampleApp(InputParameters parameters) : MooseApp(parameters)
void
ExampleApp::registerObjects(Factory & factory)
{
// Register any custom objects you have built on the MOOSE Framework
registerKernel(ExampleConvection); // <- registration
Registry::registerObjectsTo(factory, {"ExampleApp"});
}

void
Expand All @@ -48,6 +47,7 @@ ExampleApp::registerApps()
}

void
ExampleApp::associateSyntax(Syntax & /*syntax*/, ActionFactory & /*action_factory*/)
ExampleApp::associateSyntax(Syntax & /*syntax*/, ActionFactory & action_factory)
{
Registry::registerActionsTo(action_factory, {"ExampleApp"});
}
2 changes: 2 additions & 0 deletions examples/ex02_kernel/src/kernels/ExampleConvection.C
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
* This function defines the valid parameters for
* this Kernel and their default values
*/
registerMooseObject("ExampleApp", ExampleConvection);

template <>
InputParameters
validParams<ExampleConvection>()
Expand Down
5 changes: 3 additions & 2 deletions examples/ex03_coupling/src/base/ExampleApp.C
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ExampleApp::ExampleApp(InputParameters parameters) : MooseApp(parameters)
void
ExampleApp::registerObjects(Factory & factory)
{
registerKernel(ExampleConvection);
Registry::registerObjectsTo(factory, {"ExampleApp"});
}

void
Expand All @@ -47,6 +47,7 @@ ExampleApp::registerApps()
}

void
ExampleApp::associateSyntax(Syntax & /*syntax*/, ActionFactory & /*action_factory*/)
ExampleApp::associateSyntax(Syntax & /*syntax*/, ActionFactory & action_factory)
{
Registry::registerActionsTo(action_factory, {"ExampleApp"});
}
2 changes: 2 additions & 0 deletions examples/ex03_coupling/src/kernels/ExampleConvection.C
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

#include "ExampleConvection.h"

registerMooseObject("ExampleApp", ExampleConvection);

template <>
InputParameters
validParams<ExampleConvection>()
Expand Down
8 changes: 3 additions & 5 deletions examples/ex04_bcs/src/base/ExampleApp.C
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ ExampleApp::ExampleApp(InputParameters parameters) : MooseApp(parameters)
void
ExampleApp::registerObjects(Factory & factory)
{
registerKernel(ExampleConvection);
registerKernel(ExampleGaussContForcing); // Extra forcing term
registerBoundaryCondition(CoupledDirichletBC); // Register our Boundary Conditions
registerBoundaryCondition(CoupledNeumannBC);
Registry::registerObjectsTo(factory, {"ExampleApp"});
}

void
Expand All @@ -53,6 +50,7 @@ ExampleApp::registerApps()
}

void
ExampleApp::associateSyntax(Syntax & /*syntax*/, ActionFactory & /*action_factory*/)
ExampleApp::associateSyntax(Syntax & /*syntax*/, ActionFactory & action_factory)
{
Registry::registerActionsTo(action_factory, {"ExampleApp"});
}
2 changes: 2 additions & 0 deletions examples/ex04_bcs/src/bcs/CoupledDirichletBC.C
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

#include "CoupledDirichletBC.h"

registerMooseObject("ExampleApp", CoupledDirichletBC);

template <>
InputParameters
validParams<CoupledDirichletBC>()
Expand Down
2 changes: 2 additions & 0 deletions examples/ex04_bcs/src/bcs/CoupledNeumannBC.C
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

#include "CoupledNeumannBC.h"

registerMooseObject("ExampleApp", CoupledNeumannBC);

template <>
InputParameters
validParams<CoupledNeumannBC>()
Expand Down
2 changes: 2 additions & 0 deletions examples/ex04_bcs/src/kernels/ExampleConvection.C
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

#include "ExampleConvection.h"

registerMooseObject("ExampleApp", ExampleConvection);

template <>
InputParameters
validParams<ExampleConvection>()
Expand Down
2 changes: 2 additions & 0 deletions examples/ex04_bcs/src/kernels/ExampleGaussContForcing.C
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

#include "ExampleGaussContForcing.h"

registerMooseObject("ExampleApp", ExampleGaussContForcing);

template <>
InputParameters
validParams<ExampleGaussContForcing>()
Expand Down
6 changes: 3 additions & 3 deletions examples/ex05_amr/src/base/ExampleApp.C
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ ExampleApp::ExampleApp(InputParameters parameters) : MooseApp(parameters)
void
ExampleApp::registerObjects(Factory & factory)
{
registerKernel(ExampleConvection);
registerKernel(ExampleCoefDiffusion);
Registry::registerObjectsTo(factory, {"ExampleApp"});
}

void
Expand All @@ -49,6 +48,7 @@ ExampleApp::registerApps()
}

void
ExampleApp::associateSyntax(Syntax & /*syntax*/, ActionFactory & /*action_factory*/)
ExampleApp::associateSyntax(Syntax & /*syntax*/, ActionFactory & action_factory)
{
Registry::registerActionsTo(action_factory, {"ExampleApp"});
}
2 changes: 2 additions & 0 deletions examples/ex05_amr/src/kernels/ExampleCoefDiffusion.C
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

#include "ExampleCoefDiffusion.h"

registerMooseObject("ExampleApp", ExampleCoefDiffusion);

template <>
InputParameters
validParams<ExampleCoefDiffusion>()
Expand Down
2 changes: 2 additions & 0 deletions examples/ex05_amr/src/kernels/ExampleConvection.C
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

#include "ExampleConvection.h"

registerMooseObject("ExampleApp", ExampleConvection);

template <>
InputParameters
validParams<ExampleConvection>()
Expand Down
7 changes: 3 additions & 4 deletions examples/ex06_transient/src/base/ExampleApp.C
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ ExampleApp::ExampleApp(InputParameters parameters) : MooseApp(parameters)
void
ExampleApp::registerObjects(Factory & factory)
{
registerKernel(ExampleConvection);
registerKernel(ExampleDiffusion);
registerKernel(ExampleTimeDerivative);
Registry::registerObjectsTo(factory, {"ExampleApp"});
}

void
Expand All @@ -51,6 +49,7 @@ ExampleApp::registerApps()
}

void
ExampleApp::associateSyntax(Syntax & /*syntax*/, ActionFactory & /*action_factory*/)
ExampleApp::associateSyntax(Syntax & /*syntax*/, ActionFactory & action_factory)
{
Registry::registerActionsTo(action_factory, {"ExampleApp"});
}
2 changes: 2 additions & 0 deletions examples/ex06_transient/src/kernels/ExampleConvection.C
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

#include "ExampleConvection.h"

registerMooseObject("ExampleApp", ExampleConvection);

template <>
InputParameters
validParams<ExampleConvection>()
Expand Down
2 changes: 2 additions & 0 deletions examples/ex06_transient/src/kernels/ExampleDiffusion.C
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

#include "ExampleDiffusion.h"

registerMooseObject("ExampleApp", ExampleDiffusion);

template <>
InputParameters
validParams<ExampleDiffusion>()
Expand Down
2 changes: 2 additions & 0 deletions examples/ex06_transient/src/kernels/ExampleTimeDerivative.C
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

#include "Material.h"

registerMooseObject("ExampleApp", ExampleTimeDerivative);

template <>
InputParameters
validParams<ExampleTimeDerivative>()
Expand Down
6 changes: 3 additions & 3 deletions examples/ex07_ics/src/base/ExampleApp.C
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ ExampleApp::ExampleApp(InputParameters parameters) : MooseApp(parameters)
void
ExampleApp::registerObjects(Factory & factory)
{
// Register our custom Initial Condition with the Factory
registerInitialCondition(ExampleIC);
Registry::registerObjectsTo(factory, {"ExampleApp"});
}

void
Expand All @@ -48,6 +47,7 @@ ExampleApp::registerApps()
}

void
ExampleApp::associateSyntax(Syntax & /*syntax*/, ActionFactory & /*action_factory*/)
ExampleApp::associateSyntax(Syntax & /*syntax*/, ActionFactory & action_factory)
{
Registry::registerActionsTo(action_factory, {"ExampleApp"});
}
2 changes: 2 additions & 0 deletions examples/ex07_ics/src/ics/ExampleIC.C
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

#include "ExampleIC.h"

registerMooseObject("ExampleApp", ExampleIC);

template <>
InputParameters
validParams<ExampleIC>()
Expand Down
11 changes: 3 additions & 8 deletions examples/ex08_materials/src/base/ExampleApp.C
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,7 @@ ExampleApp::ExampleApp(InputParameters parameters) : MooseApp(parameters)
void
ExampleApp::registerObjects(Factory & factory)
{
registerKernel(ExampleConvection);

// Our new Diffusion Kernel that accepts a material property
registerKernel(ExampleDiffusion);

// Register our new material class so we can use it.
registerMaterial(ExampleMaterial);
Registry::registerObjectsTo(factory, {"ExampleApp"});
}

void
Expand All @@ -55,6 +49,7 @@ ExampleApp::registerApps()
}

void
ExampleApp::associateSyntax(Syntax & /*syntax*/, ActionFactory & /*action_factory*/)
ExampleApp::associateSyntax(Syntax & /*syntax*/, ActionFactory & action_factory)
{
Registry::registerActionsTo(action_factory, {"ExampleApp"});
}
2 changes: 2 additions & 0 deletions examples/ex08_materials/src/kernels/ExampleConvection.C
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

#include "ExampleConvection.h"

registerMooseObject("ExampleApp", ExampleConvection);

template <>
InputParameters
validParams<ExampleConvection>()
Expand Down
2 changes: 2 additions & 0 deletions examples/ex08_materials/src/kernels/ExampleDiffusion.C
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
* This function defines the valid parameters for
* this Kernel and their default values
*/
registerMooseObject("ExampleApp", ExampleDiffusion);

template <>
InputParameters
validParams<ExampleDiffusion>()
Expand Down
2 changes: 2 additions & 0 deletions examples/ex08_materials/src/materials/ExampleMaterial.C
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

#include "ExampleMaterial.h"

registerMooseObject("ExampleApp", ExampleMaterial);

template <>
InputParameters
validParams<ExampleMaterial>()
Expand Down
7 changes: 3 additions & 4 deletions examples/ex09_stateful_materials/src/base/ExampleApp.C
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ ExampleApp::ExampleApp(InputParameters parameters) : MooseApp(parameters)
void
ExampleApp::registerObjects(Factory & factory)
{
registerKernel(ExampleConvection);
registerKernel(ExampleDiffusion);
registerMaterial(ExampleMaterial);
Registry::registerObjectsTo(factory, {"ExampleApp"});
}

void
Expand All @@ -51,6 +49,7 @@ ExampleApp::registerApps()
}

void
ExampleApp::associateSyntax(Syntax & /*syntax*/, ActionFactory & /*action_factory*/)
ExampleApp::associateSyntax(Syntax & /*syntax*/, ActionFactory & action_factory)
{
Registry::registerActionsTo(action_factory, {"ExampleApp"});
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

#include "ExampleConvection.h"

registerMooseObject("ExampleApp", ExampleConvection);

template <>
InputParameters
validParams<ExampleConvection>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

#include "Material.h"

registerMooseObject("ExampleApp", ExampleDiffusion);

template <>
InputParameters
validParams<ExampleDiffusion>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

#include "ExampleMaterial.h"

registerMooseObject("ExampleApp", ExampleMaterial);

template <>
InputParameters
validParams<ExampleMaterial>()
Expand Down
6 changes: 3 additions & 3 deletions examples/ex10_aux/src/base/ExampleApp.C
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ ExampleApp::ExampleApp(InputParameters parameters) : MooseApp(parameters)
void
ExampleApp::registerObjects(Factory & factory)
{
// Register our Example AuxKernel with the AuxFactory
registerAux(ExampleAux);
Registry::registerObjectsTo(factory, {"ExampleApp"});
}

void
Expand All @@ -48,6 +47,7 @@ ExampleApp::registerApps()
}

void
ExampleApp::associateSyntax(Syntax & /*syntax*/, ActionFactory & /*action_factory*/)
ExampleApp::associateSyntax(Syntax & /*syntax*/, ActionFactory & action_factory)
{
Registry::registerActionsTo(action_factory, {"ExampleApp"});
}
6 changes: 4 additions & 2 deletions examples/ex11_prec/src/base/ExampleApp.C
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ ExampleApp::ExampleApp(InputParameters parameters) : MooseApp(parameters)
}

void
ExampleApp::registerObjects(Factory & /*factory*/)
ExampleApp::registerObjects(Factory & factory)
{
Registry::registerObjectsTo(factory, {"ExampleApp"});
}

void
Expand All @@ -43,6 +44,7 @@ ExampleApp::registerApps()
}

void
ExampleApp::associateSyntax(Syntax & /*syntax*/, ActionFactory & /*action_factory*/)
ExampleApp::associateSyntax(Syntax & /*syntax*/, ActionFactory & action_factory)
{
Registry::registerActionsTo(action_factory, {"ExampleApp"});
}
Loading

0 comments on commit d085581

Please sign in to comment.