Gauss-Seidel solver for Electric potential problem. More...
#include <epot_gssolver.hpp>
Public Member Functions | |
| EpotGSSolver (Geometry &geom) | |
| Constructor. More... | |
| EpotGSSolver (Geometry &geom, std::istream &s) | |
| Construct from file. More... | |
| virtual | ~EpotGSSolver () |
| Destructor. More... | |
| void | set_eps (double eps) |
| Sets the accuracy request. More... | |
| void | set_imax (uint32_t imax) |
| Sets maximum iteration count. More... | |
| void | set_w (double w) |
| Sets relaxation parameter. More... | |
| void | set_plasma_solver_parameters (double Ulim_fac, uint32_t imax, double eps) |
| Set node wise plasma solver parameters. More... | |
| double | get_potential_change_norm (void) const |
| Get potential change norm. More... | |
| double | get_error_estimate (void) const |
| Get estimate of relative solution error. More... | |
| uint32_t | get_iter (void) const |
| Get number of iteration rounds done with last solve(). 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_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... | |
| void | solve (MeshScalarField &epot, const ScalarField &scharge) |
| Solve the problem. More... | |
| bool | linear (void) const |
| Return true if problem is linear. More... | |
| const Geometry & | geometry (void) const |
| Get pointer to geometry. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from EpotSolver | |
| 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... | |
| MeshScalarField * | evaluate_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... | |
| double | _plA |
| Plasma parameter. For positive ion extraction: rho_th * h^2 / epsilon_0, for negative ion extraction: rho_f * h^2 / epsilon_0. More... | |
| double | _plB |
| Plasma parameter. For positive ion extraction: 1/Te, for negative ion extraction: E_f,i. 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
Gauss-Seidel solver for Electric potential problem.
Constructor & Destructor Documentation
| EpotGSSolver::EpotGSSolver | ( | Geometry & | geom | ) |
Constructor.
| EpotGSSolver::EpotGSSolver | ( | Geometry & | geom, |
| std::istream & | s | ||
| ) |
Construct from file.
|
inlinevirtual |
Destructor.
Member Function Documentation
|
virtual |
Print debugging information to os.
Implements EpotSolver.
| double EpotGSSolver::get_error_estimate | ( | void | ) | const |
Get estimate of relative solution error.
Returns 2-norm
in 2D and
in 3D.
| uint32_t EpotGSSolver::get_iter | ( | void | ) | const |
Get number of iteration rounds done with last solve().
| double EpotGSSolver::get_potential_change_norm | ( | void | ) | const |
Get potential change norm.
Returns 2-norm
.
|
virtual |
Saves problem data to stream.
Implements EpotSolver.
| void EpotGSSolver::set_eps | ( | double | eps | ) |
Sets the accuracy request.
Defaults to 1.0e-4.
| void EpotGSSolver::set_imax | ( | uint32_t | imax | ) |
Sets maximum iteration count.
Defaults to 100000.
| void EpotGSSolver::set_plasma_solver_parameters | ( | double | Ulim_fac, |
| uint32_t | imax, | ||
| double | eps | ||
| ) |
Set node wise plasma solver parameters.
The Ulim_fac gives the potential limit within which the nonlinear solver is used in multiples of Te or maximum compensating particle energy from the plasma potential (defaults to 10). The imax gives the maximum number of iterations done at each node (defaults to 1) and eps gives the convergence criterion (default to 1.0e-6 volts).
| void EpotGSSolver::set_w | ( | double | w | ) |
Sets relaxation parameter.
Defaults to 1.66.
The documentation for this class was generated from the following files:
Public Member Functions inherited from