Skip to content

Commit

Permalink
Merging develop into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Nightly Bot authored and cwsmith committed Jun 11, 2019
2 parents 1e05215 + d430dc6 commit 14d2612
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmake/FindSimModSuite.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ string(REGEX REPLACE
"${SIM_VERSION}")

set(MIN_VALID_SIM_VERSION 11.0.170826)
set(MAX_VALID_SIM_VERSION 12.0.190413)
set(MAX_VALID_SIM_VERSION 14.0.190513)
if( (SIM_DOT_VERSION VERSION_LESS MIN_VALID_SIM_VERSION) OR
(SIM_DOT_VERSION VERSION_GREATER MAX_VALID_SIM_VERSION) )
MESSAGE(FATAL_ERROR
Expand Down
4 changes: 2 additions & 2 deletions mpich3-gcc4.9.2-config.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PREFIX=/lore/seol/mpich3-gcc4.9.2-install
SIM_VER=12.0-181124
SIM_ARCHOS=x64_rhel7_gcc48
SIM_VER=14.0-190513dev
SIM_ARCHOS=x64_rhel6_gcc44
PARMETIS_INSTALL_DIR=/usr/local/parmetis/4.0.3/mpich3.1.2
ZOLTAN_INSTALL_DIR=/lore/seol/mpich3-gcc4.9.2-install
cmake .. \
Expand Down
3 changes: 2 additions & 1 deletion pcu/pcu_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ static void compressed_write(pcu_file* pf, void const* data, size_t size)
int bzerror;
int len;
void* bzip2_is_not_const_correct;
PCU_ALWAYS_ASSERT(size < INT_MAX);
PCU_ALWAYS_ASSERT_VERBOSE(size < INT_MAX,
"partition the mesh further or disable bz2 mesh compression\n");
len = size;
bzip2_is_not_const_correct = (void*)data;
BZ2_bzWrite(&bzerror, pf->bzf, bzip2_is_not_const_correct, len);
Expand Down
1 change: 1 addition & 0 deletions pumi/pumi.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ pGeom pumi_geom_load (const char* fileName, const char* model_type="mesh",
void (*fp)(const char*)=NULL);
void pumi_geom_delete(pGeom g);
void pumi_geom_freeze(pGeom g); // shall be called after modifying model entities
void pumi_geom_createID(pGeom g); // generate sequential ID starting from 1
int pumi_geom_getNumEnt(pGeom g, int d);
pGeomEnt pumi_geom_findEnt(pGeom g, int d, int id);

Expand Down
10 changes: 9 additions & 1 deletion pumi/pumi_gentity.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,15 @@ int pumi_gent_getDim(pGeomEnt ge)

int pumi_gent_getID(pGeomEnt ge)
{
return gmi_tag(pumi::instance()->model->getGmi(), ge->getGmi());
pTag id_tag=pumi_geom_findTag(pumi::instance()->model, "ID");
if (id_tag)
{
int int_data;
pumi_gent_getIntTag (ge, id_tag, &int_data);
return int_data;
}
else
return gmi_tag(pumi::instance()->model->getGmi(), ge->getGmi());
}

void pumi_gent_getRevClas (pGeomEnt ge, std::vector<pMeshEnt>& ents)
Expand Down
18 changes: 18 additions & 0 deletions pumi/pumi_geom.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,15 @@ pGeom pumi_geom_load(const char* filename, const char* model_type, void (*geom_l

void pumi_geom_delete(pGeom g)
{
pTag id_tag=pumi_geom_findTag(g, "ID");

for (int i=0; i<4; ++i)
for (pGeomIter gent_it = g->begin(i); gent_it!=g->end(i);++gent_it)
{
if (id_tag) pumi_gent_deleteTag(*gent_it, id_tag);
delete *gent_it;
}
pumi_geom_deleteTag(g, id_tag);
}

void pumi_geom_freeze(pGeom g)
Expand All @@ -91,6 +97,18 @@ void pumi_geom_freeze(pGeom g)
}
}

void pumi_geom_createID(pGeom g) // ID starts from 1
{
pTag id_tag = pumi_geom_createTag(g, "ID", PUMI_INT, 1);
int id;
for (int i=0; i<4; ++i)
{
id=1;
for (pGeomIter gent_it = g->begin(i); gent_it!=g->end(i);++gent_it)
pumi_gent_setIntTag(*gent_it, id_tag, id++);
}
}

pGeomEnt pumi_geom_findEnt(pGeom g, int d, int id)
{
if (g->getGmi()->n[d]==0)
Expand Down

0 comments on commit 14d2612

Please sign in to comment.