~ubuntu-branches/debian/sid/lammps/sid

« back to all changes in this revision

Viewing changes to src/region_intersect.cpp

  • Committer: Package Import Robot
  • Author(s): Anton Gladky
  • Date: 2015-04-29 23:44:49 UTC
  • mfrom: (5.1.3 experimental)
  • Revision ID: package-import@ubuntu.com-20150429234449-mbhy9utku6hp6oq8
Tags: 0~20150313.gitfa668e1-1
Upload into unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
    list[nregion++] = iregion;
49
49
  }
50
50
 
51
 
  // this region is variable shape if any of sub-regions are
 
51
  // this region is variable shape or dynamic if any of sub-regions are
52
52
 
53
53
  Region **regions = domain->regions;
54
 
  for (int ilist = 0; ilist < nregion; ilist++)
 
54
  for (int ilist = 0; ilist < nregion; ilist++) {
55
55
    if (regions[list[ilist]]->varshape) varshape = 1;
 
56
    if (regions[list[ilist]]->dynamic) dynamic = 1;
 
57
  }
56
58
 
57
59
  // extent of intersection of regions
58
60
  // has bounding box if interior and any sub-region has bounding box
128
130
}
129
131
 
130
132
/* ----------------------------------------------------------------------
131
 
   return 1 if region is dynamic, 0 if static
132
 
   dynamic if any sub-region is dynamic, else static
133
 
------------------------------------------------------------------------- */
134
 
 
135
 
int RegIntersect::dynamic_check()
136
 
{
137
 
  Region **regions = domain->regions;
138
 
  for (int ilist = 0; ilist < nregion; ilist++)
139
 
    if (regions[list[ilist]]->dynamic_check()) return 1;
140
 
  return 0;
141
 
}
142
 
 
143
 
/* ----------------------------------------------------------------------
144
133
   inside = 1 if x,y,z is match() with all sub-regions
145
134
   else inside = 0
146
135
------------------------------------------------------------------------- */
253
242
  for (int ilist = 0; ilist < nregion; ilist++)
254
243
    regions[list[ilist]]->shape_update();
255
244
}
 
245
 
 
246
/* ----------------------------------------------------------------------
 
247
   move/rotate all sub-regions
 
248
------------------------------------------------------------------------- */
 
249
 
 
250
void RegIntersect::pretransform()
 
251
{
 
252
  Region **regions = domain->regions;
 
253
  for (int ilist = 0; ilist < nregion; ilist++)
 
254
    regions[list[ilist]]->pretransform();
 
255
}