https://mooseframework.inl.gov
Loading...
Searching...
No Matches
CSGAction.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
10#include "CSGAction.h"
11
12registerMooseAction("MooseApp", CSGAction, "no_action");
13
16{
18 params.addClassDescription("Controls the generation of the Constructive Solid Geometry (CSG) "
19 "representation of the mesh generators in the input file.");
20 params.addParam<bool>(
21 "generate_csg",
22 true,
23 "Whether to generate and output the CSG representation of the mesh generators instead of "
24 "the finite element mesh, then exit. Ignored when --mesh-only, --split-mesh, or "
25 "--parse-neml2-only is passed on the command line.");
26 // A plain string rather than a FileName so that the path is relative to the working directory,
27 // consistent with the --csg-only <path> command line argument
28 params.addParam<std::string>("output_file",
29 "Name of the CSG JSON output file (Default: "
30 "\"<file_base>_csg.json\"). Overridden by --csg-only <path>.");
31 params.addParam<bool>(
32 "expand_units",
33 true,
34 "Whether to expand all engineering units into basic CSG components before output.");
35 return params;
36}
37
38CSGAction::CSGAction(const InputParameters & params) : Action(params) {}
39
40void
registerMooseAction("MooseApp", CSGAction, "no_action")
Base class for actions.
Definition Action.h:38
static InputParameters validParams()
Definition Action.C:26
Holds the parameters of the [ConstructiveSolidGeometry] input block.
Definition CSGAction.h:20
virtual void act() override
Method to add objects to the simulation or perform other setup tasks.
Definition CSGAction.C:41
CSGAction(const InputParameters &params)
Definition CSGAction.C:38
static InputParameters validParams()
Definition CSGAction.C:15
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object.
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump.