Skip to content
Snippets Groups Projects
Commit d73c406d authored by Robert Klöfkorn's avatar Robert Klöfkorn
Browse files

Minor changes.

[[Imported from SVN: r196]]
parent 9fe0343d
No related branches found
No related tags found
No related merge requests found
......@@ -22,7 +22,12 @@ namespace Dune {
GridType::Traits<0>::Entity EntityType;
//! get LocalOperator
DiscreteOperator (LocalOperatorImp &op ) : _localOp ( op ) {};
DiscreteOperator (LocalOperatorImp &op ) : _localOp ( op ) , tmp_ (NULL) {};
void prepare ( Range &r )
{
tmp_ = &r;
}
//! go over all Entitys and call the LocalOperator.applyLocal Method
//! Note that the LocalOperator can be an combined Operator
......@@ -36,17 +41,13 @@ namespace Dune {
const typename FunctionSpaceType & functionSpace_= Dest.getFunctionSpace();
GridType &grid = const_cast<GridType &> (functionSpace_.getGrid());
//std::cout << "DiscreteOperator::operator element wise () \n";
LevelIterator levit = grid.lbegin<0>( grid.maxlevel() );
LevelIterator endit = grid.lend<0> ( grid.maxlevel() );
Range tmp( Dest );
//Range tmp( Dest );
Dest.clear();
//const_cast<DiscreteFunctionType &> (Arg).print();
_localOp.prepare(&tmp);
_localOp.prepare(tmp_);
for( levit ; levit != endit; ++levit )
{
//std::cout << "Call applyLocal on element " << levit->index() << "\n";
......@@ -60,6 +61,8 @@ namespace Dune {
}
private:
Range * tmp_;
LocalOperatorImp & _localOp;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment