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 "MOOSEToNEML2.h" 11 : 12 : InputParameters 13 24571 : MOOSEToNEML2::validParams() 14 : { 15 24571 : auto params = emptyInputParameters(); 16 73713 : params.addRequiredParam<std::string>("to_neml2", 17 : "Name of the NEML2 variable or parameter to write to"); 18 24571 : return params; 19 0 : } 20 : 21 : #ifndef NEML2_ENABLED 22 : 23 0 : MOOSEToNEML2::MOOSEToNEML2(const InputParameters & /*params*/) {} 24 : 25 : #else 26 : 27 42 : MOOSEToNEML2::MOOSEToNEML2(const InputParameters & params) 28 42 : : _neml2_name(params.get<std::string>("to_neml2")) 29 : { 30 42 : NEML2Utils::assertNEML2Enabled(); 31 42 : } 32 : 33 : void 34 1821 : MOOSEToNEML2::insertInto(std::map<std::string, neml2::Tensor> & map) const 35 : { 36 1821 : map[_neml2_name] = gatheredData(); 37 1821 : } 38 : #endif