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 "ScalarTagMatrixAux.h" 11 : #include "SubProblem.h" 12 : 13 : registerMooseObject("MooseApp", ScalarTagMatrixAux); 14 : 15 : InputParameters 16 14299 : ScalarTagMatrixAux::validParams() 17 : { 18 14299 : InputParameters params = TagAuxBase<AuxScalarKernel>::validParams(); 19 : 20 14299 : params.addParam<std::string>("matrix_tag", "TagName", "Tag Name this Aux works on"); 21 14299 : params.addRequiredCoupledVar("v", 22 : "The coupled variable whose components are coupled to AuxVariable"); 23 14299 : params.addClassDescription("Couple a tag matrix, and return its nodal value"); 24 14299 : return params; 25 0 : } 26 : 27 18 : ScalarTagMatrixAux::ScalarTagMatrixAux(const InputParameters & parameters) 28 : : TagAuxBase<AuxScalarKernel>(parameters), 29 18 : _tag_id(_subproblem.getMatrixTagID(getParam<std::string>("matrix_tag"))), 30 18 : _v(coupledMatrixTagScalarValue("v", _tag_id)), 31 36 : _v_var(*getScalarVar("v", 0)) 32 : { 33 18 : } 34 : 35 : Real 36 150 : ScalarTagMatrixAux::computeValue() 37 : { 38 150 : return _scaled ? _v[0] : _v[0] / _v_var.scalingFactor(); 39 : }