DUNE-FEM (unstable)
samples values of a discrete function along a given line segment More...
#include <dune/fem/misc/linesegmentsampler.hh>
Public Member Functions | |
LineSegmentSampler (const GridPart &gridPart, const DomainType &left, const DomainType &right) | |
constructor More... | |
template<class GridFunction > | |
void | operator() (const GridFunction &f, std::vector< typename GridFunction::RangeType > &samples, std::nothrow_t) const |
sample a given function More... | |
void | samplePoints (std::vector< DomainType > &points) const |
returns sampling points More... | |
const GridPart & | gridPart () const |
obtain grid part on which the LineSegmentSampler works | |
Detailed Description
class Dune::Fem::LineSegmentSampler< GridPart >
samples values of a discrete function along a given line segment
The class LineSegmentSampler provides a method for sampling the values of given discrete function along an arbitrary line contained in some GridPart. The sampling points are always equidistant and include the line segment's end points.
- Note
- The grid is required to be flat, i.e., grid dimension and world dimension must coincide.
- Template Parameters
-
GridPart type of grid part to sample on
Constructor & Destructor Documentation
◆ LineSegmentSampler()
|
inline |
constructor
- Parameters
-
[in] gridPart the grid part to sample over [in] left left end point of the line segment [in] right right end point of the line segment
- Note
- Actually, left and right can be exchanged. The order only influences the parametrization of the line segment.
- The entire line segment must be a subset of the grid part.
Member Function Documentation
◆ operator()()
|
inline |
sample a given function
The operator() actually samples the values of a given grid function.
- Parameters
-
[in] f grid function to sample [out] samples std::vector receiving the samples
- Note
- The number of sampling points is determined from the size of samples, which may not be less than 2.
References Dune::DenseVector< V >::axpy(), Dune::Geo::ReferenceElements< ctype_, dim >::general(), Dune::Hybrid::max, and Dune::Hybrid::min.
◆ samplePoints()
|
inline |
returns sampling points
The operator() actually samples the values of a given grid function.
- Parameters
-
[out] points std::vector receiving the points
- Note
- The number of sampling points is determined from the size of points, which may not be less than 2.
References DUNE_THROW.
The documentation for this class was generated from the following file:
- dune/fem/misc/linesegmentsampler.hh