WarpX
Toggle main menu visibility
Loading...
Searching...
No Matches
Source
Diagnostics
FieldIO.H
Go to the documentation of this file.
1
/* Copyright 2019 Axel Huebl, David Grote, Igor Andriyash
2
* Remi Lehe
3
*
4
* This file is part of WarpX.
5
*
6
* License: BSD-3-Clause-LBNL
7
*/
8
#ifndef WARPX_FieldIO_H_
9
#define WARPX_FieldIO_H_
10
11
#include <
AMReX_REAL.H
>
12
13
#include <
AMReX_BaseFwd.H
>
14
15
#include <array>
16
#include <cstdint>
17
#include <memory>
18
#include <vector>
19
20
void
21
AverageAndPackVectorField
(
amrex::MultiFab
& mf_avg,
22
const
std::array< std::unique_ptr<amrex::MultiFab>, 3 >& vector_field,
23
const
amrex::DistributionMapping
& dm,
24
int
dcomp,
amrex::IntVect
ngrow );
25
26
void
27
AverageAndPackScalarField
(
amrex::MultiFab
& mf_avg,
28
const
amrex::MultiFab
& scalar_field,
29
const
amrex::DistributionMapping
& dm,
30
int
dcomp,
amrex::IntVect
ngrow );
31
38
std::vector<std::uint64_t>
39
getVec
(
const
amrex::IntVect
&
v
,
bool
reverse =
false
);
40
47
std::vector<double>
48
getVec
(
const
amrex::Real
*
v
,
bool
reverse =
false
);
49
50
std::vector<std::uint64_t>
51
getReversedVec
(
const
amrex::IntVect
&
v
);
52
53
std::vector<double>
54
getReversedVec
(
const
amrex::Real
*
v
);
55
56
#endif
// WARPX_FieldIO_H_
AMReX_BaseFwd.H
AMReX_REAL.H
AverageAndPackScalarField
void AverageAndPackScalarField(amrex::MultiFab &mf_avg, const amrex::MultiFab &scalar_field, const amrex::DistributionMapping &dm, int dcomp, amrex::IntVect ngrow)
Take a MultiFab scalar_field averages it to the cell center, and stores the resulting MultiFab in mf_...
Definition
FieldIO.cpp:197
getVec
std::vector< std::uint64_t > getVec(const amrex::IntVect &v, bool reverse=false)
Convert an IntVect to a std::vector<std::uint64_t> (used for compatibility with openPMD-api).
Definition
FieldIO.cpp:30
AverageAndPackVectorField
void AverageAndPackVectorField(amrex::MultiFab &mf_avg, const std::array< std::unique_ptr< amrex::MultiFab >, 3 > &vector_field, const amrex::DistributionMapping &dm, int dcomp, amrex::IntVect ngrow)
Takes an array of 3 MultiFab vector_field (representing the x, y, z components of a vector),...
Definition
FieldIO.cpp:157
getReversedVec
std::vector< std::uint64_t > getReversedVec(const amrex::IntVect &v)
Convert an IntVect to a std::vector<std::uint64_t> and reverse the order of the elements (used for co...
Definition
FieldIO.cpp:80
RigidAdvanceMode::v
@ v
Definition
RigidInjectedParticleContainer.H:27
amrex::DistributionMapping
amrex::MultiFab
amrex::Real
amrex_real Real
amrex::IntVect
IntVectND< 3 > IntVect
Generated by
1.17.0