WARPXM v1.10.0
Loading...
Searching...
No Matches
wxm::apps::hallmhd::hyperresistivity::OhmsLaw Class Reference

The OhmsLaw class calculates the internal (or analytic) flux term for the hyperresistive term of Ohm's Law: E + nu nabla^2 J = 0, or E_i. More...

#include <ohms_law.h>

Inheritance diagram for wxm::apps::hallmhd::hyperresistivity::OhmsLaw:
WmApplication wxm::app_base

Detailed Description

The OhmsLaw class calculates the internal (or analytic) flux term for the hyperresistive term of Ohm's Law: E + nu nabla^2 J = 0, or E_i.

  • d/dx_j (F_ij) = 0 where F_ij = nu nabla J_ij = nu dJ_i/dx_j

This is used in wxm::dfem::variable_adjuster::auxiliary_variables::DivergenceIntegralByParts to calculate E which can then feed into MHD equations via DG calculation using wxm::apps::hallmhd::hyperresistivity::ElectricFieldEffect

See also
Warpy constructor: warpy::apps::mhd::hallmhd::hyperresistivity::hyperresistivity::ohms_law

Public Member Functions

 OhmsLaw ()
 Constructor.
 
 ~OhmsLaw () override
 Destructor.
 
void setup (const WxCryptSet &wxc) override
 Setup.
 
const std::vector< int > & getInputVariableIndexes (int flag) const override
 Get input variable indices.
 
const std::vector< int > & getOutputVariableIndexes (int flag) const override
 Get output variable indices.
 
real internal_flux (const real *q, const real *aux, const solverVariables_t *pSV, std::vector< std::vector< real > > &internalFlux) const override
 Internal flux definition.
 
real numerical_flux (const real *q_l, const real *q_r, const real *aux_l, const real *aux_r, const solverVariables_t *pFV, real *numericalFlux) const override
 Numerical flux definition.
 
- Public Member Functions inherited from WmApplication
 WmApplication ()
 
virtual ~WmApplication ()=default
 
virtual void setup (const WxCryptSet &wxc)
 
virtual const std::vector< int > & getAuxiliaryVariableIndexes (int flag=WMAPPLICATIONFLAG_NONE) const
 
virtual const std::vector< int > & getCrossVariableIndexes (int flag=WMAPPLICATIONFLAG_NONE) const
 
const std::vector< std::string > & getBoundaryNames () const
 
bool isOnBoundary (const std::string &boundaryName) const
 
bool has (int flag) const
 
virtual real numerical_flux (const real *q_l, const real *q_r, const real *aux_l, const real *aux_r, const solverVariables_t *pFV, real *numericalFlux) const
 
virtual real internal_flux (const real *q, const real *aux, const solverVariables_t *pSV, std::vector< std::vector< real > > &internalFlux) const
 
virtual real source (const real *q, const real *aux, const elementGeometry_t *pEG, real *source) const
 
virtual void bc_q (const real *q_in, const real *aux_in, const real *aux_out, const solverVariables_t *pFV, real *q_out) const
 Boundary Condition Application which sets the boundary condition on ghost nodes.
 
virtual real bcNumericalFlux (const real *q_l, const real *q_r, const real *aux_l, const real *aux_r, const solverVariables_t *pFV, real *numericalFlux) const
 
virtual void conserved_to_primitive (const real *q, const real *aux, real *w) const
 
virtual void primitive_to_conserved (const real *w, const real *aux, real *q) const
 
virtual void evaluate_function (const real *q, const real *aux, const solverVariables_t *pSV, real *result) const
 
virtual void bc_q_kinetic (const real *q_in, const real *aux_in, const solverVariables_t *pFV, real *q_out) const
 
std::shared_ptr< std::string > app_name ()
 
virtual const std::vector< int > & getInputVariableIndexes (int flag=0) const
 
virtual const std::vector< int > & getOutputVariableIndexes (int flag=0) const
 

Protected Attributes

real _hyperresistive_nu
 
std::vector< int > _inputVariables
 
std::vector< int > _outputVariables
 
std::string _coordinate_system
 
int _radial_index
 
int _ir
 
int _ith
 
int _iz
 
std::vector< std::vector< real > > _flux_tensor
 
- Protected Attributes inherited from WmApplication
std::string _app_name
 
WxLogStream _debStrm
 
std::vector< int > _allowedFlags
 
std::vector< std::string > _onBoundaries
 

Additional Inherited Members

- Public Types inherited from WmApplication
typedef Application_Variable WmApplication_Variable
 
typedef std::map< std::string, std::string > replaceMap_t
 
- Static Public Attributes inherited from wxm::app_base
static std::vector< int > empty
 
- Protected Member Functions inherited from wxm::app_base
virtual ~app_base ()=default
 

Constructor & Destructor Documentation

◆ OhmsLaw()

wxm::apps::hallmhd::hyperresistivity::OhmsLaw::OhmsLaw ( )

Constructor.

◆ ~OhmsLaw()

wxm::apps::hallmhd::hyperresistivity::OhmsLaw::~OhmsLaw ( )
override

Destructor.

Member Function Documentation

◆ getInputVariableIndexes()

const std::vector< int > & wxm::apps::hallmhd::hyperresistivity::OhmsLaw::getInputVariableIndexes ( int  flag) const
inlineoverridevirtual

Get input variable indices.

Parameters
intflag
Returns
vector of gradJ indices

Reimplemented from wxm::app_base.

◆ getOutputVariableIndexes()

const std::vector< int > & wxm::apps::hallmhd::hyperresistivity::OhmsLaw::getOutputVariableIndexes ( int  flag) const
inlineoverridevirtual

Get output variable indices.

Parameters
intflag
Returns
vector of E_hyperres indices

Reimplemented from wxm::app_base.

◆ internal_flux()

real wxm::apps::hallmhd::hyperresistivity::OhmsLaw::internal_flux ( const real q,
const real aux,
const solverVariables_t pSV,
std::vector< std::vector< real > > &  internalFlux 
) const
overridevirtual

Internal flux definition.

Parameters
constpointer to q vars
constpointer to aux vars
constpointer to solverVariables_t struct
2Dvector of internal flux to be modified by this function
Returns
timestep

Reimplemented from WmApplication.

◆ numerical_flux()

real wxm::apps::hallmhd::hyperresistivity::OhmsLaw::numerical_flux ( const real q_l,
const real q_r,
const real aux_l,
const real aux_r,
const solverVariables_t pFV,
real numericalFlux 
) const
overridevirtual

Numerical flux definition.

Parameters
constpointer to left q vars
constpointer to right q vars
constpointer to left aux vars
constpointer to right aux vars
constpointer to solverVariables_t struct
pointerto numerical flux array to be modified by this function
Returns
timestep

Reimplemented from WmApplication.

◆ setup()

void wxm::apps::hallmhd::hyperresistivity::OhmsLaw::setup ( const WxCryptSet wxc)
overridevirtual

Setup.

Parameters
WxCryptSetobject

Reimplemented from WmApplication.

Member Data Documentation

◆ _coordinate_system

std::string wxm::apps::hallmhd::hyperresistivity::OhmsLaw::_coordinate_system
protected

◆ _flux_tensor

std::vector<std::vector<real> > wxm::apps::hallmhd::hyperresistivity::OhmsLaw::_flux_tensor
mutableprotected

◆ _hyperresistive_nu

real wxm::apps::hallmhd::hyperresistivity::OhmsLaw::_hyperresistive_nu
protected

◆ _inputVariables

std::vector<int> wxm::apps::hallmhd::hyperresistivity::OhmsLaw::_inputVariables
protected

◆ _ir

int wxm::apps::hallmhd::hyperresistivity::OhmsLaw::_ir
protected

◆ _ith

int wxm::apps::hallmhd::hyperresistivity::OhmsLaw::_ith
protected

◆ _iz

int wxm::apps::hallmhd::hyperresistivity::OhmsLaw::_iz
protected

◆ _outputVariables

std::vector<int> wxm::apps::hallmhd::hyperresistivity::OhmsLaw::_outputVariables
protected

◆ _radial_index

int wxm::apps::hallmhd::hyperresistivity::OhmsLaw::_radial_index
protected

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