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

Mapping of Zaglmayr QuadBasis to fit Gmsh Ref Space

parent 5ee29485
No related branches found
No related tags found
No related merge requests found
......@@ -201,6 +201,33 @@ QuadEdgeBasis::QuadEdgeBasis(int order){
}
// Mapping to Gmsh Quad //
// x = (u + 1) / 2
// y = (v + 1) / 2
//
// (x, y) = Zaglmayr Ref Quad
// (u, v) = Gmsh Ref Quad
Polynomial mapX(Polynomial(0.5, 1, 0, 0) +
Polynomial(0.5, 0, 0, 0));
Polynomial mapY(Polynomial(0.5, 0, 1, 0) +
Polynomial(0.5, 0, 0, 0));
for(int i = 0; i < nEdgeClosure; i++){
for(int j = 0; j < nEdge; j++){
(*(*edge)[i])[j]->at(0) = (*(*edge)[i])[j]->at(0).compose(mapX, mapY);
(*(*edge)[i])[j]->at(1) = (*(*edge)[i])[j]->at(1).compose(mapX, mapY);
(*(*edge)[i])[j]->at(2) = (*(*edge)[i])[j]->at(2).compose(mapX, mapY);
}
}
for(int i = 0; i < nCell; i++){
(*cell)[i]->at(0) = (*cell)[i]->at(0).compose(mapX, mapY);
(*cell)[i]->at(1) = (*cell)[i]->at(1).compose(mapX, mapY);
(*cell)[i]->at(2) = (*cell)[i]->at(2).compose(mapX, mapY);
}
// Free Temporary Sapce //
delete[] legendre;
delete[] intLegendre;
......
......@@ -10,9 +10,13 @@
This class can instantiate an Edge-Based Basis
(high or low order) for Quads.@n
It uses
It uses a variation of
<a href="http://www.hpfem.jku.at/publications/szthesis.pdf">Zaglmayr's</a>
Basis for @em high @em order Polynomial%s generation.@n
The following mapping has been applied to Zaglmayr's Basis for Quads:
@li @f$x = \frac{u + 1}{2}@f$
@li @f$y = \frac{v + 1}{2}@f$
*/
class QuadEdgeBasis: public BasisVector{
......
......@@ -127,6 +127,30 @@ QuadNodeBasis::QuadNodeBasis(int order){
}
// Mapping to Gmsh Quad //
// x = (u + 1) / 2
// y = (v + 1) / 2
//
// (x, y) = Zaglmayr Ref Quad
// (u, v) = Gmsh Ref Quad
Polynomial mapX(Polynomial(0.5, 1, 0, 0) +
Polynomial(0.5, 0, 0, 0));
Polynomial mapY(Polynomial(0.5, 0, 1, 0) +
Polynomial(0.5, 0, 0, 0));
for(int i = 0; i < nVertex; i++)
*(*node)[i] = (*node)[i]->compose(mapX, mapY);
for(int i = 0; i < nEdgeClosure; i++)
for(int j = 0; j < nEdge; j++)
*(*(*edge)[i])[j] = (*(*edge)[i])[j]->compose(mapX, mapY);
for(int i = 0; i < nCell; i++)
*(*cell)[i] = (*cell)[i]->compose(mapX, mapY);
// Free Temporary Sapce //
delete[] legendre;
}
......
......@@ -10,9 +10,13 @@
This class can instantiate a Node-Based Basis
(high or low order) for Quads.@n
It uses
It uses a variation of
<a href="http://www.hpfem.jku.at/publications/szthesis.pdf">Zaglmayr's</a>
Basis for @em high @em order Polynomial%s generation.@n
The following mapping has been applied to Zaglmayr's Basis for Quads:
@li @f$x = \frac{u + 1}{2}@f$
@li @f$y = \frac{v + 1}{2}@f$
*/
class QuadNodeBasis: public BasisScalar{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment