Skip to content

Commit

Permalink
The packer compiles. Will eventually provide bcast/reduce on tags.
Browse files Browse the repository at this point in the history
Signed-off-by: Jed Brown <jed@59A2.org>
  • Loading branch information
jedbrown committed Sep 17, 2008
1 parent 021ca12 commit b56f9c1
Show file tree
Hide file tree
Showing 10 changed files with 498 additions and 192 deletions.
2 changes: 1 addition & 1 deletion include/dohpfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ typedef struct _p_dFS *dFS;
extern PetscCookie dFS_COOKIE;

EXTERN dErr dFSCreate(MPI_Comm,dFS*);
EXTERN dErr dFSSetMesh(dFS,dMesh,dMeshESH,dMeshTag); /* mesh, active set, partition tag */
EXTERN dErr dFSSetMesh(dFS,dMesh,dMeshESH); /* mesh, active set */
EXTERN dErr dFSSetRuleTag(dFS,dJacobi,dMeshTag);
EXTERN dErr dFSSetDegree(dFS,dJacobi,dMeshTag);
EXTERN dErr dFSAddBdy(dFS,const char*,dMeshESH,dMeshTag,dBool,PF); /* name, facets, orientation tag, flip orientation?, normal -> constraints */
Expand Down
6 changes: 6 additions & 0 deletions include/dohpmesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ extern dErr dMeshListEHView(MeshListEH*,const char*);
extern dErr dMeshOrientLoopBounds_Quad(dGeomOrient orient, const dInt *size, DohpLoopBounds *l);
extern dErr dMeshOrientLoopBounds_Line(dGeomOrient orient, const dInt *size, DohpLoopBounds *l);

typedef struct _p_dMeshPacker *dMeshPacker;
typedef struct p_dMesh *dMesh;

EXTERN dErr dMeshGetLocalNodeNumbering(dMesh,dInt,dInt*,dInt*);
Expand All @@ -100,5 +101,10 @@ EXTERN dErr dMeshCreateRuleTagIsotropic(dMesh,dMeshESH,dJacobi,const char*,dInt,
EXTERN dErr dMeshDestroyRuleTag(dMesh,dMeshTag);
EXTERN dErr dMeshGetInstance(dMesh,iMesh_Instance*);


EXTERN dErr dMeshCreateMPITypes(void);
EXTERN dErr dMeshTagBcast(dMesh mesh,dMeshTag tag);
EXTERN dErr dMeshPackerCreate(dMesh mesh,dMeshPacker *inpack);

PETSC_EXTERN_CXX_END
#endif
5 changes: 5 additions & 0 deletions include/dohptype.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ typedef iBase_EntityHandle dMeshEH;
typedef iBase_TagHandle dMeshTag;
typedef iBase_EntitySetHandle dMeshESH;

/* ITAPS data types */
typedef int dIInt;
typedef double dIReal;
typedef char dIByte;

#define dCHK(err) CHKERRQ(err);
#define dERROR(n,...) {return PetscError(__LINE__,__FUNCT__,__FILE__,__SDIR__,n,1,__VA_ARGS__);}
Expand All @@ -45,6 +49,7 @@ typedef iBase_EntitySetHandle dMeshESH;
#define dFree(a) PetscFree(a)
#define dNewM(n,t,p) (dMalloc((n)*sizeof(t),(p)) || dMemzero(*(p),(n)*sizeof(t)))
#define dMallocM(n,t,p) (dMalloc((n)*sizeof(t),(p)))
#define dCalloc(n,p) (dMalloc((n),(p)) || dMemzero(*(p),(n)))

#define dValidPointer2(a,b,c,d) (dValidPointer((a),(b)) || dValidPointer((c),(d)))
#define dValidPointer3(a,b,c,d,e,f) (dValidPointer2((a),(b),(c),(d)) || dValidPointer((e),(f)))
Expand Down
1 change: 1 addition & 0 deletions include/private/dohpimpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ struct _dMeshOps {

struct p_dMesh {
PETSCHEADER(struct _dMeshOps);
dMeshPacker pack;
iMesh_Instance mi;
iBase_EntitySetHandle root;
MeshListEH v,e,f,r; /* vertices, edges, faces, vertices */
Expand Down
6 changes: 0 additions & 6 deletions include/private/fsimpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ struct dFSBoundary {
struct dFSBoundary *next;
};

struct dMeshInterface {
int rank;
dMeshESH owned,remote;
UT_hash_handle hh;
};

struct _dFSOps {
DMOPS(dFS)
dErr (*setfromoptions)(dFS);
Expand Down
2 changes: 1 addition & 1 deletion src/fs/impls/cont/cont.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ static dErr dFSContPropogateDegree(dFS fs)

dFunctionBegin;
err = dMeshGetInstance(fs->mesh,&mi);dCHK(err);
iMesh_get
//iMesh_get
iMesh_getEntArrAdj(mi,fs->r.v,fs->r.s,iBase_FACE,&rf.v,&rf.a,&rf.s,&rfo.v,&rfo.a,&rfo.s,&err);dICHK(mi,err);
/* orient faces with respect to regions, propogate anisotropic degree */
#warning much to do here
Expand Down
5 changes: 2 additions & 3 deletions src/fs/interface/fs.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "private/fsimpl.h"

dErr dFSSetMesh(dFS fs,dMesh mesh,dMeshESH active,dMeshTag partition)
dErr dFSSetMesh(dFS fs,dMesh mesh,dMeshESH active)
{
dMesh qmesh;
dErr err;
Expand All @@ -14,7 +14,6 @@ dErr dFSSetMesh(dFS fs,dMesh mesh,dMeshESH active,dMeshTag partition)
}
fs->mesh = mesh;
fs->active = active;
fs->partition = partition;
dFunctionReturn(0);
}

Expand Down Expand Up @@ -121,6 +120,7 @@ dErr dFSDestroy(dFS fs)
dErr dFSBuildSpace(dFS fs)
{
dMesh mesh = fs->mesh;
iMesh_Instance mi;
dErr err;

dFunctionBegin;
Expand All @@ -130,7 +130,6 @@ dErr dFSBuildSpace(dFS fs)
*
*/
err = dMeshGetInstance(mesh,&mi);dCHK(err);
err = dMeshGetInterface(mesh,fs->active,&fs->iface);dCHK(err);
if (fs->ops->buildspace) {
err = (*fs->ops->buildspace)(fs);dCHK(err);
}
Expand Down
2 changes: 1 addition & 1 deletion src/interface/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ALL: lib

CFLAGS =
FFLAGS =
SOURCEC = dohp.c mesh.c
SOURCEC = dohp.c mesh.c reduce.c
SOURCEF =
SOURCEH =
OBJSC = $(SOURCEC:.c=.o)
Expand Down
1 change: 1 addition & 0 deletions src/interface/mesh.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ dErr dMeshCreate(MPI_Comm comm,dMesh *inm)
err = PetscObjectChangeTypeName((PetscObject)m,"iMesh");dCHK(err);
iMesh_newMesh("",&m->mi,&err,0);ICHKERRQ(m->mi,err);
err = PetscMemcpy(m->ops,&dfltOps,sizeof(dfltOps));dCHK(err);
err = dMeshPackerCreate(m,&m->pack);dCHK(err);
*inm = m;
dFunctionReturn(0);
}
Expand Down

0 comments on commit b56f9c1

Please sign in to comment.