forked from BLAST-WarpX/warpx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOpenPMDHelpFunction.H
38 lines (33 loc) · 988 Bytes
/
OpenPMDHelpFunction.H
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
33
34
35
36
37
38
/* Copyright 2023 The WarpX Community
*
* This file is part of WarpX.
*
* Authors: Juliette Pech, Axel Huebl
* License: BSD-3-Clause-LBNL
*/
#ifndef WARPX_OPENPMDHELPFUNCTION_H_
#define WARPX_OPENPMDHELPFUNCTION_H_
#ifdef WARPX_USE_OPENPMD
# include <openPMD/openPMD.hpp>
#endif
#include <string>
/** Determine the preferred file ending if unspecified
*
* @return file ending without the "."
*/
std::string
WarpXOpenPMDFileType ();
#ifdef WARPX_USE_OPENPMD
/** Determine how many particles were already written in this species and step
*
* This checks for a particle species the current size of the id attribute, if it exists,
* and if it does it takes its extent as the number of particles already on disk.
*
* Note that this checks declared size, not necessarily written size.
*
* @return exisitng extent of the "id" attribute or zero.
*/
unsigned long
num_already_flushed (openPMD::ParticleSpecies & currSpecies);
#endif
#endif // WARPX_OPENPMDHELPFUNCTION_H_