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) {
118 _blockGeometry.getPhysR(physR, {iX, iY});
119 _indicator(inside, physR);
121 _blockGeometry.getPhysR(physR, {iX-1, iY});
122 _indicator(inside, physR);
125 _blockGeometry.getPhysR(physR, {iX, iY-1});
126 _indicator(inside, physR);
129 _blockGeometry.getPhysR(physR, {iX+1, iY});
130 _indicator(inside, physR);
133 _blockGeometry.getPhysR(physR, {iX, iY+1});
134 _indicator(inside, physR);
142 for (
int i=0; i<4; ++i) {
143 output[i]= ((T) counter[i]) * _latticeL;
144 total+= ((T) counter[i]) * _latticeL;
149 for (
int i=0; i<5; ++i) {