Skip to content
Snippets Groups Projects
Commit 07e45f1e authored by Nicolas Marsic's avatar Nicolas Marsic
Browse files

Trying parallel stuff + remove bad memory access with pointGenerator in BasisLagrange

parent 14ee202d
No related branches found
No related tags found
No related merge requests found
...@@ -96,14 +96,28 @@ project(const MElement& element, ...@@ -96,14 +96,28 @@ project(const MElement& element,
// Init New Coefs // // Init New Coefs //
const unsigned int size = lPoint->size1(); const unsigned int size = lPoint->size1();
const unsigned int dim = lPoint->size2();
vector<double> newCoef(size); vector<double> newCoef(size);
// Interpolation at Lagrange Points // // Interpolation at Lagrange Points //
for(unsigned int i = 0; i < size; i++){ for(unsigned int i = 0; i < size; i++){
fullVector<double> uvw(3); fullVector<double> uvw(3);
if(dim > 0)
uvw(0) = (*lPoint)(i, 0); uvw(0) = (*lPoint)(i, 0);
else
uvw(0) = 0;
if(dim > 1)
uvw(1) = (*lPoint)(i, 1); uvw(1) = (*lPoint)(i, 1);
else
uvw(1) = 0;
if(dim > 2)
uvw(2) = (*lPoint)(i, 2); uvw(2) = (*lPoint)(i, 2);
else
uvw(2) = 0;
newCoef[i] = fSpace.interpolateInRefSpace(element, newCoef[i] = fSpace.interpolateInRefSpace(element,
coef, coef,
...@@ -126,9 +140,21 @@ project(const MElement& element, ...@@ -126,9 +140,21 @@ project(const MElement& element,
// Interpolation at Lagrange Points // // Interpolation at Lagrange Points //
for(unsigned int i = 0; i < size; i++){ for(unsigned int i = 0; i < size; i++){
fullVector<double> uvw(3); fullVector<double> uvw(3);
if(dim > 0)
uvw(0) = (*lPoint)(i, 0); uvw(0) = (*lPoint)(i, 0);
else
uvw(0) = 0;
if(dim > 1)
uvw(1) = (*lPoint)(i, 1); uvw(1) = (*lPoint)(i, 1);
else
uvw(1) = 0;
if(dim > 2)
uvw(2) = (*lPoint)(i, 2); uvw(2) = (*lPoint)(i, 2);
else
uvw(2) = 0;
newCoef[i] = fSpace.interpolateInRefSpace(element, newCoef[i] = fSpace.interpolateInRefSpace(element,
coef, coef,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment