WARPXM v1.10.0
|
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>
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. | |
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.
geometry::phase_space::PhaseSpaceDGGeometry::~PhaseSpaceDGGeometry | ( | ) |
Destructor.
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.
physical_element_index |
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.
vx_element_index | vx element index |
vy_element_index | vy element index |
vz_element_index | vz element index |
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:
physical_element_index | |
vx_element_index | |
vy_element_index | |
vz_element_index |
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:
physical_element_index | |
vx_element_index | |
vy_element_index | |
vz_element_index | |
local_phase_space_element_node_index |
|
inline |
Get the matching global physical space node index from the physical element index and local phase space node.
physical_element_index | |
phase_space_element_local_node_index |
|
inline |
Get the pointer to the phase space basis set object.
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.
physical_element_index | |
flattened_velocity_space_element_index | |
phase_space_element_local_node_index | Get 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 |
|
inline |
Get the pointer to the physical space basis set object.
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.
velocity_space_element_indexes | {vx_element_index, vy_element_index, vz_element_index} |
|
inline |
Get the velocity face lookup table.
|
inline |
Get dv in each velocity space dimension {dvx, dvy, dvz}.
|
inline |
Get the maximum velocity space coordinates.
|
inline |
Get the minimum velocity space coordinates.
|
inline |
Get number of velocity space dimensions.
|
inline |
Get number of velocity space elements in each velocity space dimension.
|
inline |
Get number of vx elements.
|
inline |
Get number of vy elements.
|
inline |
Get number of vz elements.
|
inline |
Get the pointer to the WmUDGGeometry object.
void geometry::phase_space::PhaseSpaceDGGeometry::setupBases | ( | const WmUnstructuredPatch & | patch | ) |
Setup physical space and phase space bases.
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.
patch | the given patch |
boundary_names | the boundaries in the patch - used in kinetic boundary condition |
has_fluxes | boolean for if fluxes exist though you'll find it isn't actually used, though it is in the function signature everywhere for WmUDGGeometry setup |