AppSyntax Extension
The AppSyntax Extension defines the !syntax
markdown command, which contains various sub-commands for creating MOOSE specific links and tables within your markdown, each are explained below. Note, the examples below refer to documentation associated with Kernels and/or the Diffusion Kernel. This should be replaced by the syntax for the system or object being documented. The configuration options for the extension itself are listed in Table 1.
Key | Default | Description |
---|---|---|
active | True | Toggle for disabling the extension. This only changes the initial active state, use setActive to control at runtime. |
executable | None | The MOOSE application executable to use for generating syntax. |
app_name | None | The MOOSE application name (e.g., moose_test); if not provided an attempt will be made to determine the name. |
sources | [] | List of source directories to investigate for class information. |
includes | [] | List of include directories to investigate for class information. |
inputs | [] | List of directories to interrogate for input files using an object. |
allow-test-objects | False | Enable documentation for test objects. |
hide | None | DEPRECATED |
remove | None | List or Dictionary of lists of syntax to remove. |
visible | ['required', 'optional'] | Parameter groups to show as un-collapsed. |
alias | None | Dictionary of syntax aliases. |
unregister | None | A `dict` or `dict` of `dict` including syntax to unregister (key='moose_base', value='parent_syntax') |
markdown | None | A `dict` or `dict` of `dict` including markdown files to explicitly set a custom, additional markdown reference (key='syntax', value='file.md') |
external_icon | feedback | Icon name for the alert title when unavailable syntax is located on an external page. |
external_alert | warning | Alert name when unavailable syntax is located on an external page. |
Class Description (!syntax description
)
The description
sub-command adds a paragraph with the content of InputParameters object class descriptions, which is added in the MOOSE application within the validParams
method. The available settings are included in Table 2.
Key | Default | Description |
---|---|---|
style | None | The style settings that are passed to rendered HTML tag. |
class | None | The class settings to be passed to rendered HTML tag. |
id | None | The class settings to be passed to the rendered tag. |
syntax | None | The name of the syntax to extract. If the name of the syntax is the first item in the settings the 'syntax=' may be omitted, e.g., `!syntax parameters /Kernels/Diffusion`. |
For example, the FileMesh object includes a validParams
function as shown in Listing 1. Notice, that the addClassDescription
method includes a short description of the object. To display this text the !syntax description
command is used followed by the MOOSE input file syntax for the object as in Example 1.
#include "FileMesh.h"
#include "Parser.h"
#include "MooseUtils.h"
#include "Moose.h"
#include "MooseApp.h"
#include "FileMeshGenerator.h"
#include "libmesh/exodusII_io.h"
#include "libmesh/mesh_tools.h"
#include "libmesh/nemesis_io.h"
#include "libmesh/parallel_mesh.h"
registerMooseObject("MooseApp", FileMesh);
InputParameters
FileMesh::validParams()
{
InputParameters params = MooseMesh::validParams();
params.addRequiredParam<MeshFileName>("file", "The name of the mesh file to read");
params.addParam<bool>("clear_spline_nodes",
false,
"If clear_spline_nodes=true, IsoGeometric Analyis spline nodes "
"and constraints are removed from an IGA mesh, after which only "
"C^0 Rational-Bernstein-Bezier elements will remain.");
params.addClassDescription("Read a mesh from a file.");
return params;
}
(framework/src/mesh/FileMesh.C)Object Parameters (!syntax parameters
)
The parameters
sub-command provides a means for displaying the default input file syntax for an object as shown in Example 2. The available settings for the parameters command are shown in Table 3.
Key | Default | Description |
---|---|---|
style | None | The style settings that are passed to rendered HTML tag. |
class | None | The class settings to be passed to rendered HTML tag. |
id | None | The class settings to be passed to the rendered tag. |
syntax | None | The name of the syntax to extract. If the name of the syntax is the first item in the settings the 'syntax=' may be omitted, e.g., `!syntax parameters /Kernels/Diffusion`. |
heading | Input Parameters | The heading title for the input parameters table, use 'None' to remove the heading. |
heading-level | 2 | Heading level for section title. |
groups | None | Space separated list of groups, in desired order, to output. |
hide | None | Space separated list of parameters to remove from output. |
show | None | Space separated list of parameters to display in output. |
visible | None | Space separated list of parameter groups to display with un-collapsed sections. |
!syntax parameters /Dampers/ConstantDamper
Input Parameters
Required Parameters
- dampingThe percentage (between 0 and 1) of the newton update to take.
C++ Type:double
Controllable:No
Description:The percentage (between 0 and 1) of the newton update to take.
Optional Parameters
- min_damping0Minimum value of computed damping. Damping lower than this will result in an exception being thrown and cutting the time step
Default:0
C++ Type:double
Controllable:No
Description:Minimum value of computed damping. Damping lower than this will result in an exception being thrown and cutting the time step
Advanced Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:Yes
Description:Set the enabled status of the MooseObject.
Input Files (!syntax inputs
)
In many cases it is useful to know where in the examples, tutorials, or tests an object is utilized in an input file. Therefore, inputs
sub-command is defined. Example 3 lists all the input files that use include the ConstantDamper object and Table 4 provides the available settings for the inputs
command.
Key | Default | Description |
---|---|---|
style | None | The style settings that are passed to rendered HTML tag. |
class | None | The class settings to be passed to rendered HTML tag. |
id | None | The class settings to be passed to the rendered tag. |
syntax | None | The name of the syntax to extract. If the name of the syntax is the first item in the settings the 'syntax=' may be omitted, e.g., `!syntax parameters /Kernels/Diffusion`. |
heading | Input Files | Heading to include for sections, use 'None' to remove the title. |
heading-level | 2 | Heading level for section title. |
!syntax inputs /Dampers/ConstantDamper
Input Files
- (test/tests/dampers/constant_damper/constant_damper_test.i)
- (test/tests/controls/time_periods/aux_scalar_kernels/enable_disable.i)
- (test/tests/controls/time_periods/error/control.i)
- (test/tests/controls/time_periods/error/steady_error.i)
- (examples/ex19_dampers/ex19.i)
- (test/tests/dampers/min_damping/min_general_damping.i)
- (test/tests/controls/time_periods/dampers/control.i)
- (test/tests/controls/time_periods/dampers/enable_disable.i)
- (test/tests/controls/time_periods/aux_kernels/enable_disable.i)
Child Objects (!syntax children
)
MOOSE is designed on the idea of inheritance, as such it is often useful to understand which classes inherit from another. The children
sub-command creates a list of all child classes of the given object, as shown in Example 4. The available settings for the children
command are provided below.
!syntax children /Kernels/Diffusion
Child Objects
- (examples/ex08_materials/include/kernels/ExampleDiffusion.h)
- (test/include/kernels/CoeffParamDiffusion.h)
- (framework/include/kernels/FunctionDiffusion.h)
- (examples/ex06_transient/include/kernels/ExampleDiffusion.h)
- (test/include/kernels/DeprecatedParamDiffusion.h)
- (modules/chemical_reactions/include/kernels/PrimaryDiffusion.h)
- (examples/ex16_timestepper/include/kernels/ExampleDiffusion.h)
- (examples/ex09_stateful_materials/include/kernels/ExampleDiffusion.h)
- (modules/heat_transfer/include/kernels/HeatConduction.h)
- (examples/ex20_user_objects/include/kernels/ExampleDiffusion.h)
- (examples/ex21_debugging/include/kernels/ExampleDiffusion.h)
Key | Default | Description |
---|---|---|
style | None | The style settings that are passed to rendered HTML tag. |
class | None | The class settings to be passed to rendered HTML tag. |
id | None | The class settings to be passed to the rendered tag. |
syntax | None | The name of the syntax to extract. If the name of the syntax is the first item in the settings the 'syntax=' may be omitted, e.g., `!syntax parameters /Kernels/Diffusion`. |
heading | Child Objects | Heading to include for sections, use 'None' to remove the title. |
heading-level | 2 | Heading level for section title. |
Actions, Objects, and Systems (!syntax list
)
MOOSE is based on systems (e.g., Kernels), where each system contains a set of objects, actions, and subsystems that can be used within an input file block. It is desirable to list the available object for a given system, which is the reason behind the !syntax list
command. The available settings for this command are included in Table 6.
Key | Default | Description |
---|---|---|
style | None | The style settings that are passed to rendered HTML tag. |
class | None | The class settings to be passed to rendered HTML tag. |
id | None | The class settings to be passed to the rendered tag. |
syntax | None | The name of the syntax to extract. If the name of the syntax is the first item in the settings the 'syntax=' may be omitted, e.g., `!syntax parameters /Kernels/Diffusion`. |
heading | AUTO | The heading title for the input parameters table, use 'None' to remove the heading. |
heading-level | 2 | Heading level for section title. |
group-headings | True | Display group headings. |
groups | None | List of groups (apps) to include in the complete syntax list. |
actions | True | Include a list of Action objects in syntax. |
objects | True | Include a list of MooseObject objects in syntax. |
subsystems | True | Include a list of sub system syntax in the output. |
!syntax list /Adaptivity
Available Objects, Actions, and Subsystems
- Moose App
- SetAdaptivityOptionsActionAction for defining adaptivity parameters.
- Indicators
- Markers
Complete Syntax List
!syntax complete level=3