version 3.10-dev
Dumux::IdPointSource< GlobalPosition, SourceValues, I > Class Template Reference

A point source class with an identifier to attach data. More...

#include <dumux/common/pointsource.hh>

Inheritance diagram for Dumux::IdPointSource< GlobalPosition, SourceValues, I >:

Description

template<class GlobalPosition, class SourceValues, class I>
class Dumux::IdPointSource< GlobalPosition, SourceValues, I >
Template Parameters
GlobalPositionthe position type
SourceValuesthe a vector type storing the source for all equations
Ithe ID type

Public Types

using IdType = I
 export the id type More...
 
using GlobalPosition = GlobalPosition
 Export the position type. More...
 
using Values = SourceValues
 Export the value type. More...
 

Public Member Functions

 IdPointSource (GlobalPosition pos, SourceValues values, IdType id)
 Constructor for constant point sources. More...
 
 IdPointSource (GlobalPosition pos, IdType id)
 Constructor for sol dependent point sources, when there is no. More...
 
IdType id () const
 return the sources identifier More...
 
IdPointSourceoperator= (const SourceValues &values)
 Convenience = operator overload modifying only the values. More...
 
IdPointSourceoperator= (Scalar s)
 Convenience = operator overload modifying only the values. More...
 
PointSourceoperator+= (Scalar s)
 Convenience += operator overload modifying only the values. More...
 
PointSourceoperator-= (Scalar s)
 Convenience -= operator overload modifying only the values. More...
 
PointSourceoperator*= (Scalar s)
 Convenience *= operator overload modifying only the values. More...
 
PointSourceoperator/= (Scalar s)
 Convenience /= operator overload modifying only the values. More...
 
Values values () const
 return the source values More...
 
const GlobalPositionposition () const
 return the source position More...
 
void update (const Problem &problem, const typename FVElementGeometry::GridGeometry::GridView::template Codim< 0 >::Entity &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const typename FVElementGeometry::SubControlVolume &scv)
 an update function called before adding the value More...
 
void setEmbeddings (std::size_t embeddings)
 set the number of embeddings for this point source More...
 
std::size_t embeddings () const
 get the number of embeddings for this point source More...
 

Protected Attributes

Values values_
 value of the point source for each equation More...
 

Member Typedef Documentation

◆ GlobalPosition

using Dumux::PointSource< GlobalPosition , SourceValues >::GlobalPosition = GlobalPosition
inherited

◆ IdType

template<class GlobalPosition , class SourceValues , class I >
using Dumux::IdPointSource< GlobalPosition, SourceValues, I >::IdType = I

◆ Values

using Dumux::PointSource< GlobalPosition , SourceValues >::Values = SourceValues
inherited

Constructor & Destructor Documentation

◆ IdPointSource() [1/2]

template<class GlobalPosition , class SourceValues , class I >
Dumux::IdPointSource< GlobalPosition, SourceValues, I >::IdPointSource ( GlobalPosition  pos,
SourceValues  values,
IdType  id 
)
inline

◆ IdPointSource() [2/2]

template<class GlobalPosition , class SourceValues , class I >
Dumux::IdPointSource< GlobalPosition, SourceValues, I >::IdPointSource ( GlobalPosition  pos,
IdType  id 
)
inline

Member Function Documentation

◆ embeddings()

std::size_t Dumux::PointSource< GlobalPosition , SourceValues >::embeddings ( ) const
inlineinherited
Note
A point source might be located on the intersection between several scvs. If so, there are point sources for every neighboring scv with the same position. embeddings returns the number of neighboring scvs. Example: If I want to inject 1kg/s at a location that is on the inner face of an scv the point source exists in both scvs. Both have a value of 1kg/s. We then divide the value by the number of embeddings to not inject 2kg/s but 1kg/s.
This division is done in the problem.scvPointSources() if this behaviour is not explicitly changed by e.g. overloading this function in the problem implementation.

◆ id()

template<class GlobalPosition , class SourceValues , class I >
IdType Dumux::IdPointSource< GlobalPosition, SourceValues, I >::id ( ) const
inline

◆ operator*=()

PointSource & Dumux::PointSource< GlobalPosition , SourceValues >::operator*= ( Scalar  s)
inlineinherited

◆ operator+=()

PointSource & Dumux::PointSource< GlobalPosition , SourceValues >::operator+= ( Scalar  s)
inlineinherited

◆ operator-=()

PointSource & Dumux::PointSource< GlobalPosition , SourceValues >::operator-= ( Scalar  s)
inlineinherited

◆ operator/=()

PointSource & Dumux::PointSource< GlobalPosition , SourceValues >::operator/= ( Scalar  s)
inlineinherited

◆ operator=() [1/2]

template<class GlobalPosition , class SourceValues , class I >
IdPointSource & Dumux::IdPointSource< GlobalPosition, SourceValues, I >::operator= ( const SourceValues &  values)
inline

◆ operator=() [2/2]

template<class GlobalPosition , class SourceValues , class I >
IdPointSource & Dumux::IdPointSource< GlobalPosition, SourceValues, I >::operator= ( Scalar  s)
inline

◆ position()

const GlobalPosition & Dumux::PointSource< GlobalPosition , SourceValues >::position ( ) const
inlineinherited

◆ setEmbeddings()

void Dumux::PointSource< GlobalPosition , SourceValues >::setEmbeddings ( std::size_t  embeddings)
inlineinherited

◆ update()

void Dumux::PointSource< GlobalPosition , SourceValues >::update ( const Problem &  problem,
const typename FVElementGeometry::GridGeometry::GridView::template Codim< 0 >::Entity &  element,
const FVElementGeometry &  fvGeometry,
const ElementVolumeVariables &  elemVolVars,
const typename FVElementGeometry::SubControlVolume &  scv 
)
inlineinherited

◆ values()

Values Dumux::PointSource< GlobalPosition , SourceValues >::values ( ) const
inlineinherited

Member Data Documentation

◆ values_

Values Dumux::PointSource< GlobalPosition , SourceValues >::values_
protectedinherited

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