Problem with parallelism and new dynamic class (SOLVED)

I implement a new dynamic class, this class is to work with a local parameter omega.

template<typename T, template<typename U> class Descriptor>
class My_Dynamics : public IsoThermalBulkDynamics<T,Descriptor> {
/* *************** Construction / Destruction ************************ */
My_Dynamics(T omega0_, T Atransition_, T NNNN_);
My_Dynamics(HierarchicUnserializer& unserializer);
virtual My_Dynamics<T,Descriptor>* clone() const;   
virtual int getId() const;
virtual void serialize(HierarchicSerializer& serializer) const;
virtual void unserialize(HierarchicUnserializer& unserializer);
virtual void collide(Cell<T,Descriptor>& cell,
                     BlockStatistics& statistics_);
virtual void collideExternal(Cell<T,Descriptor>& cell, T rhoBar, T rholocal, Array<T,Descriptor<T>::d> const& j, Array<T,Descriptor<T>::d> const& j,
                     T thetaBar, BlockStatistics& stat);
virtual T computeEquilibrium(plint iPop, T rhoBar, Array<T,Descriptor<T>::d> const& j, T jSqr, T thetaBar=T()) const;
virtual void setOmega(T omega_);
virtual T getOmega() const;
virtual T getDynamicParameter(plint whichParameter, Cell<T,Descriptor> const& cell) const;

Initially I implemented the dynamics as (it worked but did not change the omega locally)

#define Dynamics My_Dynamics<T,DESCRIPTOR>(Omega0,alpha,NNNN)

Therefore, since it didn’t work I implement this as

#define Dynamics (My_Dynamics<T,DESCRIPTOR>(Omega0,alpha,NNNN), *lattice, lattice.getBoundingBox())

but when I compile it found this error

    error: ‘class std::auto_ptr<plb::MultiBlockLattice2D<double,plb::descriptors::ForcedD2Q9Descriptor> >
    ’has no member named ‘getBoundingBox’ 
    dynamics<T,DESCRIPTOR>(Omega0, alpha, NNNN), lattice, lattice.getBoundingBox())
    note: in definition of macro ‘Dynamics’
    dynamics<T,DESCRIPTOR>(Omega0, alpha, NNNN), lattice, lattice.getBoundingBox())`
>                                                                 ^~~~~~~~~~~~~~

I was reading some post, Bounceback problem with parallelism after implementation of a new dynamic class [solved]

I saw that the possible problem is because I parallelized my code but not the new dynamic class.

Can someone please tell me how to implement a new dynamic class with parallelism?

Problem solved. I fixed the code in two ways.

The first was in the function “define dynamics” as

#define Dynamics 



The second was in the parameters of the defineDynamics function

My_Dynamics<T,DESCRIPTOR>(Omega0,alpha,NNNN), *lattice, lattice.getBoundingBox()


*lattice, lattice->getBoundingBox(),My_Dynamics<T,DESCRIPTOR>(Omega0,alpha,NNNN)

In case it can help someone else, here is correct code,

defineDynamics(*lattice, lattice->getBoundingBox(),My_dynamics)