/* Copyright 2019 Remi Lehe, Edoardo Zoni * * This file is part of WarpX. * * License: BSD-3-Clause-LBNL */ #ifndef WARPX_SPECTRAL_BASE_ALGORITHM_H_ #define WARPX_SPECTRAL_BASE_ALGORITHM_H_ #include "FieldSolver/SpectralSolver/SpectralKSpace.H" #include "Utils/WarpX_Complex.H" #include "FieldSolver/SpectralSolver/SpectralFieldData_fwd.H" #include "FieldSolver/SpectralSolver/SpectralFieldData.H" #include #include #include #include #include #include #include #if WARPX_USE_PSATD /* \brief Class that updates the field in spectral space * and stores the coefficients of the corresponding update equation. * * `SpectralBaseAlgorithm` is only a base class and cannot be used directly. * Instead use its subclasses, which implement the specific field update * equations for a given spectral algorithm. */ class SpectralBaseAlgorithm { public: // Virtual member function ; meant to be overridden in subclasses virtual void pushSpectralFields(SpectralFieldData& f) const = 0; // The destructor should also be a virtual function, so that // a pointer to subclass of `SpectraBaseAlgorithm` actually // calls the subclass's destructor. virtual ~SpectralBaseAlgorithm() {} /** * \brief Virtual function for current correction in Fourier space * ( Vay et al, 2013). * This virtual function is pure and must be defined in derived classes. * * \param[in,out] field_data All fields in Fourier space * \param[in,out] current Array of unique pointers to \c MultiFab storing * the three components of the current density * \param[in] rho Unique pointer to \c MultiFab storing the charge density */ virtual void CurrentCorrection (const int lev, SpectralFieldData& field_data, std::array,3>& current, const std::unique_ptr& rho) = 0; /** * \brief Virtual function for Vay current deposition in Fourier space * ( Vay et al, 2013). * This virtual function is pure and must be defined in derived classes. * * \param[in,out] field_data All fields in Fourier space * \param[in,out] current Array of unique pointers to \c MultiFab storing * the three components of the current density */ virtual void VayDeposition (const int lev, SpectralFieldData& field_data, std::array,3>& current) = 0; /** * \brief Compute spectral divergence of E */ void ComputeSpectralDivE ( const int lev, SpectralFieldData& field_data, const std::array,3>& Efield, amrex::MultiFab& divE ); protected: // Meant to be used in the subclasses amrex::IntVect m_fill_guards; using SpectralRealCoefficients = \ amrex::FabArray< amrex::BaseFab >; using SpectralComplexCoefficients = \ amrex::FabArray< amrex::BaseFab >; /** * \brief Constructor */ SpectralBaseAlgorithm(const SpectralKSpace& spectral_kspace, const amrex::DistributionMapping& dm, const SpectralFieldIndex& spectral_index, const int norder_x, const int norder_y, const int norder_z, const bool nodal, const amrex::IntVect& fill_guards); SpectralFieldIndex m_spectral_index; // Modified finite-order vectors KVectorComponent modified_kx_vec; #if (AMREX_SPACEDIM==3) KVectorComponent modified_ky_vec; #endif KVectorComponent modified_kz_vec; }; #endif // WARPX_USE_PSATD #endif // WARPX_SPECTRAL_BASE_ALGORITHM_H_ les/minimal'>examples/minimal Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-11-27Remove support for simple objects in endpoints (#9181)Gravatar Bjorn Lu 56-529/+206
* Deprecate simple object from endpoints * Update changeset * Add missing Response return Co-authored-by: Happydev <81974850+MoustaphaDev@users.noreply.github.com> * Update .changeset/clever-beds-notice.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> --------- Co-authored-by: Happydev <81974850+MoustaphaDev@users.noreply.github.com> Co-authored-by: Matthew Phillips <matthew@skypack.dev> Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-11-28Remove shiki lang path property support (#9196)Gravatar Bjorn Lu 7-427/+22
2023-11-28Remove deprecated features from Astro 3.0 (#9168)Gravatar Bjorn Lu 47-398/+95
2023-11-28Remove deprecated markdown-remark APIs (#9182)Gravatar Bjorn Lu 4-59/+7
2023-11-27[ci] release (#9180)astro@3.6.1Gravatar Houston (Bot) 32-65/+63
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-24Remove vercel deprecated analytics option (#9184)Gravatar Bjorn Lu 3-30/+12
2023-11-24[ci] formatGravatar Guspan Tanadi 1-2/+1
2023-11-24style: highlight markdown Tip Note section CONTRIBUTING (#9123)Gravatar Guspan Tanadi 1-5/+7
2023-11-23fix scroll restoration issue on webKit browsers (#9186)Gravatar Martin Trapp 2-1/+7
* fix scroll restoration issue on webKit browsers * add changeset * Update .changeset/shaggy-socks-glow.md * Update .changeset/shaggy-socks-glow.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> --------- Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-11-23fix(middleware): rename internal middleware id (#9173)Gravatar Arsh 2-1/+6
* rename internal middleware id * add changeset
2023-11-23fix: Changelog formatting for 3.6.0 View Transition events (#9176)Gravatar Martin Trapp 1-3/+3
Co-authored-by: Eva Decker <itsevadecker@gmail.com>
2023-11-22[ci] formatGravatar Eva Decker 1-3/+3
2023-11-22Fix View Transitions code block formatting (#9174)Gravatar Eva Decker 1-3/+3
2023-11-22Rename entryPoint to entrypoint (#9161)Gravatar Bjorn Lu 14-26/+38
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-11-22Fix esbuild warning for local dev (#9160)Gravatar Bjorn Lu 1-1/+1
2023-11-22[ci] release (#9165)astro@3.6.0Gravatar Houston (Bot) 34-90/+83
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>