2014-04-02 00:11:14 +05:30
|
|
|
# -*- coding: UTF-8 no BOM -*-
|
|
|
|
|
2011-12-22 16:00:25 +05:30
|
|
|
|
2011-12-15 14:21:16 +05:30
|
|
|
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.
|
|
|
|
"""
|
2011-12-15 14:21:16 +05:30
|
|
|
|
|
|
|
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()):
|
2011-12-15 14:21:16 +05:30
|
|
|
self.__class__=solverClass[solver.lower()]
|
|
|
|
self.__init__()
|
|
|
|
|