git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@3642 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -98,17 +98,15 @@ RegIntersect::~RegIntersect()
|
||||
else inside = 0
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
int RegIntersect::match(double x, double y, double z)
|
||||
int RegIntersect::inside(double x, double y, double z)
|
||||
{
|
||||
int ilist;
|
||||
Region **regions = domain->regions;
|
||||
for (ilist = 0; ilist < nregion; ilist++)
|
||||
if (!regions[list[ilist]]->match(x,y,z)) break;
|
||||
|
||||
int inside = 0; // inside if matched all regions
|
||||
if (ilist == nregion) inside = 1;
|
||||
|
||||
return !(inside ^ interior); // 1 if same, 0 if different
|
||||
if (ilist == nregion) return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
@ -127,7 +125,7 @@ int RegIntersect::surface_interior(double *x, double cutoff)
|
||||
|
||||
for (ilist = 0; ilist < nregion; ilist++) {
|
||||
iregion = list[ilist];
|
||||
ncontacts = regions[iregion]->surface(x,cutoff);
|
||||
ncontacts = regions[iregion]->surface(x[0],x[1],x[2],cutoff);
|
||||
for (m = 0; m < ncontacts; m++) {
|
||||
xs = x[0] - regions[iregion]->contact[m].delx;
|
||||
ys = x[1] - regions[iregion]->contact[m].dely;
|
||||
@ -172,7 +170,7 @@ int RegIntersect::surface_exterior(double *x, double cutoff)
|
||||
|
||||
for (ilist = 0; ilist < nregion; ilist++) {
|
||||
iregion = list[ilist];
|
||||
ncontacts = regions[iregion]->surface(x,cutoff);
|
||||
ncontacts = regions[iregion]->surface(x[0],x[1],x[2],cutoff);
|
||||
for (m = 0; m < ncontacts; m++) {
|
||||
xs = x[0] - regions[iregion]->contact[m].delx;
|
||||
ys = x[1] - regions[iregion]->contact[m].dely;
|
||||
|
||||
Reference in New Issue
Block a user