3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Public Types | Public Member Functions | Protected Attributes | List of all members
Dumux::PointSource< PositionType, ValueType > Class Template Reference

A point source base class. More...

#include <dumux/common/pointsource.hh>

Inheritance diagram for Dumux::PointSource< PositionType, ValueType >:
Inheritance graph

Description

template<class PositionType, class ValueType>
class Dumux::PointSource< PositionType, ValueType >

A point source base class.

Template Parameters
PositionTypethe position type
ValueTypethe a vector type storing the source for all equations

Public Types

using Scalar = std::decay_t< decltype(std::declval< ValueType >()[0])>
 Export the scalar type. More...
 
using GlobalPosition = PositionType
 Export the position type. More...
 
using Values = ValueType
 Export the value type. More...
 

Public Member Functions

 PointSource (GlobalPosition pos, Values values)
 Constructor for constant point sources. More...
 
 PointSource (GlobalPosition pos)
 Constructor for sol dependent point sources, when there is no. 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...
 
PointSourceoperator= (const Values &values)
 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...
 
template<class Problem , class FVElementGeometry , class ElementVolumeVariables >
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

template<class PositionType , class ValueType >
using Dumux::PointSource< PositionType, ValueType >::GlobalPosition = PositionType

Export the position type.

◆ Scalar

template<class PositionType , class ValueType >
using Dumux::PointSource< PositionType, ValueType >::Scalar = std::decay_t<decltype(std::declval<ValueType>()[0])>

Export the scalar type.

◆ Values

template<class PositionType , class ValueType >
using Dumux::PointSource< PositionType, ValueType >::Values = ValueType

Export the value type.

Constructor & Destructor Documentation

◆ PointSource() [1/2]

template<class PositionType , class ValueType >
Dumux::PointSource< PositionType, ValueType >::PointSource ( GlobalPosition  pos,
Values  values 
)
inline

Constructor for constant point sources.

◆ PointSource() [2/2]

template<class PositionType , class ValueType >
Dumux::PointSource< PositionType, ValueType >::PointSource ( GlobalPosition  pos)
inline

Constructor for sol dependent point sources, when there is no.

Member Function Documentation

◆ embeddings()

template<class PositionType , class ValueType >
std::size_t Dumux::PointSource< PositionType, ValueType >::embeddings ( ) const
inline

get the number of embeddings for this point source

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.

◆ operator*=()

template<class PositionType , class ValueType >
PointSource & Dumux::PointSource< PositionType, ValueType >::operator*= ( Scalar  s)
inline

Convenience *= operator overload modifying only the values.

◆ operator+=()

template<class PositionType , class ValueType >
PointSource & Dumux::PointSource< PositionType, ValueType >::operator+= ( Scalar  s)
inline

Convenience += operator overload modifying only the values.

◆ operator-=()

template<class PositionType , class ValueType >
PointSource & Dumux::PointSource< PositionType, ValueType >::operator-= ( Scalar  s)
inline

Convenience -= operator overload modifying only the values.

◆ operator/=()

template<class PositionType , class ValueType >
PointSource & Dumux::PointSource< PositionType, ValueType >::operator/= ( Scalar  s)
inline

Convenience /= operator overload modifying only the values.

◆ operator=() [1/2]

template<class PositionType , class ValueType >
PointSource & Dumux::PointSource< PositionType, ValueType >::operator= ( const Values values)
inline

Convenience = operator overload modifying only the values.

◆ operator=() [2/2]

template<class PositionType , class ValueType >
PointSource & Dumux::PointSource< PositionType, ValueType >::operator= ( Scalar  s)
inline

Convenience = operator overload modifying only the values.

◆ position()

template<class PositionType , class ValueType >
const GlobalPosition & Dumux::PointSource< PositionType, ValueType >::position ( ) const
inline

return the source position

◆ setEmbeddings()

template<class PositionType , class ValueType >
void Dumux::PointSource< PositionType, ValueType >::setEmbeddings ( std::size_t  embeddings)
inline

set the number of embeddings for this point source

◆ update()

template<class PositionType , class ValueType >
template<class Problem , class FVElementGeometry , class ElementVolumeVariables >
void Dumux::PointSource< PositionType, ValueType >::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 
)
inline

an update function called before adding the value

◆ values()

template<class PositionType , class ValueType >
Values Dumux::PointSource< PositionType, ValueType >::values ( ) const
inline

return the source values

Member Data Documentation

◆ values_

template<class PositionType , class ValueType >
Values Dumux::PointSource< PositionType, ValueType >::values_
protected

value of the point source for each equation


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