aboutsummaryrefslogtreecommitdiff
path: root/Source/Utils/RelativeCellPosition.H
blob: cbc6064a7a5fab84b8890626267db5f49052e8c9 (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
/* Copyright 2020 Axel Huebl
 *
 * This file is part of WarpX.
 *
 * License: BSD-3-Clause-LBNL
 */
#ifndef WARPX_RELATIVE_CELL_POSITION_H_
#define WARPX_RELATIVE_CELL_POSITION_H_

#include <AMReX_BaseFwd.H>

#include <vector>

namespace utils
{
    /** Get the Relative Cell Position of Values in an MultiFab
     *
     * Translate the IndexType of a given MultiFab into a position relative to
     * the lower corner of a cell.
     *
     * @param[in] mf the amrex::MultiFab to get relative cell positions for
     * @return relative position to the lower corner, scaled to cell size [0.0:1.0)
     */
    std::vector< double >
    getRelativeCellPosition (amrex::MultiFab const& mf);
}

#endif // WARPX_RELATIVE_CELL_POSITION_H_