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

abs(Num) for triangles in UNV

parent 69409df5
Branches
Tags
No related merge requests found
// $Id: Print_Mesh.cpp,v 1.23 2001-06-25 13:30:57 remacle Exp $ // $Id: Print_Mesh.cpp,v 1.24 2001-08-02 07:26:38 geuzaine Exp $
#include "Gmsh.h" #include "Gmsh.h"
#include "Const.h" #include "Const.h"
...@@ -133,19 +133,14 @@ void add_msh_simplex (void *a, void *b){ ...@@ -133,19 +133,14 @@ void add_msh_simplex (void *a, void *b){
type = TETRAHEDRON; type = TETRAHEDRON;
} }
#if 1 // JF, je comprends pas !? if(type == TETRAHEDRON){
if(type == TETRAHEDRON) if ((*S)->Volume_Simplexe () < 0){
{ Vertex *temp;
if ((*S)->Volume_Simplexe () < 0){ temp = (*S)->V[0];
Vertex *temp; (*S)->V[0] = (*S)->V[1];
temp = (*S)->V[0]; (*S)->V[1] = temp;
(*S)->V[0] = (*S)->V[1];
(*S)->V[1] = temp;
// if ((*S)->Volume_Simplexe () < 0)
// Msg(WARNING, "Negative volume for simplex %d", (*S)->Num);
}
} }
#endif }
fprintf (mshfile, "%d %d %d %d %d", fprintf (mshfile, "%d %d %d %d %d",
MSH_ELEMENT_NUM++, type,MSH_PHYSICAL_NUM,(*S)->iEnt, nbn + nbs); MSH_ELEMENT_NUM++, type,MSH_PHYSICAL_NUM,(*S)->iEnt, nbn + nbs);
...@@ -479,7 +474,9 @@ int process_2D_elements (FILE * funv, Mesh * m){ ...@@ -479,7 +474,9 @@ int process_2D_elements (FILE * funv, Mesh * m){
} }
geo = s->Num; geo = s->Num;
fprintf (funv, "%10d%10d%10d%10d%10d%10d\n", fprintf (funv, "%10d%10d%10d%10d%10d%10d\n",
/*ELEMENT_ID++ */ sx->Num, fetyp, geo, geo, 7, n + nsup); /*ELEMENT_ID++ */ abs(sx->Num), fetyp, geo, geo, 7, n + nsup);
//'abs' since extrusion can tag triangles
// with a negative number
ntot = 0; ntot = 0;
for (k = 0; k < n; k++){ for (k = 0; k < n; k++){
fprintf (funv, "%10d", sx->V[k]->Num); fprintf (funv, "%10d", sx->V[k]->Num);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment