LCOV - code coverage report
Current view: top level - src/neml2/userobjects - MOOSEVariableToNEML2.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: #32971 (54bef8) with base c6cf66 Lines: 8 14 57.1 %
Date: 2026-05-29 20:35:17 Functions: 3 4 75.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 "MOOSEVariableToNEML2.h"
      11             : 
      12             : registerMooseObject("MooseApp", MOOSEVariableToNEML2);
      13             : registerMooseObject("MooseApp", MOOSEOldVariableToNEML2);
      14             : 
      15             : template <unsigned int state>
      16             : InputParameters
      17        6139 : MOOSEVariableToNEML2Templ<state>::validParams()
      18             : {
      19        6139 :   auto params = MOOSEToNEML2Batched::validParams();
      20       12278 :   params.addClassDescription("Gather a MOOSE variable for insertion into the specified input or "
      21             :                              "model parameter of a NEML2 model.");
      22       18417 :   params.addRequiredCoupledVar("from_moose", "MOOSE variable to read from");
      23        6139 :   return params;
      24           0 : }
      25             : 
      26             : template <>
      27           9 : MOOSEVariableToNEML2Templ<0>::MOOSEVariableToNEML2Templ(const InputParameters & params)
      28           0 :   : MOOSEToNEML2Batched(params)
      29             : #ifdef NEML2_ENABLED
      30             :     ,
      31          18 :     _moose_variable(coupledValue("from_moose"))
      32             : #endif
      33             : {
      34           9 : }
      35             : 
      36             : template <>
      37           0 : MOOSEVariableToNEML2Templ<1>::MOOSEVariableToNEML2Templ(const InputParameters & params)
      38           0 :   : MOOSEToNEML2Batched(params)
      39             : #ifdef NEML2_ENABLED
      40             :     ,
      41           0 :     _moose_variable(coupledValueOld("from_moose"))
      42             : #endif
      43             : {
      44           0 : }
      45             : 
      46             : template class MOOSEVariableToNEML2Templ<0>;
      47             : template class MOOSEVariableToNEML2Templ<1>;

Generated by: LCOV version 1.14