aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceSolver.H
diff options
context:
space:
mode:
authorGravatar Revathi Jambunathan <41089244+RevathiJambunathan@users.noreply.github.com> 2020-05-29 10:53:33 -0700
committerGravatar GitHub <noreply@github.com> 2020-05-29 10:53:33 -0700
commit36c337d1dd00dc4945802a4a4da6e23aee86355e (patch)
treef206e889dfbd559cbff0aad1b037d84bc5c0ef3d /Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceSolver.H
parentb75932d3a1439f19d5b6b697c69fbe72cfb60044 (diff)
downloadWarpX-36c337d1dd00dc4945802a4a4da6e23aee86355e.tar.gz
WarpX-36c337d1dd00dc4945802a4a4da6e23aee86355e.tar.zst
WarpX-36c337d1dd00dc4945802a4a4da6e23aee86355e.zip
Macroscopic EvolveE with constant properties (#991)
* Adding macro-E Push and new file * Add macroEvolveE, call it, and include algo selection in utils * fix eol * Fixing bug in macroE for sigma method 1 * changing MacroEvolveE to MacroscopicEvolveE * add class for macroscopicproperties and an object in WarpX class * fix eol * adding templated ckc call with comment that EvolveE is same for yee and ckc * add header file pointing to ckc algorithm * adding obejct m_macroscopic_properties to access sigma,eps,mu * some cleaning * Adding comments * adding documentation * spelling wandroff to wendroff * fixing eol * eol * const in the right place. Thanks bot! * profiler for macroscopic evolveE * re-introduced deleted line when fixing conflict to declare templated EvolveBPMLCartesian function * fixing if-else statement for RZ in MAcroscopicEvolveE.cpp * adding suggestions and corrections made in PR review. * fixing grammar in docs * fix eol whitespace * fix typo
Diffstat (limited to 'Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceSolver.H')
-rw-r--r--Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceSolver.H27
1 files changed, 27 insertions, 0 deletions
diff --git a/Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceSolver.H b/Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceSolver.H
index e60ceed3e..31f8008bf 100644
--- a/Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceSolver.H
+++ b/Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceSolver.H
@@ -9,6 +9,7 @@
#define WARPX_FINITE_DIFFERENCE_SOLVER_H_
#include <AMReX_MultiFab.H>
+#include "MacroscopicProperties/MacroscopicProperties.H"
#include "BoundaryConditions/PML.H"
/**
@@ -54,6 +55,24 @@ class FiniteDifferenceSolver
void ComputeDivE ( const std::array<std::unique_ptr<amrex::MultiFab>,3>& Efield,
amrex::MultiFab& divE );
+ /**
+ * \brief Macroscopic E-update for non-vacuum medium using the user-selected
+ * finite-difference algorithm and macroscopic sigma-method defined in
+ * WarpXAlgorithmSelection.H
+ *
+ * \param[out] Efield vector of electric field MultiFabs updated at a given level
+ * \param[in] Bfield vector of magnetic field MultiFabs at a given level
+ * \param[in] Jfield vector of current density MultiFabs at a given level
+ * \param[in] dt timestep of the simulation
+ * \param[in] macroscopic_properties contains user-defined properties of the medium.
+ */
+
+ void MacroscopicEvolveE ( std::array< std::unique_ptr<amrex::MultiFab>, 3>& Efield,
+ std::array< std::unique_ptr<amrex::MultiFab>, 3> const& Bfield,
+ std::array< std::unique_ptr<amrex::MultiFab>, 3 > const& Jfield,
+ amrex::Real const dt,
+ std::unique_ptr<MacroscopicProperties> const& macroscopic_properties);
+
void EvolveBPML ( std::array< amrex::MultiFab*, 3 > Bfield,
std::array< amrex::MultiFab*, 3 > const Efield,
amrex::Real const dt );
@@ -146,6 +165,14 @@ class FiniteDifferenceSolver
amrex::MultiFab& divE );
template< typename T_Algo >
+ void MacroscopicEvolveECartesian (
+ std::array< std::unique_ptr< amrex::MultiFab>, 3>& Efield,
+ std::array< std::unique_ptr< amrex::MultiFab>, 3> const &Bfield,
+ std::array< std::unique_ptr< amrex::MultiFab>, 3> const& Jfield,
+ amrex::Real const dt,
+ std::unique_ptr<MacroscopicProperties> const& macroscopic_properties);
+
+ template< typename T_Algo >
void EvolveBPMLCartesian (
std::array< amrex::MultiFab*, 3 > Bfield,
std::array< amrex::MultiFab*, 3 > const Efield,