Skip to content
Snippets Groups Projects
Commit 62c5572c authored by Bastien Gorissen's avatar Bastien Gorissen
Browse files

Added proposed data structure for boundary layer information storage.

parent f8ea14f1
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,7 @@
#include <set>
#include "SPoint2.h"
#include "SPoint3.h"
#include "MVertexBoundaryLayerData.h"
class GEntity;
class GEdge;
......@@ -124,6 +125,8 @@ class MEdgeVertex : public MVertex{
protected:
double _u, _lc;
public:
MVertexBoundaryLayerData* bl_data;
MEdgeVertex(double x, double y, double z, GEntity *ge, double u, double lc = -1.0,
int num = 0)
: MVertex(x, y, z, ge,num), _u(u), _lc(lc)
......@@ -139,6 +142,8 @@ class MFaceVertex : public MVertex{
protected:
double _u, _v;
public :
MVertexBoundaryLayerData* bl_data;
MFaceVertex(double x, double y, double z, GEntity *ge, double u, double v, int num = 0)
: MVertex(x, y, z, ge, num), _u(u), _v(v)
{
......
// Gmsh - Copyright (C) 1997-2011 C. Geuzaine, J.-F. Remacle
//
// See the LICENSE.txt file for license information. Please report all
// bugs and problems to <gmsh@geuz.org>.
#include "MVertexBoundaryLayerData.h"
std::vector<MVertex*>* MVertexBoundaryLayerData::getChildren(int i){
if (i < this->children.size() && i >= 0) {
return &(children[i]);
} else {
return 0;
}
}
int MVertexBoundaryLayerData::getNumChildren(int i) {
if (i < this->children.size() && i >= 0) {
return this->children[i].size();
} else {
return -1;
}
}
int MVertexBoundaryLayerData::getNumChildrenFamilies() {
return this->children.size();
}
void MVertexBoundaryLayerData::addChildrenFamily(std::vector<MVertex*> family) {
this->children.push_back(family);
}
// Gmsh - Copyright (C) 1997-2011 C. Geuzaine, J.-F. Remacle
//
// See the LICENSE.txt file for license information. Please report all
// bugs and problems to <gmsh@geuz.org>.
#ifndef _MVERTEXBOUNDARYLAYERDATA_H_
#define _MVERTEXBOUNDARYLAYERDATA_H_
#include <vector>
class MVertex;
/* A simple data structure to keep track of the "children" of
* vertices in a boundary layer meshes.
*
* It should be filled for each MVertex on the boundary of the
* geometry with the vertices along the normal direction, in order.
*/
class MVertexBoundaryLayerData {
private:
std::vector<std::vector<MVertex*> > children;
public:
std::vector<MVertex*>* getChildren(int i);
int getNumChildren(int i);
int getNumChildrenFamilies();
void addChildrenFamily(std::vector<MVertex*> family);
};
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment