Skip to content

AnalyticalLinear2D Functor Syntax Query

OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB General Topics AnalyticalLinear2D Functor Syntax Query

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #5903
    achodankar
    Participant

    Hello Developers,
    I have a question regarding the analyticallinear2D functor. I don’t understand how is the expression formed by passing the three parameters to the rho functor. What does each parameter represent?

    AnalyticalLinear2D<T,T> rho( -p0/lx*invCs2<T,DESCRIPTOR>(), 0, p0*invCs2<T,DESCRIPTOR>()+1 );

    Code snippet:

    template <typename T, typename S>
    AnalyticalLinear2D<T,S>::AnalyticalLinear2D(T a, T b, T c)
    : AnalyticalF2D<T,S>(1), _a(a), _b(b), _c(c)
    {
    this->getName() = “linear”;
    }

    I understand this might be a trivial question. I would really appreciate your help in this matter.

    Thank you.

    Yours sincerely,

    Abhijeet C.

    #5907
    jjessberger
    Participant

    Hello Abhijeet,

    The three arguments are the coefficients of the desired linear function. This (and their particular role) can be seen in the implementation of the AnalyticalLinear2D<T,S>::operator() method (src/functors/analytical/analyticalF.hh::395):
    > output[0]=_a*x[0] + _b*x[1] + _c;

    Yours,
    Julius J.

    #5908
    achodankar
    Participant

    Hello Julius,
    Thank you for your prompt response. I understand it now.

    Thank you.

    Yours sincerely,

    Abhijeet C.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.