WARPXM v1.10.0
Loading...
Searching...
No Matches
wxm::dfem::solver::dg::ndg_t Class Reference

The ndg_t class is used for solving the discontinuous Galerkin method. More...

#include <ndg.h>

Inheritance diagram for wxm::dfem::solver::dg::ndg_t:
wxm::dfem::solver::spatial_solver_t WmPatchProcess

Detailed Description

The ndg_t class is used for solving the discontinuous Galerkin method.

Public Member Functions

 ndg_t ()
 Constructor.
 
void setup (const WxCryptSet &wxc) override
 setup sets up the DG solver
 
const std::shared_ptr< TimestepConstraintsolve (const real time, const variables_type &input, variables_type &output) override
 Computes the RHS.
 
const WxRangeelement_interior_range () const override
 Get a range of elements associated with the interior.
 
const WxRangeelement_periphery_range () const override
 Get a range of elements associated with the interior.
 
const WxRangeelement_full_range () const override
 Get a range of elements associated with the entire patch (periphery+interior)
 
size_t get_num_dof () const override
 Gets the number of degrees of freedom per element per component.
 
- Public Member Functions inherited from wxm::dfem::solver::spatial_solver_t
 spatial_solver_t ()=default
 
 ~spatial_solver_t () override=default
 
void setup (const WxCryptSet &wxc) override
 Setup the spatial solver using the cryptset.
 
virtual const std::shared_ptr< TimestepConstraintsolve (const real time, const variables_type &input, variables_type &output)=0
 Solves the spatial system.
 
virtual void Barrier (const WxMsgBase &msg, const real time, variables_type &output)
 
std::vector< wxm::array::patch_array_t * > get_patch_arrays (const variables_type &in) const
 
virtual const WxRangeelement_periphery_range () const =0
 Get a range of elements associated with the periphery.
 
virtual const WxRangeelement_interior_range () const =0
 Get a range of elements associated with the interior.
 
virtual const WxRangeelement_full_range () const =0
 Get a range of elements associated with the entire patch (periphery+interior)
 
virtual void zero_fluxes ()=0
 
const std::vector< size_t > & get_output_indices () const
 
std::vector< size_t > convert_to_rhs_indexes (const std::vector< int > &indexes) const
 Converts a vector of indexes to RHS indexes TODO: probably can remove at some point in the future?
 
virtual size_t get_num_dof () const =0
 Gets the number of degrees of freedom per element per component.
 
void process () override
 
- Public Member Functions inherited from WmPatchProcess
 WmPatchProcess ()
 
virtual ~WmPatchProcess ()=default
 
void step ()
 
virtual void process ()=0
 
void setPatch (const WmUnstructuredPatch *patch)
 
void setParentTaskProcessor (WmPatchProcessor *taskProcessor)
 
virtual std::string name (std::string prefix="patchedProcessor.") const
 
virtual void setup (const WxCryptSet &wxc)
 
void setParentSolver (const WmSolverBase *solver)
 
void setDt (WxStepper::time_t dt)
 
void setTime (WxStepper::time_t time)
 
WxStepper::time_t getSuggestedDt () const
 
const WmUnstructuredPatchget_patch () const
 
const WmSolverget_solver () const
 

Protected Member Functions

void initializer_function ()
 
bool add_definition (const WmApplication &app, const int key)
 
const std::shared_ptr< TimestepConstraintex_kernel (const WxRange &face_scope_range, const real time, const std::vector< wxm::array::patch_array_t * > &input)
 
const std::shared_ptr< TimestepConstraintexKernelBC (const WxRange &face_scope_range, const real time, const std::vector< wxm::array::patch_array_t * > &input)
 
virtual const std::shared_ptr< TimestepConstraintin_kernel (const WxRange &element_scope_range, const real time, const std::vector< wxm::array::patch_array_t * > &input)
 
virtual void rhs_kernel (const WxRange &element_scope_range, std::vector< wxm::array::patch_array_t * > &output)
 
void print_kernel (const WxRange &element_scope_range)
 
void zero_fluxes () override
 
void alloc_fluxes ()
 

Protected Attributes

real _cfl
 
bool _test_dt
 
bool _sources_lgl
 
bool _sources_gq
 
real _penalty_beta
 
real _penalty_eta
 
bool _has_fluxes
 
bool _has_sources
 
std::string _basisSetName
 
WmBasisArraySet _basis_set
 
std::string _source_quad_style
 
std::unique_ptr< WmUDGGeometry_dg_geometry
 
std::vector< std::vector< std::vector< real > > > _numerical_fluxes
 
std::vector< std::vector< std::vector< std::vector< real > > > > _internal_fluxes
 
std::vector< std::vector< std::vector< real > > > _sources
 
std::vector< std::vector< size_t > > app_to_rhs_idcs_num_flux
 Cache for convert_to_rhs_indexes() for numerical fluxes.
 
std::vector< std::vector< size_t > > app_to_rhs_idcs_int_flux
 Cache for convert_to_rhs_indexes() for internal fluxes.
 
std::vector< std::vector< size_t > > app_to_rhs_idcs_source
 Cache for convert_to_rhs_indexes() for sources.
 
std::vector< std::vector< size_t > > _app_to_rhs_idcs_bc_num_flux
 Cache for convert_to_rhs_indexes() for bc numerical fluxes.
 
wxm::dfem::tools::scope_t _element_flux
 
wxm::dfem::tools::scope_t _face_flux
 
WxRange _chunk_size_element
 
WxRange _chunk_size_face
 
std::vector< std::string > _numerical_flux_bc_boundaries
 vector of boundaries on which to apply boundary conditions through numerical fluxes
 
std::vector< int > _numerical_flux_bc_boundary_global_face_indexes
 vector of boundary face indexes on which to apply boundary conditions through numerical fluxes
 
- Protected Attributes inherited from wxm::dfem::solver::spatial_solver_t
std::vector< size_t > rhs_idcs_
 
std::vector< size_t > all_idcs_
 
- Protected Attributes inherited from WmPatchProcess
std::string _ppName
 
WmPatchProcessor_parentTaskProcessor
 
const WmUnstructuredPatch_patch
 
std::vector< std::string > _onSubdomains
 
WxStepper::time_t _time
 
WxStepper::time_t _dt
 
WxStepper::time_t _suggested_dt
 
WxLogStream _debStrm = WxLogger::get("warpx-root.console")->getDebugStream()
 
const WmSolverBase_parentSolver = nullptr
 

Additional Inherited Members

- Public Types inherited from wxm::dfem::solver::spatial_solver_t
typedef wxm::temporal_solver::variables_type variables_type
 
- Public Attributes inherited from wxm::dfem::solver::spatial_solver_t
bool test_dt = true
 True if this special solver should compute a stability-based recommended time step.
 
std::vector< std::unique_ptr< WmApplication > > _apps
 

Constructor & Destructor Documentation

◆ ndg_t()

wxm::dfem::solver::dg::ndg_t::ndg_t ( )

Constructor.

Member Function Documentation

◆ add_definition()

bool wxm::dfem::solver::dg::ndg_t::add_definition ( const WmApplication app,
const int  key 
)
protected

◆ alloc_fluxes()

void wxm::dfem::solver::dg::ndg_t::alloc_fluxes ( )
protected

◆ element_full_range()

const WxRange & wxm::dfem::solver::dg::ndg_t::element_full_range ( ) const
inlineoverridevirtual

Get a range of elements associated with the entire patch (periphery+interior)

Implements wxm::dfem::solver::spatial_solver_t.

◆ element_interior_range()

const WxRange & wxm::dfem::solver::dg::ndg_t::element_interior_range ( ) const
inlineoverridevirtual

Get a range of elements associated with the interior.

Implements wxm::dfem::solver::spatial_solver_t.

◆ element_periphery_range()

const WxRange & wxm::dfem::solver::dg::ndg_t::element_periphery_range ( ) const
inlineoverridevirtual

Get a range of elements associated with the interior.

Implements wxm::dfem::solver::spatial_solver_t.

◆ ex_kernel()

const std::shared_ptr< TimestepConstraint > wxm::dfem::solver::dg::ndg_t::ex_kernel ( const WxRange face_scope_range,
const real  time,
const std::vector< wxm::array::patch_array_t * > &  input 
)
protected

◆ exKernelBC()

const std::shared_ptr< TimestepConstraint > wxm::dfem::solver::dg::ndg_t::exKernelBC ( const WxRange face_scope_range,
const real  time,
const std::vector< wxm::array::patch_array_t * > &  input 
)
protected

◆ get_num_dof()

size_t wxm::dfem::solver::dg::ndg_t::get_num_dof ( ) const
inlineoverridevirtual

Gets the number of degrees of freedom per element per component.

Implements wxm::dfem::solver::spatial_solver_t.

◆ in_kernel()

virtual const std::shared_ptr< TimestepConstraint > wxm::dfem::solver::dg::ndg_t::in_kernel ( const WxRange element_scope_range,
const real  time,
const std::vector< wxm::array::patch_array_t * > &  input 
)
protectedvirtual

◆ initializer_function()

void wxm::dfem::solver::dg::ndg_t::initializer_function ( )
protected

◆ print_kernel()

void wxm::dfem::solver::dg::ndg_t::print_kernel ( const WxRange element_scope_range)
protected

◆ rhs_kernel()

virtual void wxm::dfem::solver::dg::ndg_t::rhs_kernel ( const WxRange element_scope_range,
std::vector< wxm::array::patch_array_t * > &  output 
)
protectedvirtual

◆ setup()

void wxm::dfem::solver::dg::ndg_t::setup ( const WxCryptSet wxc)
overridevirtual

setup sets up the DG solver

Parameters
wxc

Reimplemented from WmPatchProcess.

◆ solve()

const std::shared_ptr< TimestepConstraint > wxm::dfem::solver::dg::ndg_t::solve ( const real  time,
const variables_type input,
variables_type output 
)
overridevirtual

Computes the RHS.

Implements wxm::dfem::solver::spatial_solver_t.

◆ zero_fluxes()

void wxm::dfem::solver::dg::ndg_t::zero_fluxes ( )
overrideprotectedvirtual

Member Data Documentation

◆ _app_to_rhs_idcs_bc_num_flux

std::vector<std::vector<size_t> > wxm::dfem::solver::dg::ndg_t::_app_to_rhs_idcs_bc_num_flux
protected

Cache for convert_to_rhs_indexes() for bc numerical fluxes.

◆ _basis_set

WmBasisArraySet wxm::dfem::solver::dg::ndg_t::_basis_set
protected

◆ _basisSetName

std::string wxm::dfem::solver::dg::ndg_t::_basisSetName
protected

◆ _cfl

real wxm::dfem::solver::dg::ndg_t::_cfl
protected

◆ _chunk_size_element

WxRange wxm::dfem::solver::dg::ndg_t::_chunk_size_element
protected

◆ _chunk_size_face

WxRange wxm::dfem::solver::dg::ndg_t::_chunk_size_face
protected

◆ _dg_geometry

std::unique_ptr<WmUDGGeometry> wxm::dfem::solver::dg::ndg_t::_dg_geometry
protected

◆ _element_flux

wxm::dfem::tools::scope_t wxm::dfem::solver::dg::ndg_t::_element_flux
protected

◆ _face_flux

wxm::dfem::tools::scope_t wxm::dfem::solver::dg::ndg_t::_face_flux
protected

◆ _has_fluxes

bool wxm::dfem::solver::dg::ndg_t::_has_fluxes
protected

◆ _has_sources

bool wxm::dfem::solver::dg::ndg_t::_has_sources
protected

◆ _internal_fluxes

std::vector<std::vector<std::vector<std::vector<real> > > > wxm::dfem::solver::dg::ndg_t::_internal_fluxes
protected

◆ _numerical_flux_bc_boundaries

std::vector<std::string> wxm::dfem::solver::dg::ndg_t::_numerical_flux_bc_boundaries
protected

vector of boundaries on which to apply boundary conditions through numerical fluxes

◆ _numerical_flux_bc_boundary_global_face_indexes

std::vector<int> wxm::dfem::solver::dg::ndg_t::_numerical_flux_bc_boundary_global_face_indexes
protected

vector of boundary face indexes on which to apply boundary conditions through numerical fluxes

◆ _numerical_fluxes

std::vector<std::vector<std::vector<real> > > wxm::dfem::solver::dg::ndg_t::_numerical_fluxes
protected

◆ _penalty_beta

real wxm::dfem::solver::dg::ndg_t::_penalty_beta
protected

◆ _penalty_eta

real wxm::dfem::solver::dg::ndg_t::_penalty_eta
protected

◆ _source_quad_style

std::string wxm::dfem::solver::dg::ndg_t::_source_quad_style
protected

◆ _sources

std::vector<std::vector<std::vector<real> > > wxm::dfem::solver::dg::ndg_t::_sources
protected

◆ _sources_gq

bool wxm::dfem::solver::dg::ndg_t::_sources_gq
protected

◆ _sources_lgl

bool wxm::dfem::solver::dg::ndg_t::_sources_lgl
protected

◆ _test_dt

bool wxm::dfem::solver::dg::ndg_t::_test_dt
protected

◆ app_to_rhs_idcs_int_flux

std::vector<std::vector<size_t> > wxm::dfem::solver::dg::ndg_t::app_to_rhs_idcs_int_flux
protected

Cache for convert_to_rhs_indexes() for internal fluxes.

◆ app_to_rhs_idcs_num_flux

std::vector<std::vector<size_t> > wxm::dfem::solver::dg::ndg_t::app_to_rhs_idcs_num_flux
protected

Cache for convert_to_rhs_indexes() for numerical fluxes.

◆ app_to_rhs_idcs_source

std::vector<std::vector<size_t> > wxm::dfem::solver::dg::ndg_t::app_to_rhs_idcs_source
protected

Cache for convert_to_rhs_indexes() for sources.


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