ug4
ug::FVLineSourceOrSink< dim, TData > Class Template Reference

Base class for line sources and sinks. More...

#include <fv1_sss.h>

+ Inheritance diagram for ug::FVLineSourceOrSink< dim, TData >:

Public Member Functions

template<typename TElem , typename TAAPos , typename TFVGeom >
bool corresponds_to (TElem *elem, Grid &grid, TAAPos &aaPos, const TFVGeom &geo, size_t co, MathVector< dim > &ls, MathVector< dim > &le)
 test whether a source/sink point corresponds to a given corner of the element More...
 
const MathVector< dim > & from_position ()
 returns the beginning of the line segment More...
 
 FVLineSourceOrSink (const MathVector< dim > &_point1, const MathVector< dim > &_point2)
 class constructor (with the default constructor for data) More...
 
 FVLineSourceOrSink (const MathVector< dim > &_point1, const MathVector< dim > &_point2, const TData &_data)
 class constructor (with the copy constructor for data) More...
 
 FVLineSourceOrSink (const std::vector< number > &_point1, const std::vector< number > &_point2)
 class constructor (with the default constructor for data) More...
 
const MathVector< dim > & to_position ()
 returns the end of the line segment More...
 

Private Attributes

MathVector< dimpoint1
 beginning of the line segment More...
 
MathVector< dimpoint2
 end of the line segment More...
 

Detailed Description

template<int dim, typename TData>
class ug::FVLineSourceOrSink< dim, TData >

Base class for line sources and sinks.

Constructor & Destructor Documentation

◆ FVLineSourceOrSink() [1/3]

template<int dim, typename TData >
ug::FVLineSourceOrSink< dim, TData >::FVLineSourceOrSink ( const MathVector< dim > &  _point1,
const MathVector< dim > &  _point2 
)
inline

class constructor (with the default constructor for data)

Parameters
_point1beginning of the line segment
_point2end of the line segment

◆ FVLineSourceOrSink() [2/3]

template<int dim, typename TData >
ug::FVLineSourceOrSink< dim, TData >::FVLineSourceOrSink ( const MathVector< dim > &  _point1,
const MathVector< dim > &  _point2,
const TData &  _data 
)
inline

class constructor (with the copy constructor for data)

Parameters
_point1beginning of the line segment
_point2end of the line segment
_datathe data to copy

◆ FVLineSourceOrSink() [3/3]

template<int dim, typename TData >
ug::FVLineSourceOrSink< dim, TData >::FVLineSourceOrSink ( const std::vector< number > &  _point1,
const std::vector< number > &  _point2 
)
inline

class constructor (with the default constructor for data)

Parameters
_point1beginning of the line segment
_point2end of the line segment

References dim, ug::FVLineSourceOrSink< dim, TData >::point1, ug::FVLineSourceOrSink< dim, TData >::point2, and UG_THROW.

Member Function Documentation

◆ corresponds_to()

template<int dim, typename TData >
template<typename TElem , typename TAAPos , typename TFVGeom >
bool ug::FVLineSourceOrSink< dim, TData >::corresponds_to ( TElem *  elem,
Grid grid,
TAAPos &  aaPos,
const TFVGeom &  geo,
size_t  co,
MathVector< dim > &  ls,
MathVector< dim > &  le 
)

test whether a source/sink point corresponds to a given corner of the element

Test whether a line source/sink corresponds to a given corner of an element. If yes, the function returns true and sets ls and le to the beginning and the end of the subsegment of the source/sink.

Note that TElem must specify the dimensionality of the element. Thus, GridObject is not a proper type for TElem. It should be at least Edge, Face, Volume or derived classes.

Todo:
This function works only for there is only one scv per corner. This is not true for pyramids!
Parameters
[in]elemthe element
[in]gridthe grid
[in]aaPosposition of the vertices
[in]geoFV geometry (initialized for 'elem')
[in]cocorner to get the contribution for
[out]lsbeginning of the subsegment
[out]leend of the subsegment

References ug::ContainsPoint(), dim, p, ug::RayElementIntersection(), ug::ReferenceElementDimension(), ug::SMALL, UG_THROW, ug::VecDot(), ug::VecScaleAdd(), and ug::VecSubtract().

Referenced by ug::FVSingularSourcesAndSinks< dim, TPointData, TLineData >::line_iterator< TElem, TAAPos, TFVGeom >::next_sss().

◆ from_position()

template<int dim, typename TData >
const MathVector<dim>& ug::FVLineSourceOrSink< dim, TData >::from_position ( )
inline

◆ to_position()

template<int dim, typename TData >
const MathVector<dim>& ug::FVLineSourceOrSink< dim, TData >::to_position ( )
inline

Member Data Documentation

◆ point1

◆ point2


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