Question about Data Processing Functionals

Hi community,

Based on reading the PaLaBoS User Guide.

I am doing functional data to determine the wall shear stress in terms of non-equilibrium populations (Work by Timm Krüeger, 2009). This Functional is


template<typename T, template class Descriptor>
class WSSFunctional2D
: public BoxProcessingFunctional2D_L<T,Descriptor>
{ public:
WSSFunctional2D(MicrofluidicsParam const& parameters_)
: parameters(parameters_)
{ }
virtual void process(Box2D domain, BlockLattice2D<T,DESCRIPTOR>& lattice, ScalarField$
Dot2D offset = computeRelativeDisplacement(lattice, WSS);
for (plint iX=domain.x0; iX<=domain.x1; ++iX) {
for (plint iY=domain.y0; iY<=domain.y1; ++iY) {
Cell<T,Descriptor>& cell = lattice.get(iX,iY);
T rhoBar;
Array<T,2> j;
momentTemplates<T, DESCRIPTOR>::get_rhoBar_j(cell, rhoBar, j);
T jSqr = VectorTemplate<T,DESCRIPTOR>::normSqr(j);
// Wall Shear Stress
T sumShearWall = T();
for (plint iPop=0; iPop<DESCRIPTOR::q; iPop++){
T fEq = cell.getDynamics().computeEquilibrium(iPop, rhoBar, j, jSqr);
sumShearWall += (Descriptor::c[iPop][0])*(Descriptor::c[iPop][1])*(cell.get(iX+offset.x,iY+offset.y)[iPop]-fEq.get(iX+offset.x,iY+offset.y)[iPop]); }
WSS.get(iX,iY) = sumShearWall;
} } }
virtual WSSFunctional2D<T,Descriptor>* clone() const{
return new WSSFunctional2D<T,Descriptor>(*this); }
virtual void getTypeOfModification(std::vector<modif::ModifT>& modified) const {
modified[0] = modif::nothing;
modified[1] = modif::staticVariables; }
private:
MicrofluidicsParam parameters;
};
template<typename T, template<typename U> class Descriptor>
void compute_shear_stress_wall(MultiBlockLattice2D<T,DESCRIPTOR>& lattice, Box2D domain, MicrofluidicsParam const& parameters, ScalarField2D& shear_wall){
applyProcessingFunctional(new WSSFunctional2D<T,Descriptor>(parameters), domain, lattice, shear_wall); }

template<typename T, template<typename U> class Descriptor>
std::auto_ptr\<ScalarField2D\<T\> \> compute_shear_stress_wal(MultiBlockLattice2D<T,DESCRIPTOR>& lattice, Box2D domain, MicrofluidicsParam<T> const& parameters){
    ScalarField2D<T>* shear_wall = new ScalarField2D<T>(lattice.getNx(), lattice.getNy());
    compute_shear_stress_wall(lattice, domain, parameters, *shear_wall);
    return std::auto_ptr<ScalarField2D<T> >(shear_wall);    }

These lines are in my .cpp code, but when I try to write them

file <<“setprecision(16)<<” "<<compute_shear_stress_wall(*lattice, ya1, parameters)

I get


error: no matching function for call to ‘compute_shear_stress_wall(std::auto_ptr<plb::MultiBlockLattice2D<double, plb::descriptors::D2Q9Descriptor> >::element_type&, plb::Box2D&, plb::MicrofluidicsParam&)’
file<<setprecision(16)<<" "<< compute_shear_stress_wall(*lattice, ya1, parameters) <<std::endl; } }


Excuse the length of the message. Finally my question is, what is the error of calling the functional?

I really appreciate your attention, and thanks for your time and your suggestion.

First correction: include the letter l in the word wal

Typing error

template<typename T, template<typename U> class Descriptor>
std::auto_ptr\<ScalarField2D\<T\> \> compute_shear_stress_wall(MultiBlockLattice2D<T,DESCRIPTOR>& lattice, Box2D domain, MicrofluidicsParam<T> const& parameters){
    ScalarField2D<T>* shear_wall = new ScalarField2D<T>(lattice.getNx(), lattice.getNy());
    compute_shear_stress_wall(lattice, domain, parameters, *shear_wall);
    return std::auto_ptr<ScalarField2D<T> >(shear_wall);    }

Second correction: change this lines

Definition error

>Cell<T,Descriptor>& cell = lattice.get(iX+offset.x,iY+offset.y);

sumShearWall += (Descriptor::c[iPop][0])*(Descriptor::c[iPop][1])*(cell[iPop]-fEq); }