Skip to content
Snippets Groups Projects
Commit 286a025f authored by Jean-François Remacle's avatar Jean-François Remacle
Browse files

*** empty log message ***

parent 6c1e0708
No related branches found
No related tags found
No related merge requests found
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <map> #include <map>
#include <vector> #include <vector>
#include "GmshMatrix.h" #include "GmshMatrix.h"
#include "gmshFunction.h"
#include "gmshAssembler.h" #include "gmshAssembler.h"
#include "GModel.h" #include "GModel.h"
#include "MElement.h" #include "MElement.h"
...@@ -105,8 +106,9 @@ class gmshNodalFemTerm : public gmshTermOfFormulation<scalar> { ...@@ -105,8 +106,9 @@ class gmshNodalFemTerm : public gmshTermOfFormulation<scalar> {
gmshAssembler<scalar> &lsys) gmshAssembler<scalar> &lsys)
{ {
std::vector<MVertex *> v; std::vector<MVertex *> v;
_gm->getMeshVertices (physical, dim,v); GModel *m = gmshTermOfFormulation<scalar>::_gm;
for (int i=0;i<v.size();i++) m->getMeshVertices(physical, dim, v);
for (unsigned int i = 0; i < v.size(); i++)
lsys.fixVertex(v[i], comp, field, e(v[i]->x(), v[i]->y(), v[i]->z())); lsys.fixVertex(v[i], comp, field, e(v[i]->x(), v[i]->y(), v[i]->z()));
} }
void addNeumann(int physical, void addNeumann(int physical,
...@@ -117,14 +119,15 @@ class gmshNodalFemTerm : public gmshTermOfFormulation<scalar> { ...@@ -117,14 +119,15 @@ class gmshNodalFemTerm : public gmshTermOfFormulation<scalar> {
gmshAssembler<scalar> &lsys) gmshAssembler<scalar> &lsys)
{ {
std::map<int, std::vector<GEntity*> > groups[4]; std::map<int, std::vector<GEntity*> > groups[4];
_gm->getPhysicalGroups(groups); GModel *m = gmshTermOfFormulation<scalar>::_gm;
m->getPhysicalGroups(groups);
std::map<int, std::vector<GEntity*> >::iterator it = groups[dim].find(physical); std::map<int, std::vector<GEntity*> >::iterator it = groups[dim].find(physical);
if (it == groups[dim].end()) return; if (it == groups[dim].end()) return;
double jac[3][3]; double jac[3][3];
for (int i=0;i<it->second.size();++i){ for (unsigned int i = 0; i < it->second.size(); ++i){
GEntity *ge = it->second[i]; GEntity *ge = it->second[i];
for (int j=0; j<ge->getNumMeshElements();j++){ for (unsigned int j = 0; j < ge->getNumMeshElements(); j++){
MElement *e = ge->getMeshElement(j); MElement *e = ge->getMeshElement(j);
int integrationOrder = 2 * e->getPolynomialOrder(); int integrationOrder = 2 * e->getPolynomialOrder();
int nbNodes = e->getNumVertices(); int nbNodes = e->getNumVertices();
...@@ -154,6 +157,7 @@ class gmshNodalFemTerm : public gmshTermOfFormulation<scalar> { ...@@ -154,6 +157,7 @@ class gmshNodalFemTerm : public gmshTermOfFormulation<scalar> {
} }
} }
} }
}
}; };
#endif #endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment