Class DistributedMeshGenerator

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

Class Documentation

class DistributedMeshGenerator : public opensn::MeshGenerator

This class is responsible for generating a mesh, partitioning it, and distributing the individual partitions to different MPI locations. The mesh is generated on location 0, partitioned into multiple parts, serialized, and distributed to all other MPI ranks.

The mesh data is serialized into a ByteArray for efficient MPI communication and deserialized at the receiving locations to reconstruct the mesh locally.

Public Functions

explicit DistributedMeshGenerator(const InputParameters &params)

Constructor for the DistributedMeshGenerator.

Parameters:

params – Input parameters for mesh generation and distribution.

virtual std::shared_ptr<MeshContinuum> Execute() override

Executes the mesh generation and distribution process.

On location 0, the mesh is generated, partitioned, serialized, and distributed to other MPI ranks. Other ranks receive the serialized mesh data, deserialize it, and set up the local mesh.

Public Static Functions

static InputParameters GetInputParameters()

Get the input parameters for this class.

Returns:

Input parameters for configuring the DistributedMeshGenerator.

static std::shared_ptr<DistributedMeshGenerator> Create(const ParameterBlock &params)