Skip to content

velocity component

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1934
    Mamin
    Member

    Hello,
    I’m using SuperLatticePhysVelocity2D<T,DESCRIPTOR> velocity( sLattice, converter ); and AnalyticalFfromSuperLatticeF2D<T, DESCRIPTOR> intpolateVelocity( velocity, true ); to get the velocity at a given x, y coordinates. However, the velocity should have 2 component x and y but I’m getting one value. How do I get the 2 component of the velocity?
    Thanks

    #2700
    robin.trunk
    Keymaster

    Hi,

    what is your goal? Do you want to know the velocity at a specific point? In this case the code below should work:

    SuperLatticePhysVelocity3D<T, DESCRIPTOR> velocity(sLattice, converter);
    AnalyticalFfromSuperF3D<T> intpolateVelocity( velocity, true );
    T v1[3];
    intpolateVelocity( v1,point1 );

    Here point1 is an array of T, for example
    T point1[3] = {1., 0., 0.};

    The code for 2D should be analogue.

    Best
    Robin

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