aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceSolver.H
blob: c1fdef5dd92276a45d128c445d50d58e3104fbf3 (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
#ifndef WARPX_FINITE_DIFFERENCE_SOLVER_H_
#define WARPX_FINITE_DIFFERENCE_SOLVER_H_

/**
 * \brief Top-level class for the electromagnetic finite-difference solver
 *
 * TODO
 */
class FiniteDifferenceSolver
{
    public:

        using VectorField = std::array< std::unique_ptr<amrex::MultiFab>, 3 >;
        using ConstVectorField = std::array< std::unique_ptr<amrex::MultiFab const>, 3 >;

        // Constructor
        void FiniteDifferenceSolver( std::array<Real,3> dx );

        void EvolveB( VectorField Bfield,
                    ConstVectorField Efield,
                    amrex::Real dt ) const;

        };

    private:

        int fdtd_algo;

        amrex::Gpu::ManagedVector<amrex::Real> stencil_coefs_x;
        amrex::Gpu::ManagedVector<amrex::Real> stencil_coefs_y;
        amrex::Gpu::ManagedVector<amrex::Real> stencil_coefs_z;

        template< typename fdtd_algo >
        void EvolveB

};

#endif // WARPX_FINITE_DIFFERENCE_SOLVER_H_