ParsedElementIDMeshGenerator

Description

ParsedElementIDMeshGenerator is a mesh generator that wraps an existing input mesh and adds one or more Extra Element Integer ID (EEIID) to the mesh. Clustering for mesh tally amalgamation uses these EEIID to label the cluster based on different heuristics.

warningwarning

If an extra_element_integer_names entry already exists in the mesh, the generator will not override the values. It will throw an error. This ensures existing mesh annotations are preserved.

Example Input File

This example reads a mesh (in this case generated_mesh) created by a GeneratedMeshGenerator, then the ParsedElementIDMeshGenerator adds one EEIID threshold_heuristic to the mesh. The value of EEIID threshold_heuristic will be -1 throughout the whole mesh.

[Mesh<<<{"href": "../../syntax/Mesh/index.html"}>>>]
  [generated_mesh]
    type = GeneratedMeshGenerator<<<{"description": "Create a line, square, or cube mesh with uniformly spaced or biased elements.", "href": "GeneratedMeshGenerator.html"}>>>
    dim<<<{"description": "The dimension of the mesh to be generated"}>>> = 2
    nx<<<{"description": "Number of elements in the X direction"}>>> = 10
    ny<<<{"description": "Number of elements in the Y direction"}>>> = 10
    xmin<<<{"description": "Lower X Coordinate of the generated mesh"}>>> = 0
    xmax<<<{"description": "Upper X Coordinate of the generated mesh"}>>> = 10
    ymin<<<{"description": "Lower Y Coordinate of the generated mesh"}>>> = 0
    ymax<<<{"description": "Upper Y Coordinate of the generated mesh"}>>> = 10
  []
  [add_eeid]
    type = ParsedElementIDMeshGenerator<<<{"description": "Adds extra element integers to the whole mesh.", "href": "ParsedElementIDMeshGenerator.html"}>>>
    input<<<{"description": "The mesh we want to modify"}>>> = generated_mesh
    extra_element_integer_names<<<{"description": "list of extra integer names toto be added in the mesh."}>>> = 'threshold_heuristic' #names of the eeid
    values<<<{"description": "Optional list of integer values corresponding to each name in 'extra_element_integer_names'. If not provided, all values will default to -1. If provided, the list must contain the same number of entries as 'extra_element_integer_names', with each value assigned to the respective extra element integer."}>>> = '-1'
  []
[]

[AuxVariables<<<{"href": "../../syntax/AuxVariables/index.html"}>>>]
  [metric_var]
    order<<<{"description": "Specifies the order of the FE shape function to use for this variable (additional orders not listed are allowed)"}>>> = CONSTANT
    family<<<{"description": "Specifies the family of FE shape functions to use for this variable"}>>> = MONOMIAL
  []
  [cluster_id_aux]
    order<<<{"description": "Specifies the order of the FE shape function to use for this variable (additional orders not listed are allowed)"}>>> = CONSTANT
    family<<<{"description": "Specifies the family of FE shape functions to use for this variable"}>>> = MONOMIAL
  []
[]

[AuxKernels<<<{"href": "../../syntax/AuxKernels/index.html"}>>>]
  [create_metric]
    type = FunctionAux<<<{"description": "Auxiliary Kernel that creates and updates a field variable by sampling a function through space and time.", "href": "../auxkernels/FunctionAux.html"}>>>
    variable<<<{"description": "The name of the variable that this object applies to"}>>> = metric_var
    function<<<{"description": "The function to use as the value"}>>> = 'sqrt(x*x + y*y)'
    execute_on<<<{"description": "The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html."}>>> = 'TIMESTEP_BEGIN'
  []
  [store_element_id]
    type=ExtraElementIDAux<<<{"description": "Puts element extra IDs into an aux variable.", "href": "../auxkernels/ExtraElementIDAux.html"}>>>
    extra_id_name<<<{"description": "The extra ID name in the mesh"}>>> ="threshold_heuristic"
    execute_on<<<{"description": "The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html."}>>> = 'TIMESTEP_BEGIN'
    variable<<<{"description": "The name of the variable that this object applies to"}>>>=cluster_id_aux
  []
[]

[UserObjects<<<{"href": "../../syntax/UserObjects/index.html"}>>>]
  [threshold_1]
    type = ThresholdHeuristicUserObject<<<{"description": "Clusters elements whose values are less/more than a specified threshold.", "href": "../userobjects/ThresholdHeuristicUserObject.html"}>>>
    metric_variable_name<<<{"description": "The name of the variable based on which clustering will be done"}>>> = 'metric_var'
    threshold<<<{"description": " The value against which the clustering process is compared."}>>> = 1.1
  []
  [threshold_2]
    type = ThresholdHeuristicUserObject<<<{"description": "Clusters elements whose values are less/more than a specified threshold.", "href": "../userobjects/ThresholdHeuristicUserObject.html"}>>>
    metric_variable_name<<<{"description": "The name of the variable based on which clustering will be done"}>>> = 'metric_var'
    threshold<<<{"description": " The value against which the clustering process is compared."}>>> = 1.4
    cluster_if_above_threshold<<<{"description": " Cluster elements if the value is more than the threshold"}>>> = false
  []

  [boolean_combo]
    type = BooleanComboClusteringUserObject<<<{"description": "Takes various heuristic user objects and applies a user defined boolean logic operation on them.", "href": "../userobjects/BooleanComboClusteringUserObject.html"}>>>
    expression<<<{"description": "boolean logic operation expression"}>>> = "( threshold_1 and threshold_2 )"
    id_name<<<{"description": "extra_element_integer_id name"}>>> = "threshold_heuristic"
  []
[]

[Problem<<<{"href": "../../syntax/Problem/index.html"}>>>]
  type = FEProblem
  solve = false
[]

[Executioner<<<{"href": "../../syntax/Executioner/index.html"}>>>]
  type = Transient
  solve = false
  dt = 0.1
  num_steps = 2
[]

[Outputs<<<{"href": "../../syntax/Outputs/index.html"}>>>]
  exodus<<<{"description": "Output the results using the default settings for Exodus output."}>>> = true
[]
(test/tests/userobjects/clustering/threshold_heuristic/example_input.i)

Input Parameters

  • extra_element_integer_nameslist of extra integer names toto be added in the mesh.

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

    Controllable:No

    Description:list of extra integer names toto be added in the mesh.

  • inputThe mesh we want to modify

    C++ Type:MeshGeneratorName

    Controllable:No

    Description:The mesh we want to modify

Required Parameters

  • valuesOptional list of integer values corresponding to each name in 'extra_element_integer_names'. If not provided, all values will default to -1. If provided, the list must contain the same number of entries as 'extra_element_integer_names', with each value assigned to the respective extra element integer.

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

    Controllable:No

    Description:Optional list of integer values corresponding to each name in 'extra_element_integer_names'. If not provided, all values will default to -1. If provided, the list must contain the same number of entries as 'extra_element_integer_names', with each value assigned to the respective extra element integer.

Optional 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