diff --git a/dune/gfe/maxnormtrustregion.hh b/dune/gfe/maxnormtrustregion.hh index d03b81cdfaa612dfd7a4a29985478272648b8695..5b1972e2422a5617852c96372d6d7fae861cbc91 100644 --- a/dune/gfe/maxnormtrustregion.hh +++ b/dune/gfe/maxnormtrustregion.hh @@ -18,6 +18,8 @@ public: void set(field_type radius) { + radius_ = radius; + for (size_t i=0; i<obstacles_.size(); i++) { for (int k=0; k<blocksize; k++) { @@ -32,13 +34,13 @@ public: } field_type radius() const { - assert(obstacles_.size()>0); - assert(blocksize>0); - return obstacles_[0].upper(0); + return radius_; } void scale(field_type factor) { + radius_ *= factor; + for (size_t i=0; i<obstacles_.size(); i++) { for (int k=0; k<blocksize; k++) { @@ -60,6 +62,8 @@ private: std::vector<BoxConstraint<field_type,blocksize> > obstacles_; + field_type radius_; + }; #endif