I am running an application where the location of bounce-back nodes in my domain keep changing (information about these bounce-back nodes are obtained from another coupled solver).
Anyway, because my bounce-back nodes once initialized on a lattice cannot be de-initialized, I am having to create a new MultiBlockLattice each time I run my LB solver. Although I take care to delete my dynamically allocated lattice after each LB calculation, I realize I am still initializing my dynamics objects using new and I was wondering if there is a way to initialize them without using the new operator each time.
I am simulating flow past an ensemble of rigid particles in a rectangular channel.
The location of these rigid particles vary with time. I want to specify no slip boundary conditions at the surfaces of these rigid particles.
I am modifying the example provided in the palabos user manual, which suggests a DomainFunctional approach that looks like this:
defineDynamics( lattice, lattice.getBoundingBox(), new CylinderShapeDomain2D(cx, cy, radius), new BounceBack<T,DESCRIPTOR> );
This method makes use of the keyword “new” but there is no subsequent delete to deallocate this memory.
Since the location of my bounceback nodes change with time due to change in particle positions, I am having to generate a fresh multiblock for each LB run that I do. This results in multiple “new” memory allocations associated with specifying my bounceback nodes for each time step.