WarpX
Public Member Functions | Public Attributes | List of all members
GetVelocity Struct Reference

#include <GetVelocity.H>

Public Member Functions

 GetVelocity (VelocityProperties const &vel) noexcept
 Construct the functor with information provided by vel. More...
 
AMREX_GPU_HOST_DEVICE amrex::Real operator() (amrex::Real const x, amrex::Real const y, amrex::Real const z) const noexcept
 Functor call. Returns the value of velocity at the location (x,y,z) More...
 
AMREX_GPU_HOST_DEVICE int direction () const noexcept
 Returns the index of the direction of the bulk velocity. More...
 

Public Attributes

VelocityInitType m_type
 
int m_dir
 
int m_sign_dir
 Index x=0, y=1, z=2. More...
 
amrex::Real m_velocity {0}
 Sign of the velocity direction positive=1, negative=-1. More...
 
amrex::ParserExecutor< 3 > m_velocity_parser
 

Detailed Description

Get velocity at a point on the grid

Class to get velocity at a point on the grid, either constant (m_velocity) or a spatially varying value computed using the parser function (m_velocity_parser). It also stores the direction of the velocity field. It provides the velocity information held by the VelocityProperties instance passed to the constructor.

Constructor & Destructor Documentation

◆ GetVelocity()

GetVelocity::GetVelocity ( VelocityProperties const &  vel)
noexcept

Construct the functor with information provided by vel.

Parameters
[in]velconst reference to the VelocityProperties object that will be used to populate the functor

Member Function Documentation

◆ direction()

AMREX_GPU_HOST_DEVICE int GetVelocity::direction ( ) const
inlinenoexcept

Returns the index of the direction of the bulk velocity.

Returns
index of direction of velocity. 0: x 1: y 2: z

◆ operator()()

AMREX_GPU_HOST_DEVICE amrex::Real GetVelocity::operator() ( amrex::Real const  x,
amrex::Real const  y,
amrex::Real const  z 
) const
inlinenoexcept

Functor call. Returns the value of velocity at the location (x,y,z)

Parameters
[in]xx-coordinate of given location
[in]yy-coordinate of given location
[in]zz-cooridnate of given location
Returns
value of velocity at (x,y,z). m_velocity if m_type is VelConstantValue m_velocity_parser(x,y,z) if m_type is VelParserFunction

Member Data Documentation

◆ m_dir

int GetVelocity::m_dir

◆ m_sign_dir

int GetVelocity::m_sign_dir

Index x=0, y=1, z=2.

◆ m_type

VelocityInitType GetVelocity::m_type

◆ m_velocity

amrex::Real GetVelocity::m_velocity {0}

Sign of the velocity direction positive=1, negative=-1.

Constant velocity value, if m_type == VelConstantValue

◆ m_velocity_parser

amrex::ParserExecutor<3> GetVelocity::m_velocity_parser

Velocity parser function, if m_type == VelParserFunction


The documentation for this struct was generated from the following files: