ParsedSubdomainIDsGenerator

Uses a parsed expression to determine the subdomain ids of included elements.

Overview

The ParsedSubdomainIDsGenerator generator allows the user to specify parsed expressions to compute the subdomain IDs of elements in the mesh.

The parsed expression is provided by "expression", which can a function of the element vertex average coordinates x, y, and z. More importantly, users can use the extra element integer values of each element as the function variables. The names of these extra element integers can be provide through "extra_element_id_names". This feature allows users to assign subdomain IDs based on the values of these extra element integers.

When the subdomain IDs are reassigned by this generator, "excluded_subdomains" can be used to specify a list of subdomains that need to be retained.

Note that due the flexibility provided by the parsed expression, the function value could be a non-integer value or negative. If a negative value is evaluated for an involved element in the mesh, the mesh generator will throw an error. On the other hand, if a non-integer value is evaluated, the rounded function value is used as the subdomain ID.

Input Parameters

  • expressionParsed expression to determine the subdomain id of each involved element

    C++ Type:std::string

    Controllable:No

    Description:Parsed expression to determine the subdomain id of each involved element

  • inputThe mesh we want to modify

    C++ Type:MeshGeneratorName

    Controllable:No

    Description:The mesh we want to modify

Required Parameters

  • constant_expressionsVector of values for the constants in constant_names (can be an FParser expression)

    C++ Type:std::vector<std::string>

    Controllable:No

    Description:Vector of values for the constants in constant_names (can be an FParser expression)

  • constant_namesVector of constants used in the parsed function

    C++ Type:std::vector<std::string>

    Controllable:No

    Description:Vector of constants used in the parsed function

  • epsilon1e-12Fuzzy comparison tolerance

    Default:1e-12

    C++ Type:double

    Unit:(no unit assumed)

    Controllable:No

    Description:Fuzzy comparison tolerance

  • excluded_subdomainsA set of subdomain names that will not changed even if they are inside/outside the combinatorial geometry

    C++ Type:std::vector<SubdomainName>

    Controllable:No

    Description:A set of subdomain names that will not changed even if they are inside/outside the combinatorial geometry

  • extra_element_id_namesExtra element integers used in the parsed expression

    C++ Type:std::vector<ExtraElementIDName>

    Controllable:No

    Description:Extra element integers used in the parsed expression

Optional Parameters

  • disable_fpoptimizerFalseDisable the function parser algebraic optimizer

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Disable the function parser algebraic optimizer

  • enable_ad_cacheTrueEnable caching of function derivatives for faster startup time

    Default:True

    C++ Type:bool

    Controllable:No

    Description:Enable caching of function derivatives for faster startup time

  • enable_auto_optimizeTrueEnable automatic immediate optimization of derivatives

    Default:True

    C++ Type:bool

    Controllable:No

    Description:Enable automatic immediate optimization of derivatives

  • enable_jitTrueEnable just-in-time compilation of function expressions for faster evaluation

    Default:True

    C++ Type:bool

    Controllable:No

    Description:Enable just-in-time compilation of function expressions for faster evaluation

  • evalerror_behaviornanWhat to do if evaluation error occurs. Options are to pass a nan, pass a nan with a warning, throw a error, or throw an exception

    Default:nan

    C++ Type:MooseEnum

    Options:nan, nan_warning, error, exception

    Controllable:No

    Description:What to do if evaluation error occurs. Options are to pass a nan, pass a nan with a warning, throw a error, or throw an exception

Parsed Expression Advanced Parameters

  • enableTrueSet the enabled status of the MooseObject.

    Default:True

    C++ Type:bool

    Controllable:No

    Description:Set the enabled status of the MooseObject.

  • save_with_nameKeep the mesh from this mesh generator in memory with the name specified

    C++ Type:std::string

    Controllable:No

    Description:Keep the mesh from this mesh generator in memory with the name specified

Advanced Parameters

  • nemesisFalseWhether or not to output the mesh file in the nemesisformat (only if output = true)

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Whether or not to output the mesh file in the nemesisformat (only if output = true)

  • outputFalseWhether or not to output the mesh file after generating the mesh

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Whether or not to output the mesh file after generating the mesh

  • show_infoFalseWhether or not to show mesh info after generating the mesh (bounding box, element types, sidesets, nodesets, subdomains, etc)

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Whether or not to show mesh info after generating the mesh (bounding box, element types, sidesets, nodesets, subdomains, etc)

Debugging Parameters