Skip to content
Snippets Groups Projects
Commit 383acfc6 authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

dgDataCacheMap : compute normals in POINT_MODE on interfaces

parent 5bd0d6b6
No related branches found
No related tags found
No related merge requests found
...@@ -125,9 +125,7 @@ class polynomialBasis ...@@ -125,9 +125,7 @@ class polynomialBasis
} }
} }
} }
// I would favour this interface that allows optimizations (not inline void f(fullMatrix<double> &coord, fullMatrix<double> &sf) const
// implemented) and is easier to bind
inline void f(fullMatrix<double> &coord, fullMatrix<double> &sf)
{ {
double p[1256]; double p[1256];
sf.resize (coord.size1(), coefficients.size1()); sf.resize (coord.size1(), coefficients.size1());
...@@ -138,6 +136,21 @@ class polynomialBasis ...@@ -138,6 +136,21 @@ class polynomialBasis
sf(iPoint,i) += coefficients(i, j) * p[j]; sf(iPoint,i) += coefficients(i, j) * p[j];
} }
} }
inline void df(fullMatrix<double> &coord, fullMatrix<double> &dfm) const
{
double dfv[1256][3];
dfm.resize (coefficients.size1(), coord.size1() * 3, false);
int ii = 0;
for (int iPoint=0; iPoint< coord.size1(); iPoint++) {
df(coord(iPoint,0), coord(iPoint, 1), coord(iPoint, 2), dfv);
for (int i = 0; i < coefficients.size1(); i++) {
dfm(i, iPoint * 3 + 0) = dfv[i][0];
dfm(i, iPoint * 3 + 1) = dfv[i][1];
dfm(i, iPoint * 3 + 2) = dfv[i][2];
++ii;
}
}
}
inline void df(double u, double v, double w, double grads[][3]) const inline void df(double u, double v, double w, double grads[][3]) const
{ {
switch (monomials.size2()) { switch (monomials.size2()) {
......
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