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

move value of shape function at qp of faces to polynomialBasis

parent 17f6e571
No related branches found
No related tags found
No related merge requests found
#include "Gauss.h" #include "Gauss.h"
#include "GmshDefines.h"
#include "Bindings.h" #include "Bindings.h"
static void pts2fullMatrix(int npts, IntPt *pts, fullMatrix<double> &pMatrix, fullMatrix<double> &wMatrix) { static void pts2fullMatrix(int npts, IntPt *pts, fullMatrix<double> &pMatrix, fullMatrix<double> &wMatrix) {
pMatrix.resize(npts,3); pMatrix.resize(npts,3);
...@@ -52,3 +53,14 @@ void gaussIntegration::getHexahedron(int order, fullMatrix<double> &pts, fullMat ...@@ -52,3 +53,14 @@ void gaussIntegration::getHexahedron(int order, fullMatrix<double> &pts, fullMat
void gaussIntegration::getPrism(int order, fullMatrix<double> &pts, fullMatrix<double> &weights) { void gaussIntegration::getPrism(int order, fullMatrix<double> &pts, fullMatrix<double> &weights) {
pts2fullMatrix(getNGQPriPts(order),getGQPriPts(order),pts,weights); pts2fullMatrix(getNGQPriPts(order),getGQPriPts(order),pts,weights);
} }
void gaussIntegration::get(int elementType, int order, fullMatrix<double> &pts, fullMatrix<double> &weights) {
switch (elementType) {
case TYPE_TRI : pts2fullMatrix(getNGQTPts(order), getGQTPts(order), pts, weights); break;
case TYPE_LIN : pts2fullMatrix(getNGQLPts(order), getGQLPts(order), pts, weights); break;
case TYPE_QUA : pts2fullMatrix(getNGQQPts(order), getGQQPts(order), pts, weights); break;
case TYPE_TET : pts2fullMatrix(getNGQTetPts(order), getGQTetPts(order), pts, weights); break;
case TYPE_HEX : pts2fullMatrix(getNGQHPts(order), getGQHPts(order), pts, weights); break;
case TYPE_PRI : pts2fullMatrix(getNGQPriPts(order), getGQPriPts(order), pts, weights); break;
default : Msg::Error("No integration rules defined for type %i", elementType);
}
}
...@@ -41,6 +41,7 @@ IntPt *getGQHPts(int order); ...@@ -41,6 +41,7 @@ IntPt *getGQHPts(int order);
//interface //interface
class gaussIntegration { class gaussIntegration {
public: public:
static void get(int elementType, int order, fullMatrix<double> &pts, fullMatrix<double> &weights);
static void getTriangle(int order, fullMatrix<double> &pts, fullMatrix<double> &weights); static void getTriangle(int order, fullMatrix<double> &pts, fullMatrix<double> &weights);
static void getLine(int order, fullMatrix<double> &pts, fullMatrix<double> &weights); static void getLine(int order, fullMatrix<double> &pts, fullMatrix<double> &weights);
static void getQuad(int order, fullMatrix<double> &pts, fullMatrix<double> &weights); static void getQuad(int order, fullMatrix<double> &pts, fullMatrix<double> &weights);
......
This diff is collapsed.
...@@ -71,10 +71,15 @@ class binding; ...@@ -71,10 +71,15 @@ class binding;
// should be extended to other elements like hexes // should be extended to other elements like hexes
class polynomialBasis class polynomialBasis
{ {
mutable std::map<int,std::vector<fullMatrix<double> > > _dfAtFace; //integrationOrder, closureId => df/dXi
public: public:
//for now the only implemented polynomial basis are nodal poly basis, we use the type of the corresponding gmsh element as type //for now the only implemented polynomial basis are nodal poly basis, we use the type of the corresponding gmsh element as type
int type, parentType;
class closure : public std::vector<int> {
public:
int type; int type;
typedef std::vector<std::vector<int> > clCont; };
typedef std::vector<closure> clCont;
clCont closures; clCont closures;
fullMatrix<double> points; fullMatrix<double> points;
fullMatrix<double> monomials; fullMatrix<double> monomials;
...@@ -262,6 +267,7 @@ class polynomialBasis ...@@ -262,6 +267,7 @@ class polynomialBasis
break; break;
} }
} }
const fullMatrix<double> &getGradientAtFaceIntegrationPoints(int integrationOrder, int closureId) const;
static void registerBindings(binding *b); static void registerBindings(binding *b);
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment