Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions phasta/phLinks.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,21 +98,21 @@ struct PhastaSharing : public apf::Sharing {

void getLinks(apf::Mesh* m, int dim, Links& links, BCs& bcs)
{
PhastaSharing shr(m);
PhastaSharing* shr = new PhastaSharing(m);
PCU_Comm_Begin();
apf::MeshIterator* it = m->begin(dim);
apf::MeshEntity* v;
while ((v = m->iterate(it))) {
apf::ModelEntity* me = m->toModel(v);
shr.isDG = ph::isInterface(m->getModel(),(gmi_ent*) me,bcs.fields["DG interface"]);
shr->isDG = ph::isInterface(m->getModel(),(gmi_ent*) me,bcs.fields["DG interface"]);
/* the alignment is such that the owner part's
array follows the order of its vertex iterator
traversal. The owner dictates the order to the
other part by sending remote copies */
if ( ! shr.isOwned(v))
if ( ! shr->isOwned(v))
continue;
apf::CopyArray remotes;
shr.getCopies(v, remotes);
shr->getCopies(v, remotes);
for (size_t i = 0; i < remotes.getSize(); ++i) {
/* in matching we may accumulate multiple occurrences
of the same master in the outgoing links array
Expand All @@ -131,6 +131,7 @@ void getLinks(apf::Mesh* m, int dim, Links& links, BCs& bcs)
links[LinkKey(0, peer)].push_back(v);
}
}
delete shr;
}

/* encode the local links into a big array of integers
Expand Down
5 changes: 5 additions & 0 deletions test/convert.cc
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,11 @@ void addFathersTag(pGModel simModel, pParMesh sim_mesh, apf::Mesh* simApfMesh, c
for(i=0; i< nvert ; i++) {
int* fatherIdPtr;
const int exists = EN_getDataPtr((pEntity)vrts[i],myFather,(void**)&fatherIdPtr);
if(!exists) {
if(!PCU_Comm_Self())
fprintf(stderr, "Error: father id data pointer does not exist... exiting\n");
exit(EXIT_FAILURE);
}
assert(exists);
fatherIds[i] = fatherIdPtr[0];
V_coord(vrts[i],coordFather[i]);
Expand Down