BatchMeshGeneratorAction

Overview

This Action is capable of batch generating a series of meshes using a single type of mesh generator with variation in one or multiple input parameters.

The type of mesh generator to be used for batch generation is provided by "mesh_generator_type". To batch generate meshes using the selected type of mesh generator, users need to provide both "fixed" input parameters, which keep constant throughout the batch mesh generation, and "batch" input parameters, which vary among generated meshes. For both "fixed" and "batch" input parameters, they can be either scalar or vector types.

Specifying Input Parameters

Fixed Input Parameters

Both scalar and vector types of fixed input parameters are supported by this Action.

Names of multiple fixed scalar input parameters can be defined by "fixed_scalar_input_param_names", with their corresponding types defined by "fixed_scalar_input_param_types". In the meantime, the values of these fixed scalar input parameters need to be provided through "fixed_scalar_input_param_values".

On the other hand, names and the corresponding types of multiple fixed vector input parameters can be specified by "fixed_vector_input_param_names" and "fixed_vector_input_param_types", respectively. The values of these fixed vector input parameters are provided through "fixed_vector_input_param_values".

Batch Input Parameters

Likewise, both scalar and vector types of batch input parameters are supported by this Action.

Similar to the scalar and vector types of fixed input parameters, the names, types, and values of the batch scalar and vector input parameters can be specified using "batch_scalar_input_param_names", "batch_scalar_input_param_types", "batch_scalar_input_param_values"; as well as "batch_vector_input_param_names", "batch_vector_input_param_types", "batch_vector_input_param_values", respectively. Note that for the batch input parameters, because variation is needed, the dimensions of "batch_scalar_input_param_values" and "batch_vector_input_param_values" are higher than their fixed counterparts by 1.

Types of Input Parameters

The supported input parameter types are summarized in Table 1 for both scalar and vector types.

Table 1: Summary of the symbols used for supported types of input parameters.

C++ Vector Data TypeC++ Scalar Data TypeSyntax
vector<Real>RealREAL
vector<short>shortSHORT
vector<unsigned short>unsigned shortUSHORT
vector<int>intINT
vector<unsigned int>unsigned intUINT
vector<string>stringSTRING
vector<SubdomainName>SubdomainNameSDNAME
vector<BoundaryName>BoundaryNameBDNAME
vector<MeshGeneratorName>MeshGeneratorNameMGNAME
vector<MeshFileName>MeshFileNameMFNAME
MultiMooseEnumMooseEnumENUM
vector<bool>boolBOOL

It it worth mentioning that some common input parameter types, such as subdomain_id_type and boundary_id_type, are subject to change at compile time. Users should check the documentation after compilation for the actual integer types. The error message generated by this action can also provide some information.

Methods to Process Multiple Batch Input Parameters

Cartesian Product and Corresponding Methods

If more than one batch input parameters (either scalar or vector) are provided, two methods can be selected using "multi_batch_params_method".

The default method is cartesian_product, which batch generates mesh generators based on the Cartesian product of all the batch input parameters. For example, if m scalar input parameters are specified using "batch_scalar_input_param_names", with the corresponding "batch_scalar_input_param_values" containing , ,..., and variations, respectively. Meanwhile, if n vector input parameters are specified using "batch_vector_input_param_names", with the corresponding "batch_vector_input_param_values" containing , ,..., and variations. Using the Cartesian product approach leads to a total of mesh generators.

On the other hand, an alternative method is corresponding, which requires the numbers of variations for all "batch_scalar_input_param_names" and "batch_vector_input_param_names" to be the same (e.g., ). In that case, only mesh generators are created.

Naming and Indexing of the Generated Meshes

The generated meshes are named with a prefix as defined in "mesh_name_prefix", followed by an index.

For the corresponding method, the index is determined by the order of the provided batch input parameters starting from 0. For example, if sets of batch input parameters are provided, the generated meshes are named as [mesh_name_prefix]_0, [mesh_name_prefix]_1, ..., [mesh_name_prefix]_{N-1}.

For the cartesian_product method, by default, a single index is used for all the batch input parameters. The indexing will first transverse the batch scalar input parameters from the first to the last, and then the batch vector input parameters from the first to the last. Optionally, users can choose to decompose the index into multiple indices for each batch input parameter by setting "use_decomposed_index" as true. In that case, the generated meshes are named as mesh_name_prefix_{}_{}_..._{}_{}_{}_..._{}, where , , ..., are the indices for the batch scalar input parameters starting from 0, and , , ..., are the indices for the batch vector input parameters starting from 0.

For example, if there are two batch scalar input parameters, with 2 variations and with 3 variations, and one batch vector input parameter, with 2 variations, the generated meshes are named and indexed as shown in Table 2.

Table 2: Comparison between single and decomposed indexing.

Single IndexingDecomposed Indexing
000mesh_name_prefix_0mesh_name_prefix_0_0_0
100mesh_name_prefix_1mesh_name_prefix_1_0_0
010mesh_name_prefix_2mesh_name_prefix_0_1_0
110mesh_name_prefix_3mesh_name_prefix_1_1_0
020mesh_name_prefix_4mesh_name_prefix_0_2_0
120mesh_name_prefix_5mesh_name_prefix_1_2_0
001mesh_name_prefix_6mesh_name_prefix_0_0_1
101mesh_name_prefix_7mesh_name_prefix_1_0_1
011mesh_name_prefix_8mesh_name_prefix_0_1_1
111mesh_name_prefix_9mesh_name_prefix_1_1_1
021mesh_name_prefix_10mesh_name_prefix_0_2_1
121mesh_name_prefix_11mesh_name_prefix_1_2_1

Input Parameters

  • mesh_generator_typeType of the mesh generator to be batch generated.

    C++ Type:std::string

    Controllable:No

    Description:Type of the mesh generator to be batch generated.

  • mesh_name_prefixPrefix name of the meshes to be batch generated.

    C++ Type:std::string

    Controllable:No

    Description:Prefix name of the meshes to be batch generated.

Required Parameters

  • active__all__ If specified only the blocks named will be visited and made active

    Default:__all__

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

    Controllable:No

    Description:If specified only the blocks named will be visited and made active

  • inactiveIf specified blocks matching these identifiers will be skipped.

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

    Controllable:No

    Description:If specified blocks matching these identifiers will be skipped.

  • multi_batch_params_methodcartesian_productMethod to generate multiple batch parameters.Options: corresponding cartesian_product

    Default:cartesian_product

    C++ Type:MooseEnum

    Options:corresponding, cartesian_product

    Controllable:No

    Description:Method to generate multiple batch parameters.Options: corresponding cartesian_product

  • use_decomposed_indexFalseWhether to use the decomposed index for the mesh name (only effective for the cartesian_product method).

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Whether to use the decomposed index for the mesh name (only effective for the cartesian_product method).

Optional Parameters

  • batch_scalar_input_param_namesNames of the scalar input parameters to be altered.

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

    Controllable:No

    Description:Names of the scalar input parameters to be altered.

  • batch_scalar_input_param_typesTypes of the scalar input parameters to be altered in each generator of the batch.

    C++ Type:MultiMooseEnum

    Options:BOOL, REAL, SHORT, USHORT, INT, UINT, STRING, SDNAME, BDRYNAME, MGNAME, MFNAME, ENUM

    Controllable:No

    Description:Types of the scalar input parameters to be altered in each generator of the batch.

  • batch_scalar_input_param_valuesValues of the scalar input parameters to be assigned.

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

    Controllable:No

    Description:Values of the scalar input parameters to be assigned.

  • batch_vector_input_param_namesName of the vector input parameters to be altered.

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

    Controllable:No

    Description:Name of the vector input parameters to be altered.

  • batch_vector_input_param_typesType of the vector input parameters to be altered.

    C++ Type:MultiMooseEnum

    Options:BOOL, REAL, SHORT, USHORT, INT, UINT, STRING, SDNAME, BDRYNAME, MGNAME, MFNAME, ENUM

    Controllable:No

    Description:Type of the vector input parameters to be altered.

  • batch_vector_input_param_valuesValues of the vector input parameters to be assigned.

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

    Controllable:No

    Description:Values of the vector input parameters to be assigned.

Batch Input 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.

Advanced Parameters

  • fixed_scalar_input_param_namesNames of the input parameters to be fixed.

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

    Controllable:No

    Description:Names of the input parameters to be fixed.

  • fixed_scalar_input_param_typesTypes of the input parameters to be fixed.

    C++ Type:MultiMooseEnum

    Options:BOOL, REAL, SHORT, USHORT, INT, UINT, STRING, SDNAME, BDRYNAME, MGNAME, MFNAME, ENUM

    Controllable:No

    Description:Types of the input parameters to be fixed.

  • fixed_scalar_input_param_valuesValues of the input parameters to be fixed.

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

    Controllable:No

    Description:Values of the input parameters to be fixed.

  • fixed_vector_input_param_namesNames of the input vector parameters to be fixed.

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

    Controllable:No

    Description:Names of the input vector parameters to be fixed.

  • fixed_vector_input_param_typesTypes of the input vector parameters to be fixed.

    C++ Type:MultiMooseEnum

    Options:BOOL, REAL, SHORT, USHORT, INT, UINT, STRING, SDNAME, BDRYNAME, MGNAME, MFNAME, ENUM

    Controllable:No

    Description:Types of the input vector parameters to be fixed.

  • fixed_vector_input_param_valuesValues of the input vector parameters to be fixed.

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

    Controllable:No

    Description:Values of the input vector parameters to be fixed.

Fixed Input Parameters