Navigation

Main Page
Download
Support
Installation
Tutorial
Examples
Reference Manual
   Version 1.0.6dev
      Class Index
      File List
   Version 1.0.6
   Version 1.0.5new_solver
   Version 1.0.5dev
   Version 1.0.5b
   Version 1.0.4dev
   Version 1.0.4
Publications


Hosted by Get Ion Beam Simulator at SourceForge.net. Fast, secure and Free Open Source software downloads
EpotMGSubSolver Class Reference

Subroutine class for EpotMGSolver. More...

#include <epot_mgsubsolver.hpp>

Inheritance diagram for EpotMGSubSolver:
EpotSolver

Public Member Functions

 EpotMGSubSolver (const EpotSolver &epsolver, Geometry &geom, double Ulim, uint32_t imax, double eps)
 Constructor. More...
 
virtual ~EpotMGSubSolver ()
 Destructor. More...
 
void defect (MeshScalarField *defect, MeshScalarField *epot, const MeshScalarField *rhs, bool after_smooth)
 Calculate defect. More...
 
double mg_smooth (MeshScalarField *epot, const MeshScalarField *rhs)
 Do a smoothing round with Red-Black Gauss-Seidel. More...
 
double mg_solve (MeshScalarField *epot, const MeshScalarField *rhs, double w)
 Do a solve round with SOR using over-relaxation factor w. More...
 
double error_scale (double w) const
 Return error scaling factor for SOR solver with over-relaxation factor w. More...
 
double error_scale_mg (void) const
 Return error scaling factor for MG smoother. More...
 
void preprocess (MeshScalarField &epot)
 Preprocess. More...
 
void postprocess (void)
 Postprocess. More...
 
virtual void debug_print (std::ostream &os) const
 Print debugging information to os. More...
 
virtual void save (std::ostream &s) const
 Saves problem data to stream. More...
 
- Public Member Functions inherited from EpotSolver
 EpotSolver (Geometry &geom)
 Constructor for solver from geom. More...
 
 EpotSolver (const EpotSolver &epsolver, Geometry &geom)
 Constructor for solver from geom. Parameters from epsolver are copied to new solver. More...
 
 EpotSolver (Geometry &geom, std::istream &s)
 Construct from file. More...
 
virtual ~EpotSolver ()
 Destructor. More...
 
void set_parameters (const EpotSolver &epsolver)
 Copy parameters from solver epsolver. More...
 
void set_forced_potential_volume (double force_pot, CallbackFunctorB_V *force_pot_func)
 Define forced potential volume. More...
 
void set_forced_potential_volume (CallbackFunctorD_V *force_pot_func)
 Define forced potential volume. More...
 
void set_initial_plasma (double Up, CallbackFunctorB_V *init_plasma_func)
 Define initial plasma to the problem. More...
 
void set_plasma_calc_region (CallbackFunctorB_V *plasma_calc_func)
 Define plasma calculation region. More...
 
void set_pexp_plasma (double rhoe, double Te, double Up)
 Enable plasma model for positive ion extraction problem. More...
 
void set_nsimp_initial_plasma (CallbackFunctorB_V *init_plasma_func)
 Define initial plasma boundary location to negative ion extraction problem. More...
 
void set_nsimp_plasma (double rhop, double Ep, std::vector< double > rhoi, std::vector< double > Ei)
 Enable plasma model for negative ion extraction problem. More...
 

Additional Inherited Members

- Protected Member Functions inherited from EpotSolver
void shield_newton (double &rhs, double &drhs, double epot) const
 Return non-linear right-hand-side and it's derivative for vacuum node in shielding model plasma. More...
 
void pexp_newton (double &rhs, double &drhs, double epot) const
 Return non-linear right-hand-side and it's derivative for vacuum node in positive ion plasma. More...
 
void nsimp_newton (double &rhs, double &drhs, double epot) const
 Return non-linear right-hand-side and it's derivative for vacuum node in negative ion plasma. More...
 
uint8_t boundary_index (uint32_t i) const
 Return bitmask indicating to which boundaries the node belongs to. More...
 
uint8_t boundary_index (uint32_t i, uint32_t j) const
 Return bitmask indicating to which boundaries the node belongs to. More...
 
uint8_t boundary_index (uint32_t i, uint32_t j, uint32_t k) const
 Return bitmask indicating to which boundaries the node belongs to. More...
 
uint8_t boundary_index_general (uint32_t i, uint32_t j, uint32_t k) const
 Return bitmask indicating to which boundaries the node belongs to. More...
 
void preprocess (MeshScalarField &epot)
 Do preprocessing action before solving. More...
 
void postprocess (void)
 Do postprocessing action after solving. More...
 
MeshScalarFieldevaluate_scharge (const ScalarField &__scharge) const
 
- Protected Attributes inherited from EpotSolver
Geometry_geom
 Geometry reference. More...
 
plasma_mode_e _plasma
 Plasma simulation mode. More...
 
double _rhoe
 Electron charge density (C/m3), < 0. More...
 
double _Te
 Electron thermal energy, > 0. More...
 
double _Up
 Plasma potential, > 0. More...
 
std::vector< double > _rhoi
 Charge density for positive ions, first fast protons, then thermal ions. More...
 
std::vector< double > _Ei
 Energy for positive ions, first fast protons, then thermal ions. More...
 
double _force_pot
 Potential to be forced. More...
 
CallbackFunctorB_V_force_pot_func
 Force region potential function. More...
 
CallbackFunctorD_V_force_pot_func2
 Force region potential function. More...
 
CallbackFunctorB_V_init_plasma_func
 Initial plasma region function. More...
 
CallbackFunctorB_V_plasma_calc_func
 Definition of plasma calculation region. More...
 
double _plA
 Plasma parameter. For positive ion extraction: rho_th * h^2 / epsilon_0, for negative ion extraction: rho_f * h^2 / epsilon_0 for shield1: 1/Tm. More...
 
double _plB
 Plasma parameter. For positive ion extraction: 1/Te, for negative ion extraction: E_f,i for shield1: phi_m/Tm. More...
 
double _plC
 Plasma parameter for positive ion extraction. Up/Te. More...
 
std::vector< double > _plD
 Plasma parameter for negative ion extraction. rho_th,i * h^2 / epsilon_0. More...
 
std::vector< double > _plE
 Plasma parameter for negative ion extraction. 1/Ti. More...
 

Detailed Description

Subroutine class for EpotMGSolver.

Preprocesses the solid mesh and does relaxation rounds on one problem level.

Constructor & Destructor Documentation

◆ EpotMGSubSolver()

EpotMGSubSolver::EpotMGSubSolver ( const EpotSolver epsolver,
Geometry geom,
double  Ulim,
uint32_t  imax,
double  eps 
)

Constructor.

Construct subsolver for geometry geom. Use parameters from main level potential solver epsolver.

◆ ~EpotMGSubSolver()

virtual EpotMGSubSolver::~EpotMGSubSolver ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ debug_print()

virtual void EpotMGSubSolver::debug_print ( std::ostream &  os) const
inlinevirtual

Print debugging information to os.

◆ defect()

void EpotMGSubSolver::defect ( MeshScalarField defect,
MeshScalarField epot,
const MeshScalarField rhs,
bool  after_smooth 
)

Calculate defect.

If calculating defect after RBGS smooth, the odd points are known to have zero defect.

◆ error_scale()

double EpotMGSubSolver::error_scale ( double  w) const

Return error scaling factor for SOR solver with over-relaxation factor w.

◆ error_scale_mg()

double EpotMGSubSolver::error_scale_mg ( void  ) const

Return error scaling factor for MG smoother.

◆ mg_smooth()

double EpotMGSubSolver::mg_smooth ( MeshScalarField epot,
const MeshScalarField rhs 
)

Do a smoothing round with Red-Black Gauss-Seidel.

◆ mg_solve()

double EpotMGSubSolver::mg_solve ( MeshScalarField epot,
const MeshScalarField rhs,
double  w 
)

Do a solve round with SOR using over-relaxation factor w.

◆ postprocess()

void EpotMGSubSolver::postprocess ( void  )

Postprocess.

◆ preprocess()

void EpotMGSubSolver::preprocess ( MeshScalarField epot)

Preprocess.

◆ save()

virtual void EpotMGSubSolver::save ( std::ostream &  s) const
inlinevirtual

Saves problem data to stream.


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


Reference manual for Ion Beam Simulator 1.0.6dev
Generated by Doxygen 1.9.1 on Thu Sep 11 2025 09:37:24.