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 28577 : MOOSEVariableToNEML2Templ<state>::validParams() 18 : { 19 28577 : auto params = MOOSEToNEML2Batched::validParams(); 20 28577 : params.addClassDescription( 21 : NEML2Utils::docstring("Gather a MOOSE variable for insertion into the specified input or " 22 : "model parameter of a NEML2 model.")); 23 28577 : params.addRequiredCoupledVar("from_moose", NEML2Utils::docstring("MOOSE variable to read from")); 24 28577 : return params; 25 0 : } 26 : 27 : template <> 28 24 : MOOSEVariableToNEML2Templ<0>::MOOSEVariableToNEML2Templ(const InputParameters & params) 29 0 : : MOOSEToNEML2Batched(params) 30 : #ifdef NEML2_ENABLED 31 : , 32 24 : _moose_variable(coupledValue("from_moose")) 33 : #endif 34 : { 35 24 : } 36 : 37 : template <> 38 0 : MOOSEVariableToNEML2Templ<1>::MOOSEVariableToNEML2Templ(const InputParameters & params) 39 0 : : MOOSEToNEML2Batched(params) 40 : #ifdef NEML2_ENABLED 41 : , 42 0 : _moose_variable(coupledValueOld("from_moose")) 43 : #endif 44 : { 45 0 : } 46 : 47 : template class MOOSEVariableToNEML2Templ<0>; 48 : template class MOOSEVariableToNEML2Templ<1>;