WARPXM v1.10.0
Loading...
Searching...
No Matches
wxm::dfem::solver::spatial_solver_t Class Referenceabstract

The WmSpatialSolver class is a base class for spatial sovers. More...

#include <spatial_solver.h>

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

Detailed Description

The WmSpatialSolver class is a base class for spatial sovers.

Public Types

typedef wxm::temporal_solver::variables_type variables_type
 

Public Member Functions

 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
 

Public Attributes

bool test_dt = true
 True if this special solver should compute a stability-based recommended time step.
 
std::vector< std::unique_ptr< WmApplication > > _apps
 

Protected Attributes

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
 

Member Typedef Documentation

◆ variables_type

Constructor & Destructor Documentation

◆ spatial_solver_t()

wxm::dfem::solver::spatial_solver_t::spatial_solver_t ( )
default

◆ ~spatial_solver_t()

wxm::dfem::solver::spatial_solver_t::~spatial_solver_t ( )
overridedefault

Member Function Documentation

◆ Barrier()

virtual void wxm::dfem::solver::spatial_solver_t::Barrier ( const WxMsgBase msg,
const real  time,
variables_type output 
)
inlinevirtual

◆ convert_to_rhs_indexes()

std::vector< size_t > wxm::dfem::solver::spatial_solver_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?

Parameters
indexesIndexes to convert
Returns
Converted indexes

◆ element_full_range()

virtual const WxRange & wxm::dfem::solver::spatial_solver_t::element_full_range ( ) const
pure virtual

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

Implemented in wxm::dfem::solver::dg::ndg_t, wxm::dfem::solver::dg::NDGKinetic, and wxm::dfem::solver::dg::UniqueVariableSolver.

◆ element_interior_range()

virtual const WxRange & wxm::dfem::solver::spatial_solver_t::element_interior_range ( ) const
pure virtual

Get a range of elements associated with the interior.

Implemented in wxm::dfem::solver::dg::ndg_t, wxm::dfem::solver::dg::NDGKinetic, and wxm::dfem::solver::dg::UniqueVariableSolver.

◆ element_periphery_range()

virtual const WxRange & wxm::dfem::solver::spatial_solver_t::element_periphery_range ( ) const
pure virtual

Get a range of elements associated with the periphery.

Implemented in wxm::dfem::solver::dg::ndg_t, wxm::dfem::solver::dg::NDGKinetic, and wxm::dfem::solver::dg::UniqueVariableSolver.

◆ get_num_dof()

virtual size_t wxm::dfem::solver::spatial_solver_t::get_num_dof ( ) const
pure virtual

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

Implemented in wxm::dfem::solver::dg::ndg_t, wxm::dfem::solver::dg::NDGKinetic, and wxm::dfem::solver::dg::UniqueVariableSolver.

◆ get_output_indices()

const std::vector< size_t > & wxm::dfem::solver::spatial_solver_t::get_output_indices ( ) const
inline

◆ get_patch_arrays()

std::vector< wxm::array::patch_array_t * > wxm::dfem::solver::spatial_solver_t::get_patch_arrays ( const variables_type in) const

◆ process()

void wxm::dfem::solver::spatial_solver_t::process ( )
inlineoverridevirtual

Implements WmPatchProcess.

◆ setup()

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

Setup the spatial solver using the cryptset.

Parameters
wxcThe cryptset

Reimplemented from WmPatchProcess.

◆ solve()

virtual const std::shared_ptr< TimestepConstraint > wxm::dfem::solver::spatial_solver_t::solve ( const real  time,
const variables_type input,
variables_type output 
)
pure virtual

Solves the spatial system.

Parameters
time
input
outputassumed to be 0-filled before

Implemented in wxm::dfem::solver::dg::ndg_t, wxm::dfem::solver::dg::NDGKinetic, and wxm::dfem::solver::dg::UniqueVariableSolver.

◆ zero_fluxes()

virtual void wxm::dfem::solver::spatial_solver_t::zero_fluxes ( )
pure virtual

Member Data Documentation

◆ _apps

std::vector<std::unique_ptr<WmApplication> > wxm::dfem::solver::spatial_solver_t::_apps

◆ all_idcs_

std::vector<size_t> wxm::dfem::solver::spatial_solver_t::all_idcs_
protected

◆ rhs_idcs_

std::vector<size_t> wxm::dfem::solver::spatial_solver_t::rhs_idcs_
protected

◆ test_dt

bool wxm::dfem::solver::spatial_solver_t::test_dt = true

True if this special solver should compute a stability-based recommended time step.


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