Skip to content
Snippets Groups Projects
Commit a9cfd7ad authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

New automatic numbering

parent b55410e3
No related branches found
No related tags found
No related merge requests found
// $Id: 3D_Extrude_Old.cpp,v 1.1 2001-06-25 13:05:16 geuzaine Exp $
// $Id: 3D_Extrude_Old.cpp,v 1.2 2001-06-25 16:23:00 geuzaine Exp $
// This is the old extrusion mesh generator -> only available through
// command line options -extrude (w/o -recombine). This mesh generator
......@@ -10,16 +10,20 @@
//
// All geometrical entities are automatically numbered:
//
// volumes: 3 * 10^6 + layer * 10^3 + surf->num
// New XY surfaces: 2 * 10^6 + layer * 10^3 + surf->num
// perp. surfaces: 1 * 10^6 + layer * 10^3 + curve->num
// perp. lines: 4 * 10^6 + layer * 10^3 + point->Num
// volumes: 3 * K1 + layer * K2 + surf->num
// New XY surfaces: 2 * K1 + layer * K2 + surf->num
// perp. surfaces: 1 * K1 + layer * K2 + curve->num
// perp. lines: 4 * K1 + layer * K2 + point->Num
//
// WARNING:
//
// The is no way to save XY generated lines or other entities for the
// moment
#define NB_LAYER_MAX 100
#define K1 100.e6
#define K2 1.e6 // to store NB_LAYER_MAX
#include "Gmsh.h"
#include "Const.h"
#include "Geo.h"
......@@ -32,9 +36,6 @@ extern Context_T CTX ;
extern Mesh *LOCAL, *THEM;
extern int CurrentNodeNumber;
#define NB_LAYER_MAX 100
static Tree_T *Tree_Ares, *Tree_Swaps;
FILE *file;
......@@ -404,11 +405,11 @@ static void Extrude_Surface3 (void *data , void *dum){
/* Numerotation automatique des entites physiques */
printf("Extruding Surface %d \n",s->Num);
for(i=0;i<NbLayer;i++){
ZonLayer[i] = (int)(3 * 1.e6) + (int) ((i+1) * 1.e3) + s->Num ;
ZonLayer[i] = (int)(3 * K1) + (int) ((i+1) * K2) + s->Num ;
}
SurfLayer[0] = s->Num ;
for(i=0;i<NbLayer;i++){
SurfLayer[i+1] = (int)(2 * 1.e6) + (int)((i+1) * 1.e3) + s->Num ;
SurfLayer[i+1] = (int)(2 * K1) + (int)((i+1) * K2) + s->Num ;
}
Tree_Action(s->Simplexes,Extrude_Simplex_Phase3);
......@@ -473,7 +474,7 @@ static void Extrude_Curve (void *data , void *dum){
/* Numerotation automatique des entites physiques */
printf("Extruding Curve %d \n",c->Num);
for(i=0;i<NbLayer;i++){
SurfLayer[i] = (int)(1 * 1.e6) + (int)((i+1) * 1.e3) + c->Num ;
SurfLayer[i] = (int)(1 * K1) + (int)((i+1) * K2) + c->Num ;
}
for(i=0;i<List_Nbr(c->Vertices)-1;i++){
......@@ -515,7 +516,7 @@ static void Extrude_Point (void *data , void *dum){
/* Numerotation automatique des entites physiques */
printf("Extruding Vertex %d \n",v->Num);
for(i=0;i<NbLayer;i++){
LineLayer[i] = (int)(4 * 1.e6) + (int)((i+1) * 1.e3) + v->Num ;
LineLayer[i] = (int)(4 * K1) + (int)((i+1) * K2) + v->Num ;
}
if((pV2 = (Vertex**)Tree_PQuery(THEM->Vertices, pV))){
......
......@@ -379,11 +379,11 @@ Plane Surface(88) = {87};
// ----------------------------------------------------
// ----------------------------------------------------
L_ = 1000000 ;
S_ = 2000000 ;
V_ = 3000000 ;
P_ = 4000000 ;
N_ = 1000 ;
L_ = 100e6 ;
S_ = 200e6 ;
V_ = 300e6 ;
P_ = 400e6 ;
N_ = 1e6 ;
Physical Volume(1301) = {V_+N_+68}; // Rotor
......
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