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

*** empty log message ***

parent 77840b6b
No related branches found
No related tags found
No related merge requests found
No preview for this file type
......@@ -252,6 +252,7 @@ class BDS_Edge
public:
bool deleted;
int status;
int partition;
double target_length;
BDS_Point *p1,*p2;
BDS_GeomEntity *g;
......@@ -309,7 +310,7 @@ public:
inline void oppositeof (BDS_Point * oface[2]) const;
BDS_Edge ( BDS_Point *A, BDS_Point *B )
: deleted(false), status(0),target_length(1.0),g(0)
: deleted(false), status(0),partition(0),target_length(1.0),g(0)
{
if (*A < *B)
{
......@@ -331,6 +332,7 @@ class BDS_Triangle
public:
bool deleted;
int status;
int partition;
BDS_Tet *t1,*t2;
BDS_Edge *e1,*e2,*e3;
BDS_Vector NORMAL;
......@@ -402,7 +404,7 @@ public:
}
BDS_Triangle ( BDS_Edge *A, BDS_Edge *B, BDS_Edge *C)
: deleted (false) , status(0), t1(0),t2(0),e1(A),e2(B),e3(C),g(0)
: deleted (false) , status(0), partition(0),t1(0),t2(0),e1(A),e2(B),e3(C),g(0)
{
e1->addface(this);
e2->addface(this);
......@@ -416,6 +418,7 @@ class BDS_Tet
public:
bool deleted;
int status;
int partition;
BDS_Triangle *f1,*f2,*f3,*f4;
double volume;
inline double V() const {return volume;}
......@@ -445,7 +448,7 @@ public:
}
BDS_Tet ( BDS_Triangle *A, BDS_Triangle *B, BDS_Triangle *C, BDS_Triangle *D)
: deleted (false) , status(0), f1(A),f2(B),f3(C),f4(D),g(0)
: deleted (false) , status(0), partition(0),f1(A),f2(B),f3(C),f4(D),g(0)
{
f1->addtet(this);
f2->addtet(this);
......
// $Id: DiscreteSurface.cpp,v 1.24 2005-09-07 14:36:45 remacle Exp $
// $Id: DiscreteSurface.cpp,v 1.25 2005-09-07 17:12:16 remacle Exp $
//
// Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
//
......@@ -233,7 +233,7 @@ void BDS_To_Mesh_2(Mesh *m)
if(s)
{
simp->iEnt = g->classif_tag;
simp->iPart = addMeshPartition((*it)->status, m);
simp->iPart = addMeshPartition((*it)->partition, m);
}
else
printf("impossible to find surface %d\n",g->classif_tag);
......@@ -258,7 +258,7 @@ void BDS_To_Mesh_2(Mesh *m)
if(v)
{
simp->iEnt = g->classif_tag;
simp->iPart = addMeshPartition((*it)->status, m);
simp->iPart = addMeshPartition((*it)->partition, m);
}
else
printf("argh\n");
......
......@@ -67,9 +67,9 @@ void PartitionMesh ( Mesh *M , int NP)
M->bds_mesh = new BDS_Mesh (*M->bds);
BDS_To_Mesh_2(M);
delete M->bds;
delete M->bds_mesh;
// delete M->bds_mesh;
M->bds = 0;
M->bds_mesh = 0;
//M->bds_mesh = 0;
SetBoundingBox();
}
......@@ -98,7 +98,7 @@ void PartitionMesh ( BDS_Mesh *m , int NP)
if (dim == 2)
{
BDS_Triangle *t = *it2;
t->status = i;
t->partition = i;
++it2;
nbAdj = (t->e1->numfaces() + t->e2->numfaces() + t->e3->numfaces() - 3);
totCount += nbAdj;
......@@ -106,7 +106,7 @@ void PartitionMesh ( BDS_Mesh *m , int NP)
else if (dim == 3)
{
BDS_Tet *t = *it3;
t->status = i;
t->partition = i;
++it3;
nbAdj =(t->f1->numtets() + t->f2->numtets() + t->f3->numtets() + t->f4->numtets() - 4);
totCount += nbAdj;
......@@ -131,17 +131,17 @@ void PartitionMesh ( BDS_Mesh *m , int NP)
for (int j=0;j<t->e1->numfaces();j++)
{
BDS_Triangle *f = t->e1->faces(j);
if (f != t) adjncy[count++] = f->status;
if (f != t) adjncy[count++] = f->partition;
}
for (int j=0;j<t->e2->numfaces();j++)
{
BDS_Triangle *f = t->e2->faces(j);
if (f != t) adjncy[count++] = f->status;
if (f != t) adjncy[count++] = f->partition;
}
for (int j=0;j<t->e3->numfaces();j++)
{
BDS_Triangle *f = t->e3->faces(j);
if (f != t) adjncy[count++] = f->status;
if (f != t) adjncy[count++] = f->partition;
}
++it2;
}
......@@ -149,13 +149,13 @@ void PartitionMesh ( BDS_Mesh *m , int NP)
{
BDS_Tet *t = *it3;
BDS_Tet *o = t->f1->opposite_tet (t);
if (o) adjncy[count++] = o->status;
if (o) adjncy[count++] = o->partition;
o = t->f2->opposite_tet (t);
if (o) adjncy[count++] = o->status;
if (o) adjncy[count++] = o->partition;
o = t->f3->opposite_tet (t);
if (o) adjncy[count++] = o->status;
if (o) adjncy[count++] = o->partition;
o = t->f4->opposite_tet (t);
if (o) adjncy[count++] = o->status;
if (o) adjncy[count++] = o->partition;
++it3;
}
}
......@@ -179,13 +179,13 @@ void PartitionMesh ( BDS_Mesh *m , int NP)
if (dim == 2)
{
BDS_Triangle *t = *it2;
t->status = partitionVector[i];
t->partition = partitionVector[i];
++it2;
}
else if (dim == 3)
{
BDS_Tet *t = *it3;
t->status = partitionVector[i];
t->partition = partitionVector[i];
++it3;
}
}
......
# $Id: Makefile,v 1.1 2005-09-07 17:12:16 remacle Exp $
#
# Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.
#
# Please report all bugs and problems to <gmsh@geuz.org>.
include ../variables
LIB = ../lib/libGmshMetis.a
INCLUDE = -I.
CFLAGS = ${OPTIM} ${FLAGS} ${INCLUDE} -DNO_PARALLEL_THREADS -UWIN32
SRC = balance.c \
fm.c \
kwayfm.c \
mcoarsen.c \
minitpart2.c \
mpmetis.c \
pmetis.c \
subdomains.c\
bucketsort.c \
fortran.c \
kwayrefine.c\
memory.c \
minitpart.c \
mrefine2.c\
pqueue.c\
timing.c\
ccgraph.c \
frename.c \
kwayvolfm.c\
mesh.c\
mkmetis.c\
mrefine.c \
refine.c \
util.c\
coarsen.c \
graph.c\
kwayvolrefine.c \
meshpart.c \
mkwayfmh.c \
mutil.c \
separator.c\
compress.c\
initpart.c\
match.c\
mfm2.c \
mkwayrefine.c\
myqsort.c\
sfm.c\
debug.c \
kmetis.c \
mbalance2.c\
mfm.c \
mmatch.c \
ometis.c \
srefine.c\
estmem.c \
kvmetis.c\
mbalance.c \
mincover.c \
mmd.c \
parmetis.c \
stat.c
OBJ = ${SRC:.c=.o}
.SUFFIXES: .o .c
${LIB}: ${OBJ}
${AR} ${LIB} ${OBJ}
${RANLIB} ${LIB}
.c.o:
${CC} ${CFLAGS} -c $< -o ${<:.c=.o}
clean:
rm -f src/*.o
depend:
(sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \
${CXX} -MM ${CFLAGS} ${SRC} \
) >Makefile.new
cp Makefile Makefile.bak
cp Makefile.new Makefile
rm -f Makefile.new
# DO NOT DELETE THIS LINE
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment