Parallel Mesh Generation¶
-
class
apmapflow.openfoam.parallel_mesh_gen.
BlockMeshRegion
(region, avg_fact, x_shift, z_shift, mesh_params, offset_reg)[source]¶ Used to handle a sub-set of field point data for parallel mesh generation
-
__init__
(region, avg_fact, x_shift, z_shift, mesh_params, offset_reg)[source]¶ Takes a field object and a set of mesh params to set the properties of the blockMeshDict. The x_shift and z_shift values are multipled by avg_fact.
data_region : DataFieldRegion object avg_fact : float, number of voxels along the X and Z axes. x_shift : int, number of voxels shifted from orgin z_shift : int, number of voxels shifted from origin mesh_params : dict, a dictionary containing parameters to offsets : DataFieldRegion object use instead of the defaults
-
-
class
apmapflow.openfoam.parallel_mesh_gen.
DataFieldRegion
(data, point_data)[source]¶ Used to manipulate a specfic data region of a DataField. In order to maintain data integrity point data is not able to be recalculated here.
-
class
apmapflow.openfoam.parallel_mesh_gen.
MergeGroup
(region_id, external_patches, path)[source]¶ Handles merging of meshes and stitching any patches that become internal
-
__init__
(region_id, external_patches, path)[source]¶ Sets up the initial merge group as a single region. External patches is a dictionary with an entry for each side, {side: ‘patch_name’}. The attribute ‘external_patches’ has the same format except its entries for each side are lists.
-
__weakref__
¶ list of weak references to the object (if defined)
-
static
_clean_polymesh
(path)[source]¶ Removes files left over from merging and stitching meshes together
-
-
class
apmapflow.openfoam.parallel_mesh_gen.
ParallelMeshGen
(field, system_dir, nprocs=4, **kwargs)[source]¶ Handles creation of a large mesh in parallel utilizing the OpenFoam utilties mergeMesh and stitchMesh.
-
__weakref__
¶ list of weak references to the object (if defined)
-
static
_create_merge_queue
(grid, direction)[source]¶ Determines the region merge queue based on the grid supplied
-
_create_regions_thread
(region_queue, t_name, kwargs)[source]¶ Handles processing of the queue in it’s own thread
-
_create_subregion_meshes
(ndivs, **kwargs)[source]¶ Divides the data map into smaller regions and creates a BlockMeshRegion object for each one.
-
_merge_submeshes
(grid)[source]¶ Handles merging and stitching of meshes based on alternating rounds of horizontal pairing and then vertical pairing.
-