Skip to content

Commit

Permalink
Changes to parRCB interface (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
thilinarmtb authored Jul 20, 2020
1 parent bb51af9 commit 0cc6858
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/parRCB.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ void fparRCB_partMesh(int *part,double *vtx,int *nel,int *nv,
*err=parRCB_partMesh(part,vtx,*nel,*nv,options,c);
}

// vtx = [nel,nv,ndim]
int parRCB_partMesh(int *part,double *vtx,int nel,int nv,
int *options,MPI_Comm comm)
{
Expand All @@ -33,12 +34,18 @@ int parRCB_partMesh(int *part,double *vtx,int nel,int nv,

int ndim=(nv==8)?3:2;

int e, n;
int e,n,v;

for(e=0;e<nel;++e){
data[e].id=nelg_start+(e+1);
data[e].orig=rank;
for(int n=0;n<ndim;n++)
data[e].coord[n]=vtx[e*ndim+n];
data[e].coord[0]=data[e].coord[1]=data[e].coord[2]=0.0;
for(v=0;v<nv;v++){
for(n=0;n<ndim;n++)
data[e].coord[n]+=vtx[e*ndim*nv+v*ndim+n];
}
for(n=0;n<ndim;n++)
data[e].coord[n]/=8;
}
a.n=nel;

Expand Down

0 comments on commit 0cc6858

Please sign in to comment.