make GenerateBoundaryElements() vitual and call it only when
there are no boundary elements on any rank.
For now, ParMesh::GenerateBoundaryElements() does not do
anything -- it has a TODO comment.
serial meshes to be partitioned and saved in parallel format
using one processor. This capability allows MFEM to work around
the current bottleneck which requires every MPI rank to load
the big serial mesh before it can be partitioned.
This new capability is added to the `mesh-explorer` miniapp with
the new menu option `D` and is based on two new classes:
* `MeshPartitioner`, constructed from a serial mesh and any
partitioning array. Once constructed, it can extract any part
of the mesh consisting of the elements with ids `elem_id` such
that `partitioning[elem_id] == part_id`. The extracted mesh
part is given in the form of a `MeshPart` object.
* `MeshPart`, which is currently construced by a `MeshPartitioner`.
In the future, it can be created by other methods to facilitate
other capabilities such as parallel mesh re-partitioing. Once
constructed, the `MeshPart` can be saved to a file using the
text-based parallel MFEM format. Support for other formats can
be added as well. Another capability that can be added is the
MPI communication of `MeshPart` objects between different ranks
which can be used, for example, for implementing a `ParMesh`
constructor that needs the serial mesh only on one processor.
Current limitations:
* Non-conforming and NURBS meshes are not supported.
* Meshes with nodes (e.g. high-order or periodic meshes) are
not supported.
Small extension: if `Mesh::SetCurvature` is called with `order = 0`
then the method will remove the nodal `GridFunction` and use the
vertices array instead. This "curvature removal" capability can be
used from the `mesh-explorer` miniapp with the `c` menu option,
by specifying 0 when prompted to enter order.
Temporary change: `ex1p.cpp` is modified to disregard the (serial)
mesh specified with the option `-m`/`--mesh`. Instead, it loads
the parallel mesh `../miniapps/meshing/mesh-explorer.mesh.<rank>`
produced by the `D` menu option of the `mesh-explorer` miniapp.
Fix warnings about RAND_MAX when using single precision.
Introduce an inline function `real_t rand_real()` that returns a
random number in the interval [0,1) using rand(). This function
handles better the case of single precision where the expression
`real_t(rand())/(real_t(RAND_MAX)+1)` can return 1.0f due to round-off
when rand() returns a number close to RAND_MAX.
Use `rand_real()` in a few places that before used code similar to
`real_t(rand())/(real_t(RAND_MAX)+1)`.
of the various config settings -- they are important settings and
should appear earlier.
Move the definition of mfem::real_t to config.hpp along with some
macros from globals.hpp -- I think this a better place for them.
Added support for single precision to ex10 and ex10p.
Added explicit compile time checks and error messages to make
sure HYPRE is compiled with the same precision as MFEM.
Fixed an issue affecting the visualization of the results from
ex10 and ex10p on nonconforming meshes.