Navigation

Main Page
Download
Support
Installation
Tutorial
Examples
Reference Manual
   Version 1.0.5new_solver
      Class Index
      File List
   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

Parent class for Matrix-based solvers for Electric potential problem. More...

#include <epot_matrixsolver.hpp>

Inheritance diagram for EpotMatrixSolver:
EpotSolver EpotBiCGSTABSolver EpotUMFPACKSolver

Classes

class  Node2DoF
 Class nodes to degrees of freedom mapping. More...
 

Public Member Functions

virtual ~EpotMatrixSolver ()
 Destructor. 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 Geometrygeometry (void) const
 Get pointer to geometry. More...
 

Protected Member Functions

 EpotMatrixSolver (Geometry &geom)
 Constructor. More...
 
 EpotMatrixSolver (Geometry &geom, std::istream &s)
 Construct from file. More...
 
void get_vecmat (const CRowMatrix **A, const Vector **B)
 Return const pointers to the matrix A and vector B of the linear problem. More...
 
void get_resjac (const CRowMatrix **J, const Vector **R, const Vector &X)
 Return const pointers to jacobian matrix and residual vector of the problem to J and R at X. More...
 
bool linear (void) const
 Return true if problem is linear. More...
 
void set_initial_guess (const MeshScalarField &epot, Vector &X) const
 Load initial solution vector from electric potential. More...
 
void set_solution (MeshScalarField &epot, const Vector &X) const
 Load electric potential from solution vector. More...
 
void preprocess (MeshScalarField &epot, const MeshScalarField &scharge)
 Preprocess. More...
 
void postprocess (void)
 Postprocess. More...
 
void reset_matrix (void)
 Reset matrix representation. More...
 
- 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...
 
virtual void reset_problem (void)=0
 Reset solver/problem settings. More...
 
MeshScalarFieldevaluate_scharge (const ScalarField &__scharge) const
 
virtual void subsolve (MeshScalarField &epot, const MeshScalarField &scharge)=0
 Solve problem with given mesh based space charge. More...
 

Protected Attributes

uint32_t _dof
 Degrees of freedom. More...
 
Node2DoF _n2d
 Nodes to degrees of freedom map. More...
 
CRowMatrix_fd_mat
 Finite Difference matrix. More...
 
Vector_fd_vec
 Finite Difference vector. More...
 
Vector_d_vec
 Derivative vector for nonlinear solution. More...
 
const Vector_sol
 Current solution vector. More...
 
MeshScalarField_epot
 
const MeshScalarField_scharge
 
- 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

Parent class for Matrix-based solvers for Electric potential problem.

Constructor & Destructor Documentation

EpotMatrixSolver::EpotMatrixSolver ( Geometry geom)
protected

Constructor.

EpotMatrixSolver::EpotMatrixSolver ( Geometry geom,
std::istream &  s 
)
protected

Construct from file.

EpotMatrixSolver::~EpotMatrixSolver ( )
virtual

Destructor.

Member Function Documentation

void EpotMatrixSolver::debug_print ( std::ostream &  os) const
virtual

Print debugging information to os.

Implements EpotSolver.

Reimplemented in EpotBiCGSTABSolver, and EpotUMFPACKSolver.

void EpotMatrixSolver::get_resjac ( const CRowMatrix **  J,
const Vector **  R,
const Vector X 
)
protected

Return const pointers to jacobian matrix and residual vector of the problem to J and R at X.

void EpotMatrixSolver::get_vecmat ( const CRowMatrix **  A,
const Vector **  B 
)
protected

Return const pointers to the matrix A and vector B of the linear problem.

bool EpotMatrixSolver::linear ( void  ) const
protected

Return true if problem is linear.

void EpotMatrixSolver::postprocess ( void  )
protected

Postprocess.

Return solid mesh back to original state and remove temporary variables.

void EpotMatrixSolver::preprocess ( MeshScalarField epot,
const MeshScalarField scharge 
)
protected

Preprocess.

Modify solid mesh suitable for solver, build n2d map and linear matrix. Make right-hand-side.

void EpotMatrixSolver::reset_matrix ( void  )
protected

Reset matrix representation.

void EpotMatrixSolver::save ( std::ostream &  s) const
virtual

Saves problem data to stream.

Implements EpotSolver.

Reimplemented in EpotBiCGSTABSolver, and EpotUMFPACKSolver.

void EpotMatrixSolver::set_initial_guess ( const MeshScalarField epot,
Vector X 
) const
protected

Load initial solution vector from electric potential.

void EpotMatrixSolver::set_solution ( MeshScalarField epot,
const Vector X 
) const
protected

Load electric potential from solution vector.

Only free nodes are set. Fixed nodes are set during preprocess.

Member Data Documentation

Vector* EpotMatrixSolver::_d_vec
protected

Derivative vector for nonlinear solution.

uint32_t EpotMatrixSolver::_dof
protected

Degrees of freedom.

CRowMatrix* EpotMatrixSolver::_fd_mat
protected

Finite Difference matrix.

Vector* EpotMatrixSolver::_fd_vec
protected

Finite Difference vector.

Node2DoF EpotMatrixSolver::_n2d
protected

Nodes to degrees of freedom map.

const Vector* EpotMatrixSolver::_sol
protected

Current solution vector.


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


Reference manual for Ion Beam Simulator 1.0.5new_solver
Generated by Doxygen 1.8.5 on Tue May 19 2015 09:15:43.