NEML2 2.0.0
Loading...
Searching...
No Matches
OptionSet::Metadata Struct Reference

Detailed Description

Metadata associated with this option set

#include <OptionSet.h>

Public Attributes

std::string name = ""
 Name of the option set.
 
std::string type = ""
 Type of the option set.
 
std::string path = ""
 Path to the option set.
 
std::string doc = ""
 Option set's doc string.
 
std::string section = ""
 Which NEML2 input file section this object belongs to.
 

Member Data Documentation

◆ doc

std::string doc = ""

Option set's doc string.

When we build the documentation for NEML2, we automatically extract the syntax and convert it to a markdown file. The syntax of NEML2 is just the collection of expected options of all the registered objects. Doxygen will then render the markdown syntax to the target output format, e.g., html, tex, etc. This implies that the docstring can contain anything that the Doxygen's markdown renderer can understand. For more information, see https://www.doxygen.nl/manual/markdown.html

◆ name

std::string name = ""

Name of the option set.

For example, in a HIT input file, this is the subsection name that appears inside the square brackets

[foo]
type = SomeModel
bar = 123
[]

where "foo" is the name of the option set

◆ path

std::string path = ""

Path to the option set.

The path to an option set describes its hierarchy inside the syntax tree parsed by the parser. For example, in a HIT input file, this is the full path to the current option set (excluding its local path contribution)

[foo]
[bar]
[baz]
type = SomeModel
goo = 123
[]
[]
[]

The option set with name "baz" has path "foo/bar".

◆ section

std::string section = ""

Which NEML2 input file section this object belongs to.

NEML2 supports first class systems such as [Tensors], [Models], [Drivers], [Solvers], etc. This field denotes which section, i.e. which of the first class system, this object belongs to.

◆ type

std::string type = ""

Type of the option set.

For example, in a HIT input file, a special field is reserved for the type of the option set

[foo]
type = SomeModel
bar = 123
[]

where "SomeModel" is the option name. The type is registered to the Registry using register_NEML2_object and its variants.