LCOV - code coverage report
Current view: top level - src/interfaces - MappingInterface.C (source / functions) Hit Total Coverage
Test: idaholab/moose stochastic_tools: #32971 (54bef8) with base c6cf66 Lines: 16 17 94.1 %
Date: 2026-05-29 20:40:35 Functions: 4 4 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 "MappingInterface.h"
      11             : #include "MooseTypes.h"
      12             : 
      13             : InputParameters
      14         108 : MappingInterface::validParams()
      15             : {
      16         108 :   return emptyInputParameters();
      17             : }
      18             : 
      19         104 : MappingInterface::MappingInterface(const MooseObject * moose_object)
      20         104 :   : _smi_params(moose_object->parameters()),
      21         104 :     _smi_feproblem(*_smi_params.get<FEProblemBase *>("_fe_problem_base"))
      22             : {
      23         104 : }
      24             : 
      25             : VariableMappingBase &
      26          99 : MappingInterface::getMappingByName(const UserObjectName & name) const
      27             : {
      28             :   std::vector<VariableMappingBase *> models;
      29          99 :   _smi_feproblem.theWarehouse()
      30          99 :       .query()
      31          99 :       .condition<AttribName>(name)
      32          99 :       .condition<AttribSystem>("VariableMappingBase")
      33             :       .queryInto(models);
      34          99 :   if (models.empty())
      35           0 :     mooseError("Unable to find a Mapping object with the name '" + name + "'");
      36          99 :   return *(models[0]);
      37          99 : }
      38             : 
      39             : VariableMappingBase &
      40          54 : MappingInterface::getMapping(const std::string & name) const
      41             : {
      42          54 :   return getMappingByName(_smi_params.get<UserObjectName>(name));
      43             : }

Generated by: LCOV version 1.14