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

HUGE BUG FIX: correcting rev19884 introduced a new bug -- TriEdgeBasis...

HUGE BUG FIX: correcting rev19884 introduced a new bug -- TriEdgeBasis functions associated to FACES were missing a -1 !!
It seems like everything works now :-)!
parent 7c62a34d
Branches
Tags
No related merge requests found
...@@ -172,22 +172,16 @@ TetEdgeBasis::TetEdgeBasis(size_t order){ ...@@ -172,22 +172,16 @@ TetEdgeBasis::TetEdgeBasis(size_t order){
// Type 1 // Type 1
basis[s][i] = basis[s][i] = new vector<Polynomial>((u * v).gradient());
new vector<Polynomial>((u * v).gradient());
i++; i++;
// Type 2 // Type 2
basis[s][i] = basis[s][i] = new vector<Polynomial>(subGradUV);
new vector<Polynomial>(subGradUV);
i++; i++;
// Type 3 // Type 3
if(l1 == 1){ if(l1 == 1){
basis[s][i] = basis[s][i] = new vector<Polynomial>(subGradL1L2V);
new vector<Polynomial>(subGradL1L2V);
i++; i++;
} }
} }
......
...@@ -51,6 +51,9 @@ TriEdgeBasis::TriEdgeBasis(size_t order){ ...@@ -51,6 +51,9 @@ TriEdgeBasis::TriEdgeBasis(size_t order){
Polynomial(Polynomial(1, 0, 1, 0)) Polynomial(Polynomial(1, 0, 1, 0))
}; };
// One //
Polynomial one(1, 0, 0, 0);
// Basis // // Basis //
basis = new vector<Polynomial>**[nOrientation]; basis = new vector<Polynomial>**[nOrientation];
...@@ -118,7 +121,7 @@ TriEdgeBasis::TriEdgeBasis(size_t order){ ...@@ -118,7 +121,7 @@ TriEdgeBasis::TriEdgeBasis(size_t order){
lagrange[faceIdx[s][0][1]]); lagrange[faceIdx[s][0][1]]);
Polynomial v = Polynomial v =
lagrange[faceIdx[s][0][2]] * lagrange[faceIdx[s][0][2]] *
legendre[l2].compose(lagrange[faceIdx[s][0][2]] * 2); legendre[l2].compose(lagrange[faceIdx[s][0][2]] * 2 - one);
// Preliminary Type 2 // Preliminary Type 2
vector<Polynomial> gradU = u.gradient(); vector<Polynomial> gradU = u.gradient();
...@@ -164,22 +167,16 @@ TriEdgeBasis::TriEdgeBasis(size_t order){ ...@@ -164,22 +167,16 @@ TriEdgeBasis::TriEdgeBasis(size_t order){
// Type 1 // Type 1
basis[s][i] = basis[s][i] = new vector<Polynomial>((u * v).gradient());
new vector<Polynomial>((u * v).gradient());
i++; i++;
// Type 2 // Type 2
basis[s][i] = basis[s][i] = new vector<Polynomial>(subGradUV);
new vector<Polynomial>(subGradUV);
i++; i++;
// Type 3 // Type 3
if(l1 == 1){ if(l1 == 1){
basis[s][i] = basis[s][i] = new vector<Polynomial>(subGradL1L2V);
new vector<Polynomial>(subGradL1L2V);
i++; i++;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment