File slepc.hxx¶
-
class
SlepcSolver
: public Solver¶ Public Functions
-
~SlepcSolver
()¶
-
int
advanceStep
(Mat &matOperator, Vec &inData, Vec &outData)¶
-
int
compareEigs
(PetscScalar ar, PetscScalar ai, PetscScalar br, PetscScalar bi)¶
-
void
monitor
(PetscInt its, PetscInt nconv, PetscScalar eigr[], PetscScalar eigi[], PetscReal errest[], PetscInt nest)¶
-
virtual int
init
(int NOUT, BoutReal TIMESTEP) override¶ Initialise the solver NOTE: nout and tstep should be passed to run, not init. Needed because of how the PETSc TS code works
-
virtual int
run
() override¶ Run the solver, calling monitors nout times, at intervals of tstep. This function is called by solve(), and is specific to each solver type
This should probably be protected, since it shouldn’t be called by users.
-
inline virtual void
setModel
(PhysicsModel *model) override¶ OVERRIDE Here we override all other virtual functions in order to pass through control to the actual solver (advanceSolver) This is only required if allow use of additional solver
-
inline virtual void
add
(Field2D &v, const std::string &name, const std::string &description = "") override¶ Add a variable to be solved. This must be done in the initialisation stage, before the simulation starts.
-
inline virtual void
add
(Field3D &v, const std::string &name, const std::string &description = "") override¶
-
inline virtual void
add
(Vector2D &v, const std::string &name, const std::string &description = "") override¶
-
inline virtual void
add
(Vector3D &v, const std::string &name, const std::string &description = "") override¶
-
inline virtual bool
constraints
() override¶ Returns true if constraints available.
-
inline virtual void
constraint
(Field2D &v, Field2D &C_v, std::string name) override¶ Add constraint functions (optional). These link a variable v to a control parameter C_v such that v is adjusted to keep C_v = 0.
-
inline virtual int
n2Dvars
() const override¶ Number of 2D variables. Vectors count as 3.
-
inline virtual int
n3Dvars
() const override¶ Number of 3D variables. Vectors count as 3.
Private Functions
-
void
vecToFields
(Vec &inVec)¶
-
void
fieldsToVec
(Vec &outVec)¶
-
void
createShellMat
()¶
-
void
createEPS
()¶
-
void
analyseResults
()¶
-