Skip to content

Reply To: How to create complex 2D geometry stucture


Hey Adrian, good morning!

I am advancing with my research thanks to you and open LB, I’m so grateful!
However, right now I’m stuck with the Doxygen Documentation. The type of definition I used for the “IndicatorCuboid2D” is described in the line 78 of indicatorF2D.hh, using center, xlength, ylength and theta.
My doubt is: In this definition, there are only 2 lines of code and we only define the Maximum and the Minimum values for X and Y, uniting these points with straight lines to create a square. Is it possible for me to change these straight lines to curvy lines with a cossene function? Where should I include it in the code? I’ve tried some unsuccessful syntaxes, but couldn’t make it work in any way.
Here is the original code for the IndicatorCuboid2D:

78 IndicatorCuboid2D<S>::IndicatorCuboid2D(S xLength, S yLength, Vector<S,2> center, S theta )
79 : _center(center), _xLength(xLength), _yLength(yLength), _theta(-theta)
80 {
81 this->_myMin = {_center[0] – _xLength/2., _center[1] – _yLength/2.};
82 this->_myMax = {_center[0] + _xLength/2., _center[1] + _yLength/2.};
83 }