Commit Graph
52 Commits
Author SHA1 Message Date
Andrew Ho b75c6e96e6 fix doxygen 2025-08-05 14:19:51 -07:00
Andrew Ho a54c5d2105 changed to use MPITypeMap
extend MPITypeMap to all fundamental C++ types except long double
2025-08-05 14:09:11 -07:00
Will Pazner 22dffb6326 VTK-HDF5 format writer 2025-04-11 10:22:03 -07:00
Tzanio Kolev e4c2152419 Update Copyright to 2010-2025 2025-02-03 12:17:26 -08:00
Veselin Dobrev cba47bc4cd Initial draft of mesh partitioning capability that allows big
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.
2024-03-31 12:57:13 -07:00
Dylan Copeland 046a874cfb Merge branch 'master' of github.com:mfem/mfem into float 2024-02-06 10:56:41 -08:00
Tzanio Kolev 87290fbf56 Update Copyright to 2010-2024 2024-01-27 13:06:49 -08:00
Dylan Copeland d41b97552c Merge branch 'master' of github.com:mfem/mfem into float 2023-11-16 17:37:34 -08:00
Dylan Copeland 3b4fc3b1df Generalized for MPI and hypre. 2023-10-31 21:12:15 -07:00
Sebastian Grimberg f5d0658223 Address PR comments 2023-07-06 08:15:48 -07:00
Sebastian Grimberg c145a0c687 And another attempt to resolve LNK2019 error 2023-07-03 08:48:10 -07:00
Sebastian Grimberg 947cb04ea4 Another attempt to resolve LNK2019 error 2023-07-03 08:24:54 -07:00
Sebastian Grimberg 075c9caea4 Attempt to resolve LNK2019 linker error on Windows 2023-07-03 07:37:15 -07:00
Sebastian Grimberg 77810e3741 Alternative approach to 15934beb to inititalize MPI with MPI_Init_thread and a level of threading which by default is configured based on MFEM's build configuration, but can be overridden at runtime by modifying Mpi::default_thread_required 2023-06-29 15:31:47 -07:00
Veselin Dobrev 15934bebb9 In the singleton class Mpi: added method Mpi::Init_thread that
performs MPI initialization using MPI_Init_thread; added method
Mpi::Init_auto that selects what MPI init mode to use based on
the configured external packages used by MFEM -- currently it
calls Mpi::Init_thread(MPI_THREAD_MULTIPLE) when using STRUMPACK
built with SLATE or PT-Scotch, otherwise it calls Mpi::Init.

In the examples that can use STRUMPACK, use Mpi::Init_auto instead
of Mpi::Init.

Fix a small unrelated issue noticed during testing: in
miniapps/multidomain/multidomain.cpp, do not open GLVis socket
connections when visualization is disabled.
2023-06-27 17:47:22 -07:00
Tzanio Kolev 96e00dc815 Updated COPYRIGHT to 2010-2023 2023-03-11 16:58:18 -08:00
Julian Andrej f14879f704 retry to get parallel right 2022-05-16 09:33:42 -07:00
Tzanio 493f0fd8ce Switch to a singleton MPI class. Keep MPI_Session for backward compatibility. 2022-03-08 18:26:33 -08:00
Tzanio 6d2530775b Extended copyright to 2022 2022-02-25 10:24:50 -08:00
Stowell, Mark L 63381b366a Renaming ostream variables from out to os 2022-01-18 15:06:46 -08:00
Stowell, Mark L f7c9bdab17 Renaming "out" and "err" local variables to avoid globals 2021-12-22 15:19:20 -08:00
Will Pazner 40f6a642c2 Add GroupTopology::Swap 2021-02-22 12:23:01 -08:00
Adrien M. Bernede 04fb572359 Let's forget about 2020 2021-01-26 11:55:36 -08:00
Tzanio 89fad12237 Changes in the general/ directory before the mfem-4.2 release 2020-10-24 18:27:14 -07:00
Tzanio 33740acb3e Some edits in general/ 2020-03-09 20:12:51 -07:00
Tzanio 05125e19d5 Removed a space 2020-03-09 15:36:41 -07:00
Tzanio ca55ef0217 The release number for mfem-4.1 is LLNL-CODE-806117 2020-03-02 17:18:46 -08:00
Tzanio 2caa222edf A number of changes to switch the code from LGPL-2.1 to BSD-3:
- Updated LICENSE, README, CHANGELOG and CONTRIBUTING.md
- Removed COPYRIGHT, added NOTICE
- Updated the headers in all source files, makefiles, etc.
2020-02-23 11:16:46 -08:00
camierjs ffafd43bf4 Remove warnings from CudaConformingProlongationOperator and CudaGroupCommunicator 2019-08-20 17:52:13 -07:00
camierjs eae9341fe8 Cleanup WIP 2019-08-20 13:17:09 -07:00
camierjs 0d1bb17f99 Direct MPI from Engines 2019-08-01 15:11:06 -07:00
Tzanio b0987500a4 make style 2018-05-21 13:18:44 -07:00
KazemKamran 37686b0321 Add the PUMI-MFEM MeshAdapt interface implementation and an example 2018-05-03 17:44:16 -04:00
Tzanio c0a6bdad45 Merge branch 'master' into lor-interp-dev 2018-03-05 12:31:12 -08:00
Veselin Dobrev 7638ad1144 Improved const qualifiers in class GroupCommunicator. 2018-03-03 18:30:51 -08:00
Vladimir Tomov 3df7714f02 Added a check before MPI_Waitany in communication.cpp - some MPI versions
segfault without it.
2018-03-01 14:31:57 -08:00
Veselin Dobrev c52c6243bc In class GroupTopology, use a new implementation for the final
stage of the method Create(). The previous implementation was
using MPI_Recv() with MPI_ANY_SOURCE which was causing issues
where one rank was receiving data sent from different calls to
Create().

In class GroupCommunicator, add const to the arguments of the
methods Create() and SetLTDofTable().
2018-01-08 23:30:09 -08:00
Veselin Dobrev 5e59073ee0 Address warnings from some compilers.
In makefile, explicitly pass command line overrides to the recursive
make calls in the same directory.
2017-12-10 03:10:52 -08:00
Veselin Dobrev 5d8570501c Remove the MPI communicator parameters from the constructors of class
MPI_Session - the only communicator that makes sense with this class is
MPI_COMM_WORLD.

Replace `mfem::err.GetStream()` with `mfem::err`.

Remove #include "communication.hpp" from error.hpp.
2017-09-30 18:50:08 -07:00
Veselin Dobrev 27ffe35369 Merged general/globalcomm.[ch]pp and general/globalostream.[ch]pp into
general/globals.[ch].

Renamed class WrappedOStream to OutStream and use a different
implementation in order to support the case when the OutStream is passed
as a parameter of type std::ostream.

In class MPI_Session, added an MPI_Comm parameter to both constructors,
with a default value of MPI_COMM_WORLD.

Hide the global variable MFEM_COMM_WORLD and allow access (read and
write) with global functions: GetGlobalMPI_Comm() and
SetGlobalMPI_Comm() - in the future, we may want to perform some tasks
when changing the "global" MPI communicator.

In mfem_error(), use GetGlobalMPI_Comm() instead of MPI_COMM_WORLD.

Minor formatting changes and #include reordering.
2017-09-29 15:52:51 -07:00
Tzanio abe85f4cb6 make style 2017-09-28 10:15:26 -07:00
Aaron Fisher aa040f3e64 Made everything work with the new mfem::out and mfem::err output. 2017-09-27 15:42:37 -07:00
Tzanio 8f9a2e9980 small changes 2017-09-22 17:53:16 -07:00
Aaron Fisher 9a4f78ec65 Changed the global ostream to something that looks more like cout/cerr. Updated the code in the general folder to use the new global ostream as an example. Added a global MPIComm to replace MPI_COMM_WORLD. 2017-09-22 14:34:50 -07:00
Veselin Dobrev 055e9917c3 Update some code comments and one MFEM_ABORT message. 2017-08-08 18:28:19 -07:00
Veselin Dobrev 23a32a85ad In class GroupCommunicator, add a new communication mode: byNeighbor
while calling the original mode byGroup. The new mode, which is also the
new default, aggregates communications between the same two ranks that
may consist of data corresponding to multiple groups, thereby reducing
the total number of MPI send and receive calls. This optimization
addresses the slowdown observed in the last commit for small problem
sizes (per rank) while also providing small improvements for medium and
large problem sizes.

The communication mode of a GroupCommunicator can be specified with the
new second parameter of its constructor which has a default value
byNeighbor.

Add two new methods, mostly useful for debugging/diagnostics:
GroupCommunicator::PrintInfo() and HypreParMatrix::PrintCommPkg().
2017-08-05 22:46:49 -07:00
Veselin Dobrev 0447139e5f Implemention of an optimized, matrix-free, parallel prolongation
operator for the case of conforming parallel meshes.

N.B.: For small problem sizes, the HypreParMatrix version seems
to be faster.
2017-08-01 18:18:36 -07:00
Tzanio 1569425857 Version 3.3 2017-01-28 22:05:47 -08:00
Jakub Cerveny 125ff226e4 Version 3.2 2016-06-30 10:37:30 -07:00
Tzanio dbae60fe32 Version 3.1 2016-02-16 15:45:48 -08:00