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