WarpX
Loading...
Searching...
No Matches
MagnetostaticSolver.H
Go to the documentation of this file.
1/* Copyright 2022 S. Eric Clark, LLNL
2 *
3 * This file is part of WarpX.
4 *
5 * License: BSD-3-Clause-LBNL
6 */
7#ifndef WARPX_MAGNETOSTATICSOLVER_H_
8#define WARPX_MAGNETOSTATICSOLVER_H_
9
11
12#include <AMReX_Array.H>
13#include <AMReX_MultiFab.H>
14#include <AMReX_MLMG.H>
15#include <AMReX_REAL.H>
16
18
24 public:
26 bool bcs_set = false;
27 std::array<std::array<bool, AMREX_SPACEDIM * 2>, 3> dirichlet_flag;
28 bool has_non_periodic = false;
29
31 };
32
38 private:
42
43 public:
45 ablastr::fields::MultiLevelVectorField const & grad_buf_e_stag,
46 ablastr::fields::MultiLevelVectorField const & grad_buf_b_stag)
47 : m_b_field(b_field),
48 m_grad_buf_e_stag(grad_buf_e_stag),
49 m_grad_buf_b_stag(grad_buf_b_stag)
50 {}
51
52 void operator() (amrex::Array<std::unique_ptr<amrex::MLMG>, 3> & mlmg, int lev);
53
54 // Function to perform interpolation from cell edges to cell faces
55 void doInterp (amrex::MultiFab & src, amrex::MultiFab & dst);
56 };
57} // namespace MagnetostaticSolver
58
59#endif //WARPX_MAGNETOSTATICSOLVER_H_
ablastr::fields::MultiLevelVectorField m_b_field
Definition MagnetostaticSolver.H:39
EBCalcBfromVectorPotentialPerLevel(ablastr::fields::MultiLevelVectorField const &b_field, ablastr::fields::MultiLevelVectorField const &grad_buf_e_stag, ablastr::fields::MultiLevelVectorField const &grad_buf_b_stag)
Definition MagnetostaticSolver.H:44
void doInterp(amrex::MultiFab &src, amrex::MultiFab &dst)
Definition MagnetostaticSolver.cpp:389
void operator()(amrex::Array< std::unique_ptr< amrex::MLMG >, 3 > &mlmg, int lev)
Definition MagnetostaticSolver.cpp:431
ablastr::fields::MultiLevelVectorField m_grad_buf_b_stag
Definition MagnetostaticSolver.H:41
ablastr::fields::MultiLevelVectorField m_grad_buf_e_stag
Definition MagnetostaticSolver.H:40
Definition MagnetostaticSolver.H:23
bool bcs_set
Definition MagnetostaticSolver.H:26
amrex::Array< amrex::Array< amrex::LinOpBCType, 3 >, 3 > hibc
Definition MagnetostaticSolver.H:25
void defineVectorPotentialBCs()
Definition MagnetostaticSolver.cpp:296
bool has_non_periodic
Definition MagnetostaticSolver.H:28
amrex::Array< amrex::Array< amrex::LinOpBCType, 3 >, 3 > lobc
Definition MagnetostaticSolver.H:25
std::array< std::array< bool, 3 *2 >, 3 > dirichlet_flag
Definition MagnetostaticSolver.H:27
Definition MagnetostaticSolver.H:17
amrex::Vector< VectorField > MultiLevelVectorField
Definition MultiFabRegister.H:208
std::array< T, N > Array