aboutsummaryrefslogtreecommitdiff
path: root/Source/BoundaryConditions/WarpXFieldBoundaries.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/BoundaryConditions/WarpXFieldBoundaries.cpp')
-rw-r--r--Source/BoundaryConditions/WarpXFieldBoundaries.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/Source/BoundaryConditions/WarpXFieldBoundaries.cpp b/Source/BoundaryConditions/WarpXFieldBoundaries.cpp
new file mode 100644
index 000000000..7e99dbc8e
--- /dev/null
+++ b/Source/BoundaryConditions/WarpXFieldBoundaries.cpp
@@ -0,0 +1,29 @@
+#include "WarpX.H"
+#include "WarpX_PEC.H"
+#include <AMReX.H>
+#include <AMReX_Vector.H>
+#include <AMReX_MultiFab.H>
+using namespace amrex::literals;
+
+void WarpX::ApplyEfieldBoundary(const int lev, PatchType patch_type)
+{
+ if (PEC::isAnyBoundaryPEC()) {
+ if (patch_type == PatchType::fine) {
+ PEC::ApplyPECtoEfield( Efield_fp[lev], lev, patch_type);
+ } else {
+ PEC::ApplyPECtoEfield( Efield_cp[lev], lev, patch_type);
+ }
+ }
+}
+
+void WarpX::ApplyBfieldBoundary (const int lev, PatchType patch_type)
+{
+ if (PEC::isAnyBoundaryPEC()) {
+ if (patch_type == PatchType::fine) {
+ PEC::ApplyPECtoBfield( Bfield_fp[lev], lev, patch_type);
+ } else {
+ PEC::ApplyPECtoBfield( Bfield_cp[lev], lev, patch_type);
+ }
+ }
+}
+