The SKIRT project
advanced radiative transfer for astrophysics
Public Member Functions | Protected Member Functions | List of all members
DensityInCellInterface Class Referenceabstract

#include <DensityInCellInterface.hpp>

Inheritance diagram for DensityInCellInterface:
Inheritance graph
[legend]

Public Member Functions

virtual ~DensityInCellInterface ()
 
virtual double numberDensity (int h, int m) const =0
 

Protected Member Functions

 DensityInCellInterface ()
 

Detailed Description

DensityInCellInterface is a pure interface. It is implemented by spatial grids that offer a fast way to obtain the density of a grid cell, given the cell index m, for each medium component h. If the MediumSystem class detects a spatial grid that implements this interface, it will call the numberDensity() function in this interface rather than sampling the density distribution in a number of random points. In some special cases, for example when the grid is lined up with some cell structure in the medium geometry, this can dramatically enhance performance.

Constructor & Destructor Documentation

◆ DensityInCellInterface()

DensityInCellInterface::DensityInCellInterface ( )
inlineprotected

The empty constructor for the interface.

◆ ~DensityInCellInterface()

virtual DensityInCellInterface::~DensityInCellInterface ( )
inlinevirtual

The empty destructor for the interface.

Member Function Documentation

◆ numberDensity()

virtual double DensityInCellInterface::numberDensity ( int  h,
int  m 
) const
pure virtual

This function returns the number density for medium component h in the spatial grid cell with index m.

Implemented in AdaptiveMeshSpatialGrid, and VoronoiMeshSpatialGrid.


The documentation for this class was generated from the following file: