Class ParallelSolver
java.lang.Object
solvers.linearSystemSolver.Solver
solvers.linearSystemSolver.ParallelSolver
- All Implemented Interfaces:
SolverInterface
- Direct Known Subclasses:
ModularSolver
This class extends the Solver one and adds to it all useful fields and
methods a parallel solver should support, such as thread management code,
shutdown routines, etc.
- Author:
- Michail Makaronidis, 2010
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intThe number of threads the ParallelSolver must use.protected ExecutorServiceThe pool of worker threads where the parallel tasks are given for execution. -
Constructor Summary
ConstructorsConstructorDescriptionParallelSolver(int nThreads) Initialises the ParallelSolver object and creates the worker threads. -
Method Summary
Modifier and TypeMethodDescriptionvoidshutdown()Shutsdown the solver, terminating all pools of threads and child processes if any exist.Methods inherited from class Solver
getTimer, goToULevel, initialise, initialise, initialise, solve
-
Field Details
-
nThreads
protected int nThreadsThe number of threads the ParallelSolver must use. -
pool
The pool of worker threads where the parallel tasks are given for execution.
-
-
Constructor Details
-
ParallelSolver
public ParallelSolver(int nThreads) Initialises the ParallelSolver object and creates the worker threads.- Parameters:
nThreads- The number of threads the ParallelSolver must use
-
-
Method Details
-
shutdown
-