WARPXM v1.10.0
Loading...
Searching...
No Matches
geometry::phase_space::PhaseSpaceDGGeometry Class Reference

Defines the global nodal DG phase space geometry at the patch level, given a WmUDGGeometry object that describes the patch level physical space nodal DG geometry and structured velocity space information. More...

#include <phase_space_dg_geometry.h>

Detailed Description

Defines the global nodal DG phase space geometry at the patch level, given a WmUDGGeometry object that describes the patch level physical space nodal DG geometry and structured velocity space information.

Meant to be used with kinetic dg solvers and moment takers.

To set this up from an external class (say ndg_kinetic): 1) Initialize with Constructor - passes in some arguments and sets up velocity space 2) Get patch and call setupBases(patch) to setup phase space and physical space bases 3) Get boundary_names and call setupWmUDGGeometry(patch, boundary_names, _has_fluxes) to setup the physical space unstructured dg geometry 4) Setup element scope externally 5) call setupPhaseSpaceDGGeometry(element_scope_range) to calculate phase space position coordinates and matching physical space nodes -> no longer need this because coordinates and matching physical space nodes can be calculated on the spot

Public Member Functions

 PhaseSpaceDGGeometry (const std::string basis_set_name, const std::string phase_space_order, const std::vector< int > vspace_nelems, const std::vector< real > vspace_minimums, const std::vector< real > vspace_dv)
 Constructor.
 
 ~PhaseSpaceDGGeometry ()
 Destructor.
 
void setupBases (const WmUnstructuredPatch &patch)
 Setup physical space and phase space bases.
 
void setupWmUDGGeometry (const WmUnstructuredPatch &patch, const std::vector< std::string > &boundary_names, const bool has_fluxes)
 Setup physical space unstructured dg geometry.
 
int getFlattenedVelocitySpaceElementIndex (const int vx_element_index, const int vy_element_index, const int vz_element_index) const
 Get the flattened velocity space element index.
 
void getVelocityElementCornerCoordinates (const int velocity_space_element_indexes[3], real velocity_element_corner_coordinates[3]) const
 Get the velocity element corner coordinates This is the velocity coordinate at the minimum corner of this velocity space.
 
void calcPhaseSpaceInverseJacobian (const int physical_element_index, std::vector< std::vector< real > > &inverse_jacobian_phase_space) const
 Calculate the Inverse Jacobian of the phase space element Assumes it is same for all phase space elements given a physical space element This is because phase space elements in super element above physical element are assumed to be same size.
 
WmUDGGeometry const * getWmUDGGeometry () const
 Get the pointer to the WmUDGGeometry object.
 
WmBasisArraySet const * getPhysicalSpaceBasisArraySet () const
 Get the pointer to the physical space basis set object.
 
WmBasisArraySet const * getPhaseSpaceBasisArraySet () const
 Get the pointer to the phase space basis set object.
 
int getVspaceNdims () const
 Get number of velocity space dimensions.
 
const std::vector< int > & getVspaceNelems () const
 Get number of velocity space elements in each velocity space dimension.
 
const std::vector< real > & getVspaceDv () const
 Get dv in each velocity space dimension {dvx, dvy, dvz}.
 
int getVspaceNVxElems () const
 Get number of vx elements.
 
int getVspaceNVyElems () const
 Get number of vy elements.
 
int getVspaceNVzElems () const
 Get number of vz elements.
 
const std::vector< real > & getVspaceMinimums () const
 Get the minimum velocity space coordinates.
 
const std::vector< real > & getVspaceMaximums () const
 Get the maximum velocity space coordinates.
 
int getMatchingGlobalPhysicalSpaceNodeIndex (const int physical_element_index, const int phase_space_element_local_node_index) const
 Get the matching global physical space node index from the physical element index and local phase space node.
 
void getPhaseSpaceCoordinates (const int physical_element_index, const int velocity_space_element_indexes[3], const int phase_space_element_local_node_index, std::array< real, 6 > &position) const
 Get phase space coordinates from _phase_space_coordinates.
 
int getGlobalPhaseSpaceElementIndex (const int physical_element_index, const int vx_element_index, const int vy_element_index, const int vz_element_index)
 Get global phase space element index given:
 
int getGlobalPhaseSpaceNodeIndex (const int physical_element_index, const int vx_element_index, const int vy_element_index, const int vz_element_index, const int local_phase_space_element_node_index)
 Get global phase space node index given:
 
const std::array< int, 18 > & getVfaceLookupTable ()
 Get the velocity face lookup table.
 

Constructor & Destructor Documentation

◆ PhaseSpaceDGGeometry()

geometry::phase_space::PhaseSpaceDGGeometry::PhaseSpaceDGGeometry ( const std::string  basis_set_name,
const std::string  phase_space_order,
const std::vector< int >  vspace_nelems,
const std::vector< real vspace_minimums,
const std::vector< real vspace_dv 
)

Constructor.

◆ ~PhaseSpaceDGGeometry()

geometry::phase_space::PhaseSpaceDGGeometry::~PhaseSpaceDGGeometry ( )

Destructor.

Member Function Documentation

◆ calcPhaseSpaceInverseJacobian()

void geometry::phase_space::PhaseSpaceDGGeometry::calcPhaseSpaceInverseJacobian ( const int  physical_element_index,
std::vector< std::vector< real > > &  inverse_jacobian_phase_space 
) const

Calculate the Inverse Jacobian of the phase space element Assumes it is same for all phase space elements given a physical space element This is because phase space elements in super element above physical element are assumed to be same size.

Parameters
physical_element_index
Returns
inverse_jacobian_phase_space

◆ getFlattenedVelocitySpaceElementIndex()

int geometry::phase_space::PhaseSpaceDGGeometry::getFlattenedVelocitySpaceElementIndex ( const int  vx_element_index,
const int  vy_element_index,
const int  vz_element_index 
) const

Get the flattened velocity space element index.

Parameters
vx_element_indexvx element index
vy_element_indexvy element index
vz_element_indexvz element index

◆ getGlobalPhaseSpaceElementIndex()

int geometry::phase_space::PhaseSpaceDGGeometry::getGlobalPhaseSpaceElementIndex ( const int  physical_element_index,
const int  vx_element_index,
const int  vy_element_index,
const int  vz_element_index 
)

Get global phase space element index given:

Parameters
physical_element_index
vx_element_index
vy_element_index
vz_element_index

◆ getGlobalPhaseSpaceNodeIndex()

int geometry::phase_space::PhaseSpaceDGGeometry::getGlobalPhaseSpaceNodeIndex ( const int  physical_element_index,
const int  vx_element_index,
const int  vy_element_index,
const int  vz_element_index,
const int  local_phase_space_element_node_index 
)

Get global phase space node index given:

Parameters
physical_element_index
vx_element_index
vy_element_index
vz_element_index
local_phase_space_element_node_index

◆ getMatchingGlobalPhysicalSpaceNodeIndex()

int geometry::phase_space::PhaseSpaceDGGeometry::getMatchingGlobalPhysicalSpaceNodeIndex ( const int  physical_element_index,
const int  phase_space_element_local_node_index 
) const
inline

Get the matching global physical space node index from the physical element index and local phase space node.

Parameters
physical_element_index
phase_space_element_local_node_index

◆ getPhaseSpaceBasisArraySet()

WmBasisArraySet const * geometry::phase_space::PhaseSpaceDGGeometry::getPhaseSpaceBasisArraySet ( ) const
inline

Get the pointer to the phase space basis set object.

◆ getPhaseSpaceCoordinates()

void geometry::phase_space::PhaseSpaceDGGeometry::getPhaseSpaceCoordinates ( const int  physical_element_index,
const int  velocity_space_element_indexes[3],
const int  phase_space_element_local_node_index,
std::array< real, 6 > &  position 
) const

Get phase space coordinates from _phase_space_coordinates.

Parameters
physical_element_index
flattened_velocity_space_element_index
phase_space_element_local_node_indexGet phase space coordinates from _phase_space_coordinates Calculates on the spot instead of calling potentially massive array
physical_element_index
velocity_space_element_indexes{vx_elem, vy_elem, vz_elem}
phase_space_element_local_node_index

◆ getPhysicalSpaceBasisArraySet()

WmBasisArraySet const * geometry::phase_space::PhaseSpaceDGGeometry::getPhysicalSpaceBasisArraySet ( ) const
inline

Get the pointer to the physical space basis set object.

◆ getVelocityElementCornerCoordinates()

void geometry::phase_space::PhaseSpaceDGGeometry::getVelocityElementCornerCoordinates ( const int  velocity_space_element_indexes[3],
real  velocity_element_corner_coordinates[3] 
) const

Get the velocity element corner coordinates This is the velocity coordinate at the minimum corner of this velocity space.

Parameters
velocity_space_element_indexes{vx_element_index, vy_element_index, vz_element_index}
Returns
velocity_element_corner_coordinates

◆ getVfaceLookupTable()

const std::array< int, 18 > & geometry::phase_space::PhaseSpaceDGGeometry::getVfaceLookupTable ( )
inline

Get the velocity face lookup table.

Returns
_vspace_lookup

◆ getVspaceDv()

const std::vector< real > & geometry::phase_space::PhaseSpaceDGGeometry::getVspaceDv ( ) const
inline

Get dv in each velocity space dimension {dvx, dvy, dvz}.

◆ getVspaceMaximums()

const std::vector< real > & geometry::phase_space::PhaseSpaceDGGeometry::getVspaceMaximums ( ) const
inline

Get the maximum velocity space coordinates.

◆ getVspaceMinimums()

const std::vector< real > & geometry::phase_space::PhaseSpaceDGGeometry::getVspaceMinimums ( ) const
inline

Get the minimum velocity space coordinates.

◆ getVspaceNdims()

int geometry::phase_space::PhaseSpaceDGGeometry::getVspaceNdims ( ) const
inline

Get number of velocity space dimensions.

◆ getVspaceNelems()

const std::vector< int > & geometry::phase_space::PhaseSpaceDGGeometry::getVspaceNelems ( ) const
inline

Get number of velocity space elements in each velocity space dimension.

◆ getVspaceNVxElems()

int geometry::phase_space::PhaseSpaceDGGeometry::getVspaceNVxElems ( ) const
inline

Get number of vx elements.

◆ getVspaceNVyElems()

int geometry::phase_space::PhaseSpaceDGGeometry::getVspaceNVyElems ( ) const
inline

Get number of vy elements.

◆ getVspaceNVzElems()

int geometry::phase_space::PhaseSpaceDGGeometry::getVspaceNVzElems ( ) const
inline

Get number of vz elements.

◆ getWmUDGGeometry()

WmUDGGeometry const * geometry::phase_space::PhaseSpaceDGGeometry::getWmUDGGeometry ( ) const
inline

Get the pointer to the WmUDGGeometry object.

◆ setupBases()

void geometry::phase_space::PhaseSpaceDGGeometry::setupBases ( const WmUnstructuredPatch patch)

Setup physical space and phase space bases.

◆ setupWmUDGGeometry()

void geometry::phase_space::PhaseSpaceDGGeometry::setupWmUDGGeometry ( const WmUnstructuredPatch patch,
const std::vector< std::string > &  boundary_names,
const bool  has_fluxes 
)

Setup physical space unstructured dg geometry.

Parameters
patchthe given patch
boundary_namesthe boundaries in the patch - used in kinetic boundary condition
has_fluxesboolean for if fluxes exist though you'll find it isn't actually used, though it is in the function signature everywhere for WmUDGGeometry setup

The documentation for this class was generated from the following file: