core
Shared MPI block decomposition + asynchronous ghost-layer exchange (header-only C++20)
Loading...
Searching...
No Matches
peclet::core::amr::ScalarTransport< Dim, Bits > Class Template Reference

#include <scalar_transport.hpp>

Public Types

using Octree = BlockOctree< Dim, Bits >
 
using M = typename Octree::M
 
using Code = typename Octree::Code
 
using Coord = typename Octree::Coord
 

Public Member Functions

 ScalarTransport ()=default
 
 ScalarTransport (const Octree &t, const AmrGeometry< Dim > &geo)
 
void init (const Octree &t, const AmrGeometry< Dim > &geo)
 
Index numLeaves () const
 
Real cellWidth (Index i) const
 
Real cellVolume (Index i) const
 
double totalMass (const std::vector< double > &c) const
 Total scalar content sum_i V_i c_i (conserved by a divergence-free update).
 
template<class VelFn >
void step (const std::vector< double > &c, std::vector< double > &cOut, double dt, double D, VelFn &&vel) const
 One explicit Euler step: cOut = c + dt*(-div(u c) + D lap(c)).
 
template<class Fn >
void forEachFace (Index i, Fn &&fn) const
 Visit each (sub)face of leaf i.
 

Detailed Description

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
class peclet::core::amr::ScalarTransport< Dim, Bits >

Definition at line 35 of file scalar_transport.hpp.

Member Typedef Documentation

◆ Octree

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
using peclet::core::amr::ScalarTransport< Dim, Bits >::Octree = BlockOctree<Dim, Bits>

Definition at line 37 of file scalar_transport.hpp.

◆ M

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
using peclet::core::amr::ScalarTransport< Dim, Bits >::M = typename Octree::M

Definition at line 38 of file scalar_transport.hpp.

◆ Code

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
using peclet::core::amr::ScalarTransport< Dim, Bits >::Code = typename Octree::Code

Definition at line 39 of file scalar_transport.hpp.

◆ Coord

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
using peclet::core::amr::ScalarTransport< Dim, Bits >::Coord = typename Octree::Coord

Definition at line 40 of file scalar_transport.hpp.

Constructor & Destructor Documentation

◆ ScalarTransport() [1/2]

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
peclet::core::amr::ScalarTransport< Dim, Bits >::ScalarTransport ( )
default

◆ ScalarTransport() [2/2]

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
peclet::core::amr::ScalarTransport< Dim, Bits >::ScalarTransport ( const Octree t,
const AmrGeometry< Dim > &  geo 
)
inline

Member Function Documentation

◆ init()

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
void peclet::core::amr::ScalarTransport< Dim, Bits >::init ( const Octree t,
const AmrGeometry< Dim > &  geo 
)
inline

◆ numLeaves()

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
Index peclet::core::amr::ScalarTransport< Dim, Bits >::numLeaves ( ) const
inline

◆ cellWidth()

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
Real peclet::core::amr::ScalarTransport< Dim, Bits >::cellWidth ( Index  i) const
inline

◆ cellVolume()

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
Real peclet::core::amr::ScalarTransport< Dim, Bits >::cellVolume ( Index  i) const
inline

◆ totalMass()

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
double peclet::core::amr::ScalarTransport< Dim, Bits >::totalMass ( const std::vector< double > &  c) const
inline

Total scalar content sum_i V_i c_i (conserved by a divergence-free update).

Definition at line 62 of file scalar_transport.hpp.

References peclet::core::amr::ScalarTransport< Dim, Bits >::cellVolume(), and peclet::core::amr::ScalarTransport< Dim, Bits >::numLeaves().

◆ step()

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
template<class VelFn >
void peclet::core::amr::ScalarTransport< Dim, Bits >::step ( const std::vector< double > &  c,
std::vector< double > &  cOut,
double  dt,
double  D,
VelFn &&  vel 
) const
inline

One explicit Euler step: cOut = c + dt*(-div(u c) + D lap(c)).

vel(fc,axis) returns the axis-component of velocity at world face centre fc.

Definition at line 72 of file scalar_transport.hpp.

References peclet::core::amr::ScalarTransport< Dim, Bits >::cellVolume(), peclet::core::amr::ScalarTransport< Dim, Bits >::forEachFace(), and peclet::core::amr::ScalarTransport< Dim, Bits >::numLeaves().

◆ forEachFace()

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
template<class Fn >
void peclet::core::amr::ScalarTransport< Dim, Bits >::forEachFace ( Index  i,
Fn &&  fn 
) const
inline

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