LCOV - code coverage report
Current view: top level - src/base - OptimizationApp.C (source / functions) Hit Total Coverage
Test: idaholab/moose optimization: #31405 (292dce) with base fef103 Lines: 21 32 65.6 %
Date: 2025-09-04 07:54:57 Functions: 3 8 37.5 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //* This file is part of the MOOSE framework
       2             : //* https://mooseframework.inl.gov
       3             : //*
       4             : //* All rights reserved, see COPYRIGHT for full restrictions
       5             : //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
       6             : //*
       7             : //* Licensed under LGPL 2.1, please see LICENSE for details
       8             : //* https://www.gnu.org/licenses/lgpl-2.1.html
       9             : 
      10             : #include "OptimizationApp.h"
      11             : #include "Moose.h"
      12             : #include "AppFactory.h"
      13             : #include "MooseSyntax.h"
      14             : #include "ExecFlagRegistry.h"
      15             : 
      16             : #include "OptimizationAppTypes.h"
      17             : 
      18             : InputParameters
      19        2407 : OptimizationApp::validParams()
      20             : {
      21        2407 :   InputParameters params = MooseApp::validParams();
      22             : 
      23        2407 :   params.set<bool>("use_legacy_material_output") = false;
      24        2407 :   params.set<bool>("use_legacy_initial_residual_evaluation_behavior") = false;
      25             : 
      26        2407 :   return params;
      27           0 : }
      28             : 
      29           0 : OptimizationApp::OptimizationApp(const InputParameters & parameters) : MooseApp(parameters)
      30             : {
      31           0 :   OptimizationApp::registerAll(_factory, _action_factory, _syntax);
      32           0 : }
      33             : 
      34           0 : OptimizationApp::~OptimizationApp() {}
      35             : 
      36             : void
      37        2407 : OptimizationApp::registerAll(Factory & f, ActionFactory & af, Syntax & syntax)
      38             : {
      39        2407 :   Registry::registerObjectsTo(f, {"OptimizationApp"});
      40        2407 :   Registry::registerActionsTo(af, {"OptimizationApp"});
      41             : 
      42             :   // Optimization reporter actions
      43        4814 :   registerSyntaxTask(
      44             :       "AddOptimizationReporterAction", "OptimizationReporter", "add_optimization_reporter");
      45        4814 :   registerMooseObjectTask("add_optimization_reporter", OptimizationReporterBase, false);
      46        4814 :   addTaskDependency("add_optimization_reporter", "add_reporter");
      47             : 
      48             :   // General Optimization action
      49        2407 :   registerTask("auto_create_mesh", false);
      50        2407 :   registerTask("auto_create_problem", false);
      51        4814 :   registerSyntaxTask("OptimizationAction", "Optimization", "auto_create_mesh");
      52        4814 :   registerSyntaxTask("OptimizationAction", "Optimization", "auto_create_problem");
      53        4814 :   addTaskDependency("setup_mesh", "auto_create_mesh");
      54        4814 :   addTaskDependency("create_problem", "auto_create_problem");
      55        2407 : }
      56             : 
      57             : void
      58        1637 : OptimizationApp::registerApps()
      59             : {
      60        1637 :   registerApp(OptimizationApp);
      61        1637 : }
      62             : 
      63             : /***************************************************************************************************
      64             :  *********************** Dynamic Library Entry Points - DO NOT MODIFY ******************************
      65             :  **************************************************************************************************/
      66             : extern "C" void
      67           0 : OptimizationApp__registerAll(Factory & f, ActionFactory & af, Syntax & s)
      68             : {
      69           0 :   OptimizationApp::registerAll(f, af, s);
      70           0 : }
      71             : extern "C" void
      72           0 : OptimizationApp__registerApps()
      73             : {
      74           0 :   OptimizationApp::registerApps();
      75           0 : }

Generated by: LCOV version 1.14