diff options
Diffstat (limited to 'mg2d.h')
-rw-r--r-- | mg2d.h | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -22,6 +22,8 @@ #include <stddef.h> #include <stdint.h> +#include <mpi.h> + #include "mg2d_boundary.h" #include "mg2d_constants.h" @@ -168,6 +170,20 @@ typedef struct MG2DContext { * @return The solver context on success, NULL on failure. */ MG2DContext *mg2d_solver_alloc(size_t domain_size); + +/** + * Allocate a solver component in a multi-component MPI-based solve. + * + * @param comm The MPI communicator used to communicate with the other + * components. + * @param local_start Indices of this component's lower left corner in the full + * computational domain. + * @param local_size Size of this component in each direction. + * + * @return The solver context on success, NULL on failure. + */ +MG2DContext *mg2d_solver_alloc_mpi(MPI_Comm comm, const size_t local_start[2], + const size_t local_size[2]); /** * Solve the equation, after all the required fields have been filled by the * caller. |