version 3.11-dev
Loading...
Searching...
No Matches
Dumux::Experimental::PointSources< Context, Function > Class Template Reference

Combines a point source map with a user-provided evaluation function. More...

#include <dumux/common/pointsources.hh>

Description

template<class Context, class Function>
class Dumux::Experimental::PointSources< Context, Function >
Template Parameters
Contextthe point source context type (e.g. PointSourceContext)
Functioncallable with signature Values(const ElementDiscretization&, const ElementVariables&, const ScvPointSourceContext<Context>&)

Public Types

using MapType = std::map<std::pair<std::size_t, std::size_t>, std::vector<ScvContext>>

Public Member Functions

 PointSources ()=default
 PointSources (MapType map, Function f)
bool empty () const
 Returns whether no point sources have been registered.
template<class ElementDiscretization>
std::span< const ScvContext > contexts (const ElementDiscretization &elemDisc, const typename ElementDiscretization::SubControlVolume &scv) const
 Return the context range of a sub-control volume.
template<class ElementDiscretization>
auto contexts (const ElementDiscretization &elemDisc, const typename ElementDiscretization::Element &element) const
 Return the context range of the whole element.
template<class ElementDiscretization, class ElementVariables>
auto eval (const ElementDiscretization &elemDisc, const ElementVariables &elemVars, const ScvContext &context) const
 Evaluate the source for a given context.

Member Typedef Documentation

◆ MapType

template<class Context, class Function>
using Dumux::Experimental::PointSources< Context, Function >::MapType = std::map<std::pair<std::size_t, std::size_t>, std::vector<ScvContext>>

Constructor & Destructor Documentation

◆ PointSources() [1/2]

template<class Context, class Function>
Dumux::Experimental::PointSources< Context, Function >::PointSources ( )
default

◆ PointSources() [2/2]

template<class Context, class Function>
Dumux::Experimental::PointSources< Context, Function >::PointSources ( MapType map,
Function f )
inline

Member Function Documentation

◆ contexts() [1/2]

template<class Context, class Function>
template<class ElementDiscretization>
auto Dumux::Experimental::PointSources< Context, Function >::contexts ( const ElementDiscretization & elemDisc,
const typename ElementDiscretization::Element & element ) const
inline

◆ contexts() [2/2]

template<class Context, class Function>
template<class ElementDiscretization>
std::span< const ScvContext > Dumux::Experimental::PointSources< Context, Function >::contexts ( const ElementDiscretization & elemDisc,
const typename ElementDiscretization::SubControlVolume & scv ) const
inline

◆ empty()

template<class Context, class Function>
bool Dumux::Experimental::PointSources< Context, Function >::empty ( ) const
inline

◆ eval()

template<class Context, class Function>
template<class ElementDiscretization, class ElementVariables>
auto Dumux::Experimental::PointSources< Context, Function >::eval ( const ElementDiscretization & elemDisc,
const ElementVariables & elemVars,
const ScvContext & context ) const
inline

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