Skip to content
Snippets Groups Projects
Commit 82373c70 authored by Oliver Sander's avatar Oliver Sander Committed by sander
Browse files

Introduce method 'violate' which says whether a given vector is outside of the trust region

[[Imported from SVN: r9951]]
parent ae1febf2
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,18 @@ public:
}
/** \brief Return true if the given vector is not contained in the trust region */
bool violates(const Dune::BlockVector<Dune::FieldVector<double,blocksize> >& v) const
{
assert(v.size() == obstacles_.size());
for (size_t i=0; i<v.size(); i++)
for (size_t j=0; j<blocksize; j++)
if (v[i][j] < obstacles_[i].lower(j) or v[i][j] > obstacles_[i].upper(j))
return true;
return false;
}
field_type radius() const {
return radius_;
}
......
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