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.

Table 1: Configuration options for the AppSyntax extension.

KeyDefaultDescription
inputs[]List of directories to interrogate for input files using an object.
executableNoneThe MOOSE application executable to use for generating syntax.
hideNoneDictionary of syntax to hide.
aliasNoneList of Dictionary of lists of syntax aliases.
removeNoneList or Dictionary of lists of syntax to remove.
includes[]List of include directories to investigate for class information.
visibleset(['required', 'optional'])Parameter groups to show as un-collapsed.
activeTrueToggle for disabling the extension. This only changes the initial active state, use setActive to control at runtime.
allow-test-objectsFalseEnable the test objects.

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.

Table 2: Available command settings for !syntax description command.

KeyDefaultDescription
styleThe style settings that are passed to rendered HTML tag.
syntaxNoneThe 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`.
classThe class settings to be passed to rendered HTML tag.
idThe class settings to be passed to the rendered tag.

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.

Example 1: Example use of the !syntax description command.

!syntax description /Mesh/FileMesh style=color:green

Read a mesh from a file.

Listing 1: The validParams function from the FileMesh object.

template <>
InputParameters
validParams<FileMesh>()
{
  InputParameters params = validParams<MooseMesh>();
  params.addRequiredParam<MeshFileName>("file", "The name of the mesh file to read");
  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 commaond are shown in Table 3.

Table 3: Command settings for !syntax parameters command.

KeyDefaultDescription
styleThe style settings that are passed to rendered HTML tag.
hideNoneSpace separated list of parameters to remove from output.
groupsNoneSpace separated list of groups, in desired order, to output.
showNoneSpace separated list of parameters to display in output.
classThe class settings to be passed to rendered HTML tag.
syntaxNoneThe 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`.
visibleNoneSpace separated list of parameter groups to display with un-collapsed sections.
heading-level2Heading level for section title.
idThe class settings to be passed to the rendered tag.
headingInput ParametersThe heading title for the input parameters table, use 'None' to remove the heading.

Example 2: Example of !syntax parameters command.

!syntax parameters /Dampers/ConstantDamper

Input Parameters

Required Parameters

  • dampingThe percentage (between 0 and 1) of the newton update to take.

    C++ Type:double

    Options:

    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

    Options:

    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

    Options:

    Description:Adds user-defined labels for accessing object parameters via control logic.

  • enableTrueSet the enabled status of the MooseObject.

    Default:True

    C++ Type:bool

    Options:

    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.

Table 4: Available command settings for !syntax inputs commands.

KeyDefaultDescription
styleThe style settings that are passed to rendered HTML tag.
classThe class settings to be passed to rendered HTML tag.
syntaxNoneThe 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-level2Heading level for section title.
idThe class settings to be passed to the rendered tag.
headingInput FilesHeading to include for sections, use 'None' to remove the title.

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.

Table 5: Command settings for !syntax children command.

KeyDefaultDescription
styleThe style settings that are passed to rendered HTML tag.
classThe class settings to be passed to rendered HTML tag.
syntaxNoneThe 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-level2Heading level for section title.
idThe class settings to be passed to the rendered tag.
headingChild ObjectsHeading to include for sections, use 'None' to remove the 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.

Table 6: Command settings for !syntax list command.

KeyDefaultDescription
styleThe style settings that are passed to rendered HTML tag.
groupsNoneList of groups (apps) to include in the complete syntax list.
classThe class settings to be passed to rendered HTML tag.
subsystemsTrueInclude a list of sub system syntax in the output.
actionsTrueInclude a list of Action objects in syntax.
syntaxNoneThe 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`.
objectsTrueInclude a list of MooseObject objects in syntax.
heading-level2Heading level for section title.
idThe class settings to be passed to the rendered tag.
headingAUTOThe heading title for the input parameters table, use 'None' to remove the heading.

Example 5:

!syntax list /Adaptivity

Available Objects, Actions, and Subsystems

Complete Syntax List


!syntax complete level=3