dune-fem 2.8.0
Loading...
Searching...
No Matches
rangegenerators.hh
Go to the documentation of this file.
1#ifndef DUNE_FEM_RANGEGENERATORS_HH
2#define DUNE_FEM_RANGEGENERATORS_HH
3
4#include <dune/common/iteratorrange.hh>
5
6namespace Dune
7{
8 namespace Fem
9 {
46
56 template<typename DF>
57 inline IteratorRange<typename DF::DiscreteFunctionSpaceType::IteratorType> entities(const DF& df)
58 {
59 typedef IteratorRange<typename DF::DiscreteFunctionSpaceType::IteratorType> ReturnType;
60 return ReturnType(df.space().begin(),df.space().end());
61 }
63
65
75 template<typename DF>
76 inline IteratorRange<typename DF::DofIteratorType> dofs(DF& df)
77 {
78 typedef IteratorRange<typename DF::DofIteratorType> ReturnType;
79 return ReturnType(df.dbegin(),df.dend());
80 }
82
84
94 template<typename DF>
95 inline IteratorRange<typename DF::ConstDofIteratorType> dofs(const DF& df)
96 {
97 typedef IteratorRange<typename DF::ConstDofIteratorType> ReturnType;
98 return ReturnType(df.dbegin(),df.dend());
99 }
101
102 } // end namespace Fem
103
104} // end namespace Dune
105
106#endif // DUNE_FEM_RANGEGENERATORS_HH
Definition: bindguard.hh:11
IteratorRange< typename DF::DiscreteFunctionSpaceType::IteratorType > entities(const DF &df)
Iterator ranges for entities and DOFs to support iteration with range-based for loops.
Definition: rangegenerators.hh:57
IteratorRange< typename DF::DofIteratorType > dofs(DF &df)
Iterates over all DOFs.
Definition: rangegenerators.hh:76