DAMASK_EICMD/python/damask/solver/solver.py

19 lines
455 B
Python
Raw Normal View History

import damask.solver
class Solver():
2016-03-02 03:32:47 +05:30
"""
General class for solver specific functionality.
Sub-classed by the individual solvers.
"""
def __init__(self,solver=''):
solverClass = {
'spectral': damask.solver.Spectral,
'marc': damask.solver.Marc,
}
2016-07-02 16:58:32 +05:30
if solver.lower() in list(solverClass.keys()):
self.__class__=solverClass[solver.lower()]
self.__init__()