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 "QuadSubChannelBuildMeshAction.h" 11 : #include "SubChannelMesh.h" 12 : 13 : registerMooseAction("SubChannelApp", QuadSubChannelBuildMeshAction, "setup_mesh"); 14 : registerMooseAction("SubChannelApp", QuadSubChannelBuildMeshAction, "set_mesh_base"); 15 : 16 : InputParameters 17 299 : QuadSubChannelBuildMeshAction::validParams() 18 : { 19 299 : InputParameters params = Action::validParams(); 20 299 : params.addClassDescription("Creates the infrastructure necessary to build the subchannel mesh in " 21 : "the square lattice arrangement"); 22 299 : return params; 23 0 : } 24 : 25 299 : QuadSubChannelBuildMeshAction::QuadSubChannelBuildMeshAction(const InputParameters & params) 26 299 : : Action(params) 27 : { 28 299 : } 29 : 30 : void 31 596 : QuadSubChannelBuildMeshAction::act() 32 : { 33 596 : if (_current_task == "setup_mesh") 34 : { 35 : { 36 299 : const std::string class_name = "QuadSubChannelMesh"; 37 299 : InputParameters params = _factory.getValidParams(class_name); 38 299 : _mesh = _factory.create<SubChannelMesh>(class_name, "subchannel:mesh", params); 39 299 : } 40 299 : _mesh->buildMesh(); 41 : } 42 297 : else if (_current_task == "set_mesh_base") 43 : { 44 297 : auto mesh_base = _app.getMeshGeneratorMesh(); 45 297 : _mesh->setMeshBase(std::move(mesh_base)); 46 297 : } 47 596 : }