I would like to calculate the average density in a specific material of a 2D simulation.
In 3D it was possible to use the superAverage3D function to find the average, but the equivalant for 2D seems to be missing.
Is there another way that I have missed?
If not, would it be possible to copy paste the 3D code and convert it to 2D by taking out the last dimension?
I saw that SuperAverage3D calls BlockAverage3D calls BlockSum3D. Copying and making a SuperAverage2D and BlockAverage2D and removing a dimension seems simple enough, however the only BlockSum2D class I found is empty (i.e. output is 0) and is located in a different file location ( BlockSum3D is in lattice\integral\blockIntegralF3D and BlockSum2D is in lattice\blockLatticeIntegral2D). Would copying the BlockSum3D into the BlockSum2D and removing the dimension be enough?
Unfortunately, the functor you are looking for is indeed not implemented at the moment. Currently, I see two ways of handling this:
1. Porting SuperAverage3D and other necessary functors into 2D, as you already mentioned. For this, it should be sufficient to copy the 3d version and remove the last dimension, you are right.
2. Trying the SuperLocalAverage2D (see doxygen). This only limits the checked cells even further with a circle. However, a big radius will include your whole indicator and might work like a SuperAverage2D.
If you need any assistance, please let me now.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.