femsolver.run Namespace Reference

Classes

class  BaseTask
 
class  Check
 
class  Machine
 
class  Prepare
 
class  Results
 
class  Solve
 

Functions

def getMachine (solver, path=None)
 
def run_fem_solver (solver, working_dir=None)
 

Variables

int CHECK = 0
 
int DONE = 4
 
int PREPARE = 1
 
int RESULTS = 3
 
int SOLVE = 2
 

Function Documentation

◆ getMachine()

def femsolver.run.getMachine (   solver,
  path = None 
)
 Get or create :class:`Machine` using caching mechanism.

:param solver:
    A document object which must be a framework compliant solver. This means
    that it should be derived from the document object provided by
    :mod:`femsolver.solverbase` and implement all required methods
    correctly. Of particular importance is :meth:`getMachine
    <femsolver.solverbase.Proxy.getMachine>` as it is used by this method
    to create a new :class:`Machine` on cache miss.

:param path:
    A valid filesystem path which shall be associetad with the machine.

Referenced by femsolver.run.run_fem_solver(), and femsolver.solver_taskpanel.ControlTaskPanel.updateMachine().

◆ run_fem_solver()

def femsolver.run.run_fem_solver (   solver,
  working_dir = None 
)
 Execute *solver* of the solver framework.

Uses :meth:`getMachine <femsolver.solverbase.Proxy.getMachine>` to obtain a
:class:`Machine` instance of the solver. It than executes the Machine with
using the ``RESULTS`` target (see :class:`Machine` for infos about
different targets). This method is blocking, it waits for the solver to
finished before returning. Be aware of :class:`Machine` caching when using
the function.

:param solver:
    A document object which must be a framework compliant solver. This means
    that it should be derived from the document object provided by
    :mod:`femsolver.solverbase` and implement all required methods
    correctly. Of particular importance is :meth:`getMachine
    <femsolver.solverbase.Proxy.getMachine>` as it is used by this method
    the get the :class:`Machine` used to execute the solver.

:param working_dir:
    If specified it overwrites the automatic and user configurable working
    directory management of the Solver framework. Should always be a
    absolute path because the location of the binary is not consistent
    among platforms. If ``None`` the automatic working directory management
    is used.

:note:
    There is some legacy code to execute the old Calculix solver
    (pre-framework) which behaives differently because it does not
    use a :class:`Machine`.

References femsolver.report.display(), femsolver.report.displayLog(), and femsolver.run.getMachine().

Variable Documentation

◆ CHECK

int femsolver.run.CHECK = 0

◆ DONE

int femsolver.run.DONE = 4

◆ PREPARE

int femsolver.run.PREPARE = 1

◆ RESULTS

int femsolver.run.RESULTS = 3

◆ SOLVE

int femsolver.run.SOLVE = 2