WarpX
VelocityProperties.H
Go to the documentation of this file.
1 /* Copyright 2021 Hannah Klion
2  *
3  * This file is part of WarpX.
4  *
5  * License: BSD-3-Clause-LBNL
6  */
7 
8 #ifndef WARPX_VELOCITY_PROPERTIES_H_
9 #define WARPX_VELOCITY_PROPERTIES_H_
10 
11 #include <AMReX_ParmParse.H>
12 #include <AMReX_Parser.H>
13 #include <AMReX_REAL.H>
14 
15 /* Type of velocity initialization. Used by VelocityProperties and GetVelocity. */
17 
26 {
38  VelocityProperties (const amrex::ParmParse& pp, std::string const& source_name);
39 
40  /* Type of velocity initialization */
42 
43  /* Velocity direction */
44  int m_dir; // Index x=0, y=1, z=2
45  int m_sign_dir; // Sign of the velocity direction positive=1, negative=-1
46 
47  /* Constant velocity value, if m_type == VelConstantValue */
48  amrex::Real m_velocity{0};
49  /* Storage of the parser function, if m_type == VelParserFunction */
50  std::unique_ptr<amrex::Parser> m_ptr_velocity_parser;
51 };
52 
53 #endif //WARPX_VELOCITY_PROPERTIES_H_
amrex::ParmParse pp
VelocityInitType
Definition: VelocityProperties.H:16
@ VelConstantValue
Definition: VelocityProperties.H:16
@ VelParserFunction
Definition: VelocityProperties.H:16
Struct to store velocity properties, for use in momentum initialization.
Definition: VelocityProperties.H:26
int m_dir
Definition: VelocityProperties.H:44
std::unique_ptr< amrex::Parser > m_ptr_velocity_parser
Definition: VelocityProperties.H:50
VelocityProperties(const amrex::ParmParse &pp, std::string const &source_name)
Read runtime parameters to populate constant or spatially-varying velocity information.
Definition: VelocityProperties.cpp:14
VelocityInitType m_type
Definition: VelocityProperties.H:41
amrex::Real m_velocity
Definition: VelocityProperties.H:48
int m_sign_dir
Definition: VelocityProperties.H:45