aboutsummaryrefslogtreecommitdiff
path: root/Source/Diagnostics/ReducedDiags/FieldMomentum.H
blob: 2dadb6a8e86badfe8221b7c7335f27c5e3bcc6e9 (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
33
34
35
36
37
38
/* Copyright 2019-2020
 *
 * This file is part of WarpX.
 *
 * License: BSD-3-Clause-LBNL
 */

#ifndef WARPX_DIAGNOSTICS_REDUCEDDIAGS_FIELDMOMENTUM_H_
#define WARPX_DIAGNOSTICS_REDUCEDDIAGS_FIELDMOMENTUM_H_

#include "ReducedDiags.H"

#include <string>

/**
 * \brief This class mainly contains a function that computes the field momentum.
 */
class FieldMomentum : public ReducedDiags
{
public:

    /**
     * \brief Constructor
     *
     * \param[in] rd_name reduced diags names
     */
    FieldMomentum(std::string rd_name);

    /**
     * \brief This function computes the electromagnetic momentum,
     * obtained by integrating the electromagnetic momentum density g = eps0 * (E x B).
     *
     * \param[in] step current time step
     */
    virtual void ComputeDiags(int step) override final;
};

#endif