20 #include <ParticleData.H>
29 #include <CD_NamespaceHeader.H>
149 const Real a_dt)
const noexcept;
160 const size_t a_maxPhotonsPerCell)
const noexcept;
177 const size_t a_maxPhotonsPerCell)
const noexcept;
205 template <
class P, const Real& (P::*particleScalarField)() const>
251 preRegrid(
const int a_base,
const int a_oldFinestLevel)
override;
266 regrid(
const int a_lmin,
const int a_oldFinestLevel,
const int a_newFinestLevel)
override;
354 const std::string a_outputRealm,
355 const int a_level)
const noexcept
override;
364 writeCheckpointLevel(HDF5Handle& a_handle,
const int a_level)
const override;
374 readCheckpointLevel(HDF5Handle& a_handle,
const int a_level)
override;
381 virtual Vector<std::string>
455 computeLoads(Vector<
long long>& a_loads, const DisjointBoxLayout& a_dbl, const
int a_level) const noexcept override;
552 int m_numSamplingPackets;
642 drawPhotons(
const Real a_source,
const Real a_volume,
const Real a_dt)
const noexcept;
650 domainBcMap(
const int a_dir,
const Side::LoHiSide a_side);
666 template <
class P, const Real& (P::*particleScalarField)() const>
764 const int a_level)
const noexcept;
767 #include <CD_NamespaceFooter.H>
CoarseFineDeposition
Coarse-fine deposition types (see CD_EBAMRParticleMesh for how these are handled).
Definition: CD_CoarseFineDeposition.H:26
DepositionType
Deposition types.
Definition: CD_DepositionType.H:23
Declaration of a class for handling particle-mesh interpolation and deposition.
Implementation of CD_McPhoto.H.
Declaration of a class for holding particles on an AMR hierarchy.
Vector< RefCountedPtr< ParticleData< P > >> AMRParticles
Alias for ParticleData on each AMR level.
Definition: CD_ParticleContainer.H:34
Declaration of a photon class for particle methods.
Declaration of a computational point particle.
Abstract parent class for various radiative transfer solvers.
Radiative tranfer equation solver using Monte-Carlo simulation.
Definition: CD_McPhoto.H:39
void depositNonConservative(EBAMRIVData &a_depositionNC, const EBAMRCellData &a_depositionKappaC) const noexcept
Make the "non-conservative" kappa deposition.
Definition: CD_McPhoto.cpp:1297
bool m_plotDomainPhotons
Check if m_ebPhotons should be plotted.
Definition: CD_McPhoto.H:537
ParticleContainer< Photon > m_domainPhotons
This is a particle container for Photons that crossed boundaries. It is filled during the advance ste...
Definition: CD_McPhoto.H:627
virtual int getNumberOfPlotVariables() const override
Get number of output variables.
Definition: CD_McPhoto.cpp:842
bool m_transparentEB
Turn on/off transparent boundaries.
Definition: CD_McPhoto.H:492
ParticleContainer< Photon > m_sourcePhotons
This is a particle container that can be used to add Photons directly.
Definition: CD_McPhoto.H:632
virtual void computeFlux(EBAMRCellData &a_flux, const EBAMRCellData &a_phi) override
Compute the flux.
Definition: CD_McPhoto.cpp:734
void parseInstantaneous()
Parse whether instantaneous propagation or not.
Definition: CD_McPhoto.cpp:239
void parseIntersectionEB()
Parse EB intersection algorithm.
Definition: CD_McPhoto.cpp:333
virtual void preRegrid(const int a_base, const int a_oldFinestLevel) override
preRegrid operations
Definition: CD_McPhoto.cpp:548
SourceType m_sourceType
Source type.
Definition: CD_McPhoto.H:577
virtual void regrid(const int a_lmin, const int a_oldFinestLevel, const int a_newFinestLevel) override
Regrid function for this class.
Definition: CD_McPhoto.cpp:580
size_t drawPhotons(const Real a_source, const Real a_volume, const Real a_dt) const noexcept
Draw photons in a cell and volume.
Definition: CD_McPhoto.cpp:977
void depositKappaConservative(EBAMRCellData &a_phi, ParticleContainer< P > &a_particles, const DepositionType a_deposition, const CoarseFineDeposition a_coarseFineDeposition) const noexcept
This computes the "conservative" deposition, multiplied by kappa.
Definition: CD_McPhotoImplem.H:67
bool m_blendConservation
Flag for blending the deposition clouds with the nonconservative divergence.
Definition: CD_McPhoto.H:502
virtual void computeNumPhysicalPhotons(EBAMRCellData &a_numPhysPhotonsTotal, EBAMRCellData &a_numPhysPhotonsPerPacket, const EBAMRCellData &a_source, const Real a_dt) const noexcept
Compute the number of physical photons in each grid cell.
Definition: CD_McPhoto.cpp:892
virtual ParticleContainer< Photon > & getDomainPhotons()
Get domain photons, i.e. photons absorbed on domain edges/faces.
Definition: CD_McPhoto.cpp:1926
WhichContainer
Enum class for identifying various containers. Only used for interface reasons.
Definition: CD_McPhoto.H:45
virtual void computeDensity(EBAMRCellData &a_isotropic, const EBAMRCellData &a_phi) override
Compute isotropic radiative density from mesh solution.
Definition: CD_McPhoto.cpp:748
virtual ParticleContainer< Photon > & getEbPhotons()
Get eb Photons, i.e. photons absorbed on the EB.
Definition: CD_McPhoto.cpp:1915
virtual ~McPhoto()
Destructor.
Definition: CD_McPhoto.cpp:43
virtual void dirtySamplePhotons(ParticleContainer< PointParticle > &a_photons, EBAMRCellData &a_phi, const EBAMRCellData &a_numPhysicalPhotons, const size_t a_maxPhotonsPerCell) const noexcept
Dirty-sampling method for photons.
Definition: CD_McPhoto.cpp:1133
bool m_depositNumber
If true, the NUMBER of of Photons will be deposited in each cell.
Definition: CD_McPhoto.H:507
DepositionType m_deposition
Deposition type.
Definition: CD_McPhoto.H:587
size_t m_maxPhotonsGeneratedPerCell
Number of computational photons generated per cell.
Definition: CD_McPhoto.H:547
bool m_dirtySampling
Dirty sampling or not.
Definition: CD_McPhoto.H:542
void parseTransparentBoundaries()
Turn on/off transparent boundaries.
Definition: CD_McPhoto.cpp:198
void parseDirtySampling()
Parse dirty sampling for photons.
Definition: CD_McPhoto.cpp:211
virtual void computeBoundaryFlux(EBAMRIVData &a_ebFlux, const EBAMRCellData &a_phi) override
Compute the boundary flux.
Definition: CD_McPhoto.cpp:712
bool m_instantaneous
Instantaneous transport or not.
Definition: CD_McPhoto.H:497
void parseSourceType()
Parse source term type.
Definition: CD_McPhoto.cpp:303
ParticleContainer< Photon > m_bulkPhotons
Photons absorbed in the volume.
Definition: CD_McPhoto.H:617
void parsePhotoGeneration()
Parse photogeneration type.
Definition: CD_McPhoto.cpp:279
Real m_bisectStep
Bisection step for when we use the bisection intersection algorithm.
Definition: CD_McPhoto.H:567
virtual void deallocate() override
Deallocate internal storage.
Definition: CD_McPhoto.cpp:565
void parsePseudoPhotons()
Parse pseudophotons, i.e. parse how many photons can be generated per cell.
Definition: CD_McPhoto.cpp:252
IntersectionEB
An enum for switching between various types of EB intersection algorithms when intersecting photons w...
Definition: CD_McPhoto.H:484
virtual void computeDomainFlux(EBAMRIFData &a_domainFlux, const EBAMRCellData &a_phi) override
Compute the domain flux.
Definition: CD_McPhoto.cpp:723
virtual void advancePhotonsTransient(ParticleContainer< Photon > &a_bulkPhotons, ParticleContainer< Photon > &a_ebPhotons, ParticleContainer< Photon > &a_domainPhotons, ParticleContainer< Photon > &a_photons, const Real a_dt)
Move photons and absorb them on various objects.
Definition: CD_McPhoto.cpp:1568
McPhoto(const McPhoto &a_other)
Disallowed copy constructor.
EBAMRIVData m_massDiff
Scratch storage for holding the mass difference when using hybrid deposition.
Definition: CD_McPhoto.H:607
bool m_plotPhotons
Check if m_photons should be plotted.
Definition: CD_McPhoto.H:517
virtual void remap()
Remap computational particles. This remaps m_photons.
Definition: CD_McPhoto.cpp:1735
virtual void allocate() override
Allocate internal storage.
Definition: CD_McPhoto.cpp:525
bool m_plotNumbers
Switch for plotting numbers or densities.
Definition: CD_McPhoto.H:512
McPhoto()
Constructor.
Definition: CD_McPhoto.cpp:32
virtual void computeLoads(Vector< long long > &a_loads, const DisjointBoxLayout &a_dbl, const int a_level) const noexcept override
Get computational loads for a specific grid level. This computes the number of photons in the bulk da...
Definition: CD_McPhoto.cpp:1970
bool m_plotEBPhotons
Check if m_ebPhotons should be plotted.
Definition: CD_McPhoto.H:532
virtual Vector< std::string > getPlotVariableNames() const override
Write checkpoint data into handle.
Definition: CD_McPhoto.cpp:807
virtual ParticleContainer< Photon > & getPhotons()
Get m_photons.
Definition: CD_McPhoto.cpp:1893
int domainBcMap(const int a_dir, const Side::LoHiSide a_side)
Mapping function for domain boundary conditions.
Definition: CD_McPhoto.cpp:877
virtual ParticleContainer< Photon > & getSourcePhotons()
Get source photons.
Definition: CD_McPhoto.cpp:1937
virtual ParticleContainer< Photon > & getBulkPhotons()
Get bulk photons, i.e. photons absorbed on the mesh.
Definition: CD_McPhoto.cpp:1904
void depositHybrid(EBAMRCellData &a_depositionH, EBAMRIVData &a_massDifference, const EBAMRIVData &a_depositionNC) const noexcept
Make the hybrid deposition. Also compute the mass difference.
Definition: CD_McPhoto.cpp:1316
virtual void clear()
Clear data holder.
Definition: CD_McPhoto.cpp:490
virtual void parseOptions() override
Parse class options.
Definition: CD_McPhoto.cpp:153
ParticleContainer< Photon > m_ebPhotons
This is a particle container for Photons that crossed EBs. It is filled during the advance step.
Definition: CD_McPhoto.H:622
virtual void parseRuntimeOptions() override
Parse runtime options.
Definition: CD_McPhoto.cpp:177
CoarseFineDeposition m_coarseFineDeposition
Coarse-fine deposition strategy.
Definition: CD_McPhoto.H:592
void parseDivergenceComputation()
Parse the divergence computation, i.e. if we blend with non-conservative divergence or not.
Definition: CD_McPhoto.cpp:226
PhotonGeneration
Enum for interpreting how photons are generated when using fluid codes.
Definition: CD_McPhoto.H:462
virtual void sortPhotonsByPatch(const WhichContainer &a_which)
Sort container by patch.
Definition: CD_McPhoto.cpp:647
SourceType
Enum for adding flexibility in what the fluid source term contains.
Definition: CD_McPhoto.H:471
ParticleContainer< Photon > m_photons
All particles.
Definition: CD_McPhoto.H:612
virtual void writePlotFile() override
Write plot file.
Definition: CD_McPhoto.cpp:760
virtual void depositPhotons()
Deposit photons on the mesh.
Definition: CD_McPhoto.cpp:1286
void parseDeposition()
Parse deposition method.
Definition: CD_McPhoto.cpp:359
McPhoto & operator=(const McPhoto &&a_other)
Disallowed move assignement operator.
McPhoto(const McPhoto &&a_other)
Disallowed move constructor.
virtual void advancePhotonsInstantaneous(ParticleContainer< Photon > &a_bulkPhotons, ParticleContainer< Photon > &a_ebPhotons, ParticleContainer< Photon > &a_domainPhotons, ParticleContainer< Photon > &a_photons)
Move photons and absorb them on various objects.
Definition: CD_McPhoto.cpp:1409
PhotonGeneration m_photoGenerationMethod
Photon generation type.
Definition: CD_McPhoto.H:572
virtual void writePlotData(LevelData< EBCellFAB > &a_output, int &a_icomp, const std::string a_outputRealm, const int a_level) const noexcept override
Write plot data.
Definition: CD_McPhoto.cpp:1774
McPhoto & operator=(const McPhoto &a_other)
Disallowed assignment operator.
Real randomExponential(const Real a_mean) const noexcept
Random exponential trial.
Definition: CD_McPhoto.cpp:885
void parsePlotVariables()
Parse plot variables.
Definition: CD_McPhoto.cpp:402
int m_seed
RNG seed.
Definition: CD_McPhoto.H:557
virtual int getMaxPhotonsPerCell() const noexcept
Get maximum number of photons generated per cell.
Definition: CD_McPhoto.cpp:1948
virtual void sortPhotonsByCell(const WhichContainer &a_which)
Sort container by cell.
Definition: CD_McPhoto.cpp:605
virtual int getNumSamplingPackets() const noexcept
Get maximum number of photons generated per cell.
Definition: CD_McPhoto.cpp:1959
virtual bool advance(const Real a_dt, EBAMRCellData &a_phi, const EBAMRCellData &a_source, const bool a_zeroPhi=false) override
Advance RTE and deposit photon particles on the mesh.
Definition: CD_McPhoto.cpp:47
virtual int countPhotons(const AMRParticles< Photon > &a_photons) const
Count number of photons in particle list.
Definition: CD_McPhoto.cpp:1757
EBAMRIVData m_depositionNC
Scratch storage for holding the non-conservative deposition.
Definition: CD_McPhoto.H:602
virtual void registerOperators() override
Register operators that this solver needs.
Definition: CD_McPhoto.cpp:689
virtual void generateComputationalPhotons(ParticleContainer< Photon > &a_photons, const EBAMRCellData &a_numPhysicalPhotons, const size_t a_maxPhotonsPerCell) const noexcept
Generate computational photons.
Definition: CD_McPhoto.cpp:1022
EBAMRCellData m_scratch
Coarse data for interpolation of deposition clouds.
Definition: CD_McPhoto.H:597
virtual bool isInstantaneous()
Instantaneous solver or not.
Definition: CD_McPhoto.cpp:147
bool m_plotSourcePhotons
Check if source_bulkPhotons should be plotted.
Definition: CD_McPhoto.H:527
bool m_plotBulkPhotons
Check if m_bulkPhotons should be plotted.
Definition: CD_McPhoto.H:522
virtual void depositPhotonsNGP(LevelData< EBCellFAB > &a_output, const ParticleContainer< Photon > &a_particles, const int a_level) const noexcept
Do an NGP deposit on a specific grid level. Used for IO.
Definition: CD_McPhoto.cpp:1365
int m_haloBuffer
Halo size for particles.
Definition: CD_McPhoto.H:562
Abstract RTE solver class for doing various kinds of radiative transfer equations....
Definition: CD_RtSolver.H:30