Skip to content

Parallel Mesh Import #2169

Answered by v-dobrev
dk2048 asked this question in Q&A
Apr 13, 2021 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hi @dk2048,

Parallel meshes can be read using this constructor:

mfem/mesh/pmesh.hpp

Lines 238 to 240 in f4a99fa

/// Read a parallel mesh, each MPI rank from its own file/stream.
/** The @a refine parameter is passed to the method Mesh::Finalize(). */
ParMesh(MPI_Comm comm, std::istream &input, bool refine = true);

The corresponding write method is:

mfem/mesh/pmesh.hpp

Lines 387 to 388 in f4a99fa

/// Save the mesh in a parallel mesh format.
void ParPrint(std::ostream &out) const;

For non-conforming meshes (meshes with hanging nodes) the format is described here: https://mfem.org/mesh-formats/#mfem-nc-mesh-v10 -- this supports both serial a…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@dk2048
Comment options

Answer selected by tzanio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants