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 "THMOutputVectorVelocityAction.h" 11 : #include "THMProblem.h" 12 : 13 : registerMooseAction("ThermalHydraulicsApp", 14 : THMOutputVectorVelocityAction, 15 : "THM:output_vector_velocity"); 16 : 17 : InputParameters 18 5416 : THMOutputVectorVelocityAction::validParams() 19 : { 20 5416 : InputParameters params = Action::validParams(); 21 5416 : params.addClassDescription("Lets the user specify the variable type for the velocity output"); 22 10832 : params.addParam<bool>( 23 10832 : "velocity_as_vector", true, "True for vector-valued velocity, false for scalar velocity."); 24 5416 : return params; 25 0 : } 26 : 27 5416 : THMOutputVectorVelocityAction::THMOutputVectorVelocityAction(const InputParameters & params) 28 5416 : : Action(params) 29 : { 30 5416 : } 31 : 32 : void 33 5352 : THMOutputVectorVelocityAction::act() 34 : { 35 5352 : THMProblem * thm_problem = dynamic_cast<THMProblem *>(_problem.get()); 36 5352 : if (thm_problem) 37 7782 : thm_problem->setVectorValuedVelocity(getParam<bool>("velocity_as_vector")); 38 5352 : }