Skip to content
Snippets Groups Projects
Commit 4941d41a authored by Elias Pipping's avatar Elias Pipping
Browse files

Add assertion: Vectors must have identical size

parent 2b76d8dd
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,7 @@ class TwoNorm : public Norm<VectorType>
//! Compute the norm of the difference of two vectors
virtual double diff(const VectorType& f1, const VectorType& f2) const
{
assert(f1.size() == f2.size());
double r = 0.0;
for (size_t i=0; i<f1.size(); ++i)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment