Finishes (DivCellToVert) and cleans the Divergence operator
implementation. Tested with only Div test. As I was in the
neighbourhood.
Ok?
Richard.
2004Jul15 Richard Guenther <address@hidden>
* src/Field/DiffOps/Div.h: adjust documentation.
src/Field/DiffOps/Div.UR.h: implement DivCellToVert,
clean implementation.
template<class F>
inline OutputElement_t
operator()(const F &f, int i1, int i2) const
{
- return 0.5 *
- (fact_m(0) *
- (f(i1 + 1, i2 )(0) - f(i1 , i2 )(0) +
- f(i1 + 1, i2 + 1)(0) - f(i1 , i2 + 1)(0)
- ) +
- fact_m(1) *
- (f(i1 , i2 + 1)(1) - f(i1 , i2 )(1) +
- f(i1 + 1, i2 + 1)(1) - f(i1 + 1, i2 )(1)
- )
- );
+ return OutputElement_t
+ (fact_m(0) * (f.read(i1+1, i2)(0) - f.read(i1, i2)(0))
+ + fact_m(1) * (f.read(i1, i2+1)(1) - f.read(i1, i2)(1)));
}