git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@9301 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2013-01-18 20:55:26 +00:00
parent 746deead15
commit 35769609d9
5 changed files with 61 additions and 7 deletions

View File

@ -42,10 +42,14 @@ RegIntersect::RegIntersect(LAMMPS *lmp, int narg, char **arg) :
list[nregion++] = iregion;
}
// extent of intersection of regions
// has bounding box if interior and any sub-region has bounding box
// this region is variable shape if any of sub-regions are
Region **regions = domain->regions;
for (int ilist = 0; ilist < nregion; ilist++)
if (regions[list[ilist]]->varshape) varshape = 1;
// extent of intersection of regions
// has bounding box if interior and any sub-region has bounding box
bboxflag = 0;
for (int ilist = 0; ilist < nregion; ilist++)
@ -91,6 +95,16 @@ RegIntersect::~RegIntersect()
delete [] contact;
}
/* ---------------------------------------------------------------------- */
void RegIntersect::init()
{
Region::init();
Region **regions = domain->regions;
for (int ilist = 0; ilist < nregion; ilist++)
regions[list[ilist]]->init();
}
/* ----------------------------------------------------------------------
return 1 if region is dynamic, 0 if static
dynamic if any sub-region is dynamic, else static
@ -206,3 +220,14 @@ int RegIntersect::surface_exterior(double *x, double cutoff)
return n;
}
/* ----------------------------------------------------------------------
change region shape of all sub-regions
------------------------------------------------------------------------- */
void RegIntersect::shape_update()
{
Region **regions = domain->regions;
for (int ilist = 0; ilist < nregion; ilist++)
regions[list[ilist]]->shape_update();
}