Skip to content
Snippets Groups Projects
Commit ff440eb1 authored by Amaury Johnen's avatar Amaury Johnen
Browse files

add getAllIdealGradientsFromNodes method needed for commit 23148

parent 4f297927
No related branches found
No related tags found
No related merge requests found
...@@ -41,7 +41,7 @@ void calcMapFromIdealElement(int type, T &gSMatX, T &gSMatY, T &gSMatZ) ...@@ -41,7 +41,7 @@ void calcMapFromIdealElement(int type, T &gSMatX, T &gSMatY, T &gSMatZ)
break; break;
} }
case TYPE_PYR: { // Pyramid -> height sqrt(2.)/2 case TYPE_PYR: { // Pyramid -> height sqrt(2.)/2
static const double cPyr = 1./sqrt(2.); static const double cPyr = sqrt(2.);
gSMatZ.scale(cPyr); gSMatZ.scale(cPyr);
break; break;
} }
...@@ -213,6 +213,21 @@ void GradientBasis::getAllGradientsFromNodes(const fullMatrix<double> &nodes, ...@@ -213,6 +213,21 @@ void GradientBasis::getAllGradientsFromNodes(const fullMatrix<double> &nodes,
gradShapeMatZ.mult(nodes, prox); gradShapeMatZ.mult(nodes, prox);
} }
void GradientBasis::
getAllIdealGradientsFromNodes(const fullMatrix<double> &nodes,
fullMatrix<double> &dxyzdXYZ) const
{
fullMatrix<double> prox;
prox.setAsProxy(dxyzdXYZ, 0, 3);
gradShapeIdealMatX.mult(nodes, prox);
prox.setAsProxy(dxyzdXYZ, 3, 3);
gradShapeIdealMatY.mult(nodes, prox);
prox.setAsProxy(dxyzdXYZ, 6, 3);
gradShapeIdealMatZ.mult(nodes, prox);
}
void GradientBasis::getIdealGradientsFromNodes(const fullMatrix<double> &nodes, void GradientBasis::getIdealGradientsFromNodes(const fullMatrix<double> &nodes,
fullMatrix<double> *dxyzdX, fullMatrix<double> *dxyzdX,
fullMatrix<double> *dxyzdY, fullMatrix<double> *dxyzdY,
......
...@@ -36,6 +36,8 @@ public: ...@@ -36,6 +36,8 @@ public:
fullMatrix<double> *dxyzdX, fullMatrix<double> *dxyzdX,
fullMatrix<double> *dxyzdY, fullMatrix<double> *dxyzdY,
fullMatrix<double> *dxyzdZ) const; fullMatrix<double> *dxyzdZ) const;
void getAllIdealGradientsFromNodes(const fullMatrix<double> &nodes,
fullMatrix<double> &dxyzdXYZ) const;
void mapFromIdealElement(fullMatrix<double> &dxyzdX, void mapFromIdealElement(fullMatrix<double> &dxyzdX,
fullMatrix<double> &dxyzdY, fullMatrix<double> &dxyzdY,
fullMatrix<double> &dxyzdZ) const { fullMatrix<double> &dxyzdZ) const {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment