diff options
author | 2021-12-22 12:55:25 -0700 | |
---|---|---|
committer | 2021-12-22 19:55:25 +0000 | |
commit | f73b3cd49c430c59b6750d5e65dfd19dcf44c752 (patch) | |
tree | 2853a02755d260b690ba7373ab4ee0ff63a89de9 /Source/EmbeddedBoundary | |
parent | 011241af1c8feac1e1f8c726ac729a1216bd5d83 (diff) | |
download | WarpX-f73b3cd49c430c59b6750d5e65dfd19dcf44c752.tar.gz WarpX-f73b3cd49c430c59b6750d5e65dfd19dcf44c752.tar.zst WarpX-f73b3cd49c430c59b6750d5e65dfd19dcf44c752.zip |
Add embedded BC in RZ. (#2602)
* Start to add embedded BC in RZ.
* Add .
* Remove scaling
* Fix compilation error
* Update
* Can compile.
* Add call linop.setRZ(true).
* Remove lines 264 to 312 and 343 to 345.
* Add assert.
* Remove an assert.
* Add an automated test.
* Change to MLEBNodeFDLaplacian.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix compilation error
* Update the test selection
* Correct compilation error
* Move test to another worker
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add new required argument
* Update Examples/Tests/ElectrostaticSphereEB/inputs_rz
* Update Examples/Tests/ElectrostaticSphereEB/analysis_rz.py
* Update analysis script
Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Diffstat (limited to 'Source/EmbeddedBoundary')
-rw-r--r-- | Source/EmbeddedBoundary/WarpXFaceExtensions.cpp | 6 | ||||
-rw-r--r-- | Source/EmbeddedBoundary/WarpXInitEB.cpp | 14 |
2 files changed, 16 insertions, 4 deletions
diff --git a/Source/EmbeddedBoundary/WarpXFaceExtensions.cpp b/Source/EmbeddedBoundary/WarpXFaceExtensions.cpp index b52a392af..cde8d1dc2 100644 --- a/Source/EmbeddedBoundary/WarpXFaceExtensions.cpp +++ b/Source/EmbeddedBoundary/WarpXFaceExtensions.cpp @@ -141,6 +141,7 @@ amrex::Array1D<int, 0, 2> WarpX::CountExtFaces() { amrex::Array1D<int, 0, 2> sums{0, 0, 0}; #ifdef AMREX_USE_EB +#ifndef WARPX_DIM_RZ #ifdef WARPX_DIM_XZ // In 2D we change the extrema of the for loop so that we only have the case idim=1 @@ -167,6 +168,7 @@ WarpX::CountExtFaces() { amrex::ParallelDescriptor::ReduceIntSum(&(sums(0)), AMREX_SPACEDIM); #endif +#endif return sums; } @@ -369,6 +371,7 @@ ComputeNBorrowEightFacesExtension(const amrex::Dim3 cell, const amrex::Real S_ex void WarpX::ComputeOneWayExtensions() { #ifdef AMREX_USE_EB +#ifndef WARPX_DIM_RZ auto const eb_fact = fieldEBFactory(maxLevel()); auto const &cell_size = CellSize(maxLevel()); @@ -484,12 +487,14 @@ WarpX::ComputeOneWayExtensions() { } #endif +#endif } void WarpX::ComputeEightWaysExtensions() { #ifdef AMREX_USE_EB +#ifndef WARPX_DIM_RZ auto const &cell_size = CellSize(maxLevel()); const amrex::Real dx = cell_size[0]; @@ -640,6 +645,7 @@ WarpX::ComputeEightWaysExtensions() { } } #endif +#endif } diff --git a/Source/EmbeddedBoundary/WarpXInitEB.cpp b/Source/EmbeddedBoundary/WarpXInitEB.cpp index 1c1931837..8a62308ba 100644 --- a/Source/EmbeddedBoundary/WarpXInitEB.cpp +++ b/Source/EmbeddedBoundary/WarpXInitEB.cpp @@ -82,10 +82,6 @@ WarpX::InitEB () #ifdef AMREX_USE_EB BL_PROFILE("InitEB"); -#if !(defined(WARPX_DIM_3D) || defined(WARPX_DIM_XZ)) - amrex::Abort("InitEB: Embedded Boundaries are only implemented in 2D3V and 3D3V"); -#endif - amrex::ParmParse pp_warpx("warpx"); std::string impf; pp_warpx.query("eb_implicit_function", impf); @@ -117,6 +113,7 @@ WarpX::InitEB () void WarpX::ComputeEdgeLengths () { #ifdef AMREX_USE_EB +#ifndef WARPX_DIM_RZ BL_PROFILE("ComputeEdgeLengths"); auto const eb_fact = fieldEBFactory(maxLevel()); @@ -178,12 +175,14 @@ WarpX::ComputeEdgeLengths () { } } #endif +#endif } void WarpX::ComputeFaceAreas () { #ifdef AMREX_USE_EB +#ifndef WARPX_DIM_RZ BL_PROFILE("ComputeFaceAreas"); auto const eb_fact = fieldEBFactory(maxLevel()); @@ -239,12 +238,14 @@ WarpX::ComputeFaceAreas () { } } #endif +#endif } void WarpX::ScaleEdges () { #ifdef AMREX_USE_EB +#ifndef WARPX_DIM_RZ BL_PROFILE("ScaleEdges"); auto const &cell_size = CellSize(maxLevel()); @@ -269,11 +270,13 @@ WarpX::ScaleEdges () { } } #endif +#endif } void WarpX::ScaleAreas() { #ifdef AMREX_USE_EB +#ifndef WARPX_DIM_RZ BL_PROFILE("ScaleAreas"); auto const& cell_size = CellSize(maxLevel()); @@ -321,12 +324,14 @@ WarpX::ScaleAreas() { } } #endif +#endif } void WarpX::MarkCells(){ #ifdef AMREX_USE_EB +#ifndef WARPX_DIM_RZ auto const &cell_size = CellSize(maxLevel()); #ifdef WARPX_DIM_3D @@ -404,6 +409,7 @@ WarpX::MarkCells(){ } } #endif +#endif } |