44 for (
int i=0; i<7; ++i) {
48 std::size_t counter[7] = {0};
50 if (!_indicatorF.isEmpty()) {
51 auto& blockGeometry = _indicatorF.getBlockGeometry();
56 for (
int iX = min[0]; iX <= max[0]; ++iX) {
57 for (
int iY = min[1]; iY <= max[1]; ++iY) {
58 for (
int iZ = min[2]; iZ <= max[2]; ++iZ) {
60 if (_indicatorF(iX, iY, iZ)) {
61 if (blockGeometry.getMaterial({iX-1, iY, iZ}) == 1) {
64 if (blockGeometry.getMaterial({iX, iY-1, iZ}) == 1) {
67 if (blockGeometry.getMaterial({iX, iY, iZ-1}) == 1) {
70 if (blockGeometry.getMaterial({iX+1, iY, iZ}) == 1) {
73 if (blockGeometry.getMaterial({iX, iY+1, iZ}) == 1) {
76 if (blockGeometry.getMaterial({iX, iY, iZ+1}) == 1) {
84 const T dx2 = _latticeL*_latticeL;
85 for (
int i=0; i<6; ++i) {
86 output[i] = (T) counter[i] * dx2;
87 output[6] += (T) counter[i] * dx2;
106 int counter[6] = {0,0,0,0,0,0};
109 if (_blockGeometry.getStatistics().getNvoxel(_material)!=0) {
110 const int x0 = _blockGeometry.getStatistics().getMinLatticeR(_material)[0];
111 const int y0 = _blockGeometry.getStatistics().getMinLatticeR(_material)[1];
112 const int z0 = _blockGeometry.getStatistics().getMinLatticeR(_material)[2];
113 const int x1 = _blockGeometry.getStatistics().getMaxLatticeR(_material)[0];
114 const int y1 = _blockGeometry.getStatistics().getMaxLatticeR(_material)[1];
115 const int z1 = _blockGeometry.getStatistics().getMaxLatticeR(_material)[2];
118 for (
int iX = x0; iX <= x1; ++iX) {
119 for (
int iY = y0; iY <= y1; ++iY) {
120 for (
int iZ = z0; iZ <= z1; ++iZ) {
122 _blockGeometry.getPhysR(physR, {iX, iY, iZ});
123 _indicator(inside, physR);
125 _blockGeometry.getPhysR(physR, {iX-1, iY, iZ});
126 _indicator(inside, physR);
130 _blockGeometry.getPhysR(physR, {iX, iY-1, iZ});
131 _indicator(inside, physR);
135 _blockGeometry.getPhysR(physR, {iX, iY, iZ-1});
136 _indicator(inside, physR);
140 _blockGeometry.getPhysR(physR, {iX+1, iY, iZ});
141 _indicator(inside, physR);
145 _blockGeometry.getPhysR(physR, {iX, iY+1, iZ});
146 _indicator(inside, physR);
150 _blockGeometry.getPhysR(physR, {iX, iY, iZ+1});
151 _indicator(inside, physR);
161 for (
int i=0; i<6; ++i) {
162 output[i]= ((T) counter[i]) * _latticeLsqr;
163 total+= ((T) counter[i]) * _latticeLsqr;
169 for (
int i=0; i<7; ++i) {