Memory overflow with dynamics object

Hi all,

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.

Hello,

I am not sur to understand what you are doing? Could your share maybe some pseudo code to illustrate what you mean?

Hello,

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.

Hi Kauraajn;
Have you figured out the solution. I am having the problem with dynamic memory as well. If you have solved the problem, could you please give me some hints?
Thank

Unfortunately I haven’t. I’m struggling with this for the past few months now. Any suggestions would be greatly appreciated.

The Dynamics are deleted in the attributeDynamics function so it should not be a problem. Are you sure it’s the Dynamics that is the problem?

1 Like