From 9f2e5423f72e717971f7c47a700043f66ed93413 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Tue, 28 Oct 2014 08:25:21 +0000 Subject: [PATCH] fix compile --- Numeric/approximationError.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Numeric/approximationError.cpp b/Numeric/approximationError.cpp index 407aaa5d5c..a116b1b90d 100644 --- a/Numeric/approximationError.cpp +++ b/Numeric/approximationError.cpp @@ -1,8 +1,8 @@ #include "approximationError.h" #include "MElement.h" -double approximationError (simpleFunction<double> &f, MElement *e) +double approximationError (simpleFunction<double> &f, MElement *e) { - double VALS [e->getNumVertices()]; + std::vector<double> VALS(e->getNumVertices()); for (int i=0;i<e->getNumVertices();i++){ MVertex *v = e->getVertex(i); VALS[i] = f(v->x(),v->y(),v->z()); @@ -16,7 +16,7 @@ double approximationError (simpleFunction<double> &f, MElement *e) const double w = pts[k].pt[2]; SPoint3 p; e->pnt(u, v, w, p); const double Jac = e->getJacobianDeterminant(u,v,w); - const double C = e->interpolate(VALS,u,v,w); + const double C = e->interpolate(&VALS[0],u,v,w); const double F = f(p.x(),p.y(),p.z()); const double DIFF = C-F; errSqr += pts[k].weight * Jac * (DIFF*DIFF); -- GitLab