Skip to content

Commit

Permalink
Minor fixes from the tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
prj- committed Dec 7, 2023
1 parent c7d1d70 commit a671c19
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions idp/macro_ddm.idp
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,7 @@ IFMACRO(ThName#RefinementFactor)
int privateS = ThName#RefinementFactor;
ENDIFMACRO
IFMACRO(ThName#Overlap)
assert(ThName#Overlap > 0);
meshN privateBorder;
buildOverlap(ThName, privateBorder, -111111, privateS, ThName#Overlap, intersection, privateDmesh#ThName#khi[0], P1, ThName#Comm, false);
ENDIFMACRO
Expand Down
10 changes: 6 additions & 4 deletions plugin/seq/scotch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ AnyType SCOTCH_Op< T, V, K >::operator( )(Stack stack) const {

int nve = T::RdHat::d + 1;
long lpart = GetAny< long >((*lpartition)(stack));
ffassert(lpart > 1 && part->n == nt && lpart < nt);
ffassert(lpart > 0 && part->n == nt && lpart < nt);
if(lpart == 1) {
*part = 0.0;
return 0L;
}

KN< long > *weight = nargs[0] ? GetAny< KN< long > * >((*nargs[0])(stack)) : (KN< long > *)0;

Expand Down Expand Up @@ -140,9 +144,7 @@ AnyType SCOTCH_Op< T, V, K >::operator( )(Stack stack) const {
SCOTCH_stratExit(&StratSCOTCH);
*part = epart;
delete[] verttab;
if (velotab) {
delete[] velotab;
}
delete[] velotab;

return 0L;
}
Expand Down

0 comments on commit a671c19

Please sign in to comment.