44 for (
int i=0; i<5; ++i) {
48 std::size_t counter[5] = {0};
50 if (!_indicatorF.isEmpty()) {
51 const auto& blockGeometry = _indicatorF.getBlockGeometry();
56 for (
int iX = min[0]; iX <= max[0]; ++iX) {
57 for (
int iY = min[1]; iY <= max[1]; ++iY) {
59 if (_indicatorF(iX, iY)) {
60 if (blockGeometry.getMaterial({iX-1, iY}) == 1) {
63 if (blockGeometry.getMaterial({iX, iY-1}) == 1) {
66 if (blockGeometry.getMaterial({iX+1, iY}) == 1) {
69 if (blockGeometry.getMaterial({iX, iY+1}) == 1) {
76 const T dx2 = _latticeL*_latticeL;
78 for (
int i=0; i<4; ++i) {
79 output[i] = (T) counter[i] * dx2;
80 total+= (T) counter[i] * dx2;
85 for (
int i=0; i<5; ++i) {
105 int counter[4] = {0,0,0,0};
108 if (_blockGeometry.getStatistics().getNvoxel(_material)!=0) {
109 const int x0 = _blockGeometry.getStatistics().getMinLatticeR(_material)[0];
110 const int y0 = _blockGeometry.getStatistics().getMinLatticeR(_material)[1];
111 const int x1 = _blockGeometry.getStatistics().getMaxLatticeR(_material)[0];
112 const int y1 = _blockGeometry.getStatistics().getMaxLatticeR(_material)[1];
115 for (
int iX = x0; iX <= x1; ++iX) {
116 for (
int iY = y0; iY <= y1; ++iY) {
119 physR = _blockGeometry.getPhysR(latticeR);
120 _indicator(inside, physR.
data());
122 physR = _blockGeometry.getPhysR({iX-1, iY});
123 _indicator(inside, physR.
data());
127 physR = _blockGeometry.getPhysR({iX, iY-1});
128 _indicator(inside, physR.
data());
132 physR = _blockGeometry.getPhysR({iX+1, iY});
133 _indicator(inside, physR.
data());
137 physR = _blockGeometry.getPhysR({iX, iY+1});
138 _indicator(inside, physR.
data());
147 for (
int i=0; i<4; ++i) {
148 output[i]= ((T) counter[i]) * _latticeL;
149 total+= ((T) counter[i]) * _latticeL;
154 for (
int i=0; i<5; ++i) {