LCOV - code coverage report
Current view: top level - src/actions - AddSecondarySpeciesAction.C (source / functions) Hit Total Coverage
Test: idaholab/moose chemical_reactions: #31405 (292dce) with base fef103 Lines: 16 17 94.1 %
Date: 2025-09-04 07:52:33 Functions: 3 3 100.0 %
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 "AddSecondarySpeciesAction.h"
      11             : #include "FEProblem.h"
      12             : 
      13             : registerMooseAction("ChemicalReactionsApp", AddSecondarySpeciesAction, "add_aux_variable");
      14             : 
      15             : InputParameters
      16         284 : AddSecondarySpeciesAction::validParams()
      17             : {
      18         284 :   InputParameters params = AddAuxVariableAction::validParams();
      19         568 :   params.addParam<std::vector<AuxVariableName>>("secondary_species",
      20             :                                                 "The list of secondary species to add");
      21         284 :   params.addClassDescription("Adds AuxVariables for all secondary species");
      22         284 :   return params;
      23           0 : }
      24             : 
      25         284 : AddSecondarySpeciesAction::AddSecondarySpeciesAction(const InputParameters & params)
      26             :   : AddAuxVariableAction(params),
      27         568 :     _secondary_species(getParam<std::vector<AuxVariableName>>("secondary_species"))
      28             : {
      29         284 : }
      30             : 
      31             : void
      32         284 : AddSecondarySpeciesAction::act()
      33             : {
      34         284 :   auto fe_type = AddVariableAction::feType(_pars);
      35         284 :   auto type = AddVariableAction::variableType(fe_type);
      36         284 :   auto var_params = _factory.getValidParams(type);
      37             : 
      38         284 :   var_params.applySpecificParameters(_pars, {"family", "order"});
      39             : 
      40        1072 :   for (auto & secondary_specimen : _secondary_species)
      41         788 :     _problem->addAuxVariable(type, secondary_specimen, var_params);
      42         568 : }

Generated by: LCOV version 1.14