aboutsummaryrefslogtreecommitdiff
path: root/Source/Initialization/WarpXAMReXInit.H
blob: 4f08dc31cbfc31b4581c834fa714288fc8c3ca66 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* Copyright 2020 Axel Huebl
 *
 * This file is part of WarpX.
 *
 * License: BSD-3-Clause-LBNL
 */
#ifndef WARPX_AMREX_INIT_H_
#define WARPX_AMREX_INIT_H_

#include <AMReX.H>

/** Call amrex::Initialize
 *
 * This function calls amrex::Initialize and overwrites AMReX' defaults.
 * Note: AMReX defines a placeholder/"mock-up" for MPI_Comm and
 * MPI_COMM_WORLD in serial builds
 *
 * @param[in] argc number of arguments from main()
 * @param[in] argv argument strings from main()
 * @param[in] build_parm_parse build the input file parser (AMReX' default: true)
 * @param[in] mpi_comm the MPI communicator to use (AMReX' default: MPI_COMM_WORLD)
 * @returns pointer to an AMReX* object, forwarded from amrex::Initialize
 */
amrex::AMReX*
warpx_amrex_init(
    int& argc,
    char**& argv,
    bool const build_parm_parse = true,
    MPI_Comm const mpi_comm = MPI_COMM_WORLD
);

#endif