mmgp.preprocessing

Functions

pretreat_sample(→ dict)

Compute and Save the precomputed FE projection and inverse FE projection operators.

pre_process(→ List[dict])

Parallel apply pretreat_sample function on the entire Dataset.

Module Contents

mmgp.preprocessing.pretreat_sample(configuration: dict, common_morphed_mesh: Muscat.Containers.Mesh.Mesh, i_sample: int) dict[source]

Compute and Save the precomputed FE projection and inverse FE projection operators.

Parameters:
  • configuration (dict) –

    A dictionary containing various parameters and settings for the pretreatment process. It should include the following keys:

    • ’case_name’ (str): The name or identifier for the specific case or scenario being analyzed.

    • ’base_name’ (str): The name of a specific base on which to pretreat samples.

    • ’zone_name’ (str): The name of a specific zone on which to pretreat samples.

    • ’morphing’ (dict): A dictionary containing morphing-related parameters with the following keys:
      • algo (str): A string indicating the morphing algorithm to be used. This parameter specifies the technique for mesh parametrization or transformation.

      • options (str): A string containing options or settings for the chosen morphing algorithm.

    • init_dataset_location (str): A string specifying the location or path to the initial dataset or data source used for the calculations.

    • generated_data_folder (str): A string representing the folder where the morphed mesh and transported fields, the common morphed mesh and projected coordinate fields and fields of interest, and precomputed FE projection and inverse FE projection operators will be saved.

  • common_morphed_mesh (Mesh) – The target common morphed mesh.

  • i_sample (int) – An integer representing the index or identifier of the sample being processed.

Hint

The following samples will alsos be saved in the generated data folder:

  • Sample with morphed mesh and transported fields

  • Sample with common morphed mesh and projected coordinate fields and fields of interest

Caution

This function will load the initial PLAID dataset. Make sure it has been created and is located correctly.

mmgp.preprocessing.pre_process(configuration: dict) List[dict][source]

Parallel apply pretreat_sample function on the entire Dataset.

Parameters:

configuration (dict) –

A dictionary containing various parameters and settings for the pretreatment process. It should include the following keys:

  • ’init_dataset_location’ (str): A string specifying the location or path to the initial dataset or data source used for the calculations.

  • ’generated_data_folder’ (str): A string representing the folder where the morphed mesh and transported fields, the common morphed mesh, projected coordinate fields, fields of interest, and precomputed FE projection and inverse FE projection operators will be saved.

  • ’case_name’ (str): The name or identifier for the specific case or scenario being analyzed.

  • ’morphing’ (dict): A dictionary containing morphing-related parameters with the following keys:
    • ’algo’ (str): A string indicating the morphing algorithm to be used.

    • ’options’ (str): A string containing options or settings for the chosen morphing algorithm.

  • ’common_mesh_index’ (int): An integer specifying the index for the common mesh.

Caution

This function will load the initial PLAID dataset. Make sure it has been created and is located correctly.