https://mooseframework.inl.gov
Loading...
Searching...
No Matches
TriSubChannelBuildMeshAction.C
Go to the documentation of this file.
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
11#include "SubChannelMesh.h"
12
13registerMooseAction("SubChannelApp", TriSubChannelBuildMeshAction, "setup_mesh");
14registerMooseAction("SubChannelApp", TriSubChannelBuildMeshAction, "set_mesh_base");
15
18{
20 params.addClassDescription("Creates the infastructure necessary to build the subchannel mesh in "
21 "the triangular lattice arrangement");
22 return params;
23}
24
29
30void
32{
33 if (_current_task == "setup_mesh")
34 {
35 {
36 const std::string class_name = "TriSubChannelMesh";
37 InputParameters params = _factory.getValidParams(class_name);
38 _mesh = _factory.create<SubChannelMesh>(class_name, "subchannel:mesh", params);
39 }
41 }
42 else if (_current_task == "set_mesh_base")
43 {
44 auto mesh_base = _app.getMeshGeneratorMesh();
45 _mesh->setMeshBase(std::move(mesh_base));
46 }
47}
registerMooseAction("SubChannelApp", TriSubChannelBuildMeshAction, "setup_mesh")
std::shared_ptr< MooseMesh > & _mesh
static InputParameters validParams()
MooseApp & _app
const std::string & _current_task
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, const InputParameters &parameters, THREAD_ID tid=0, bool print_deprecated=true)
InputParameters getValidParams(const std::string &name) const
void addClassDescription(const std::string &doc_string)
std::unique_ptr< MeshBase > getMeshGeneratorMesh()
virtual void buildMesh()=0
Factory & _factory
Base class for subchannel meshes.
Action for building empty mesh object for hexagonal geometry that is filled by mesh generators.
TriSubChannelBuildMeshAction(const InputParameters &params)