Remove Operator.form_matrix methods (Chain owns these)

This commit is contained in:
Paul Romano 2018-02-19 16:49:51 -06:00
parent 704a131f2d
commit c19f396aa7
2 changed files with 0 additions and 40 deletions

View file

@ -133,27 +133,5 @@ class Operator(metaclass=ABCMeta):
pass
@abstractmethod
def form_matrix(self, y, mat):
"""Forms the f(y) matrix in y' = f(y)y.
Nominally a depletion matrix, this is abstracted on the off chance
that the function f has nothing to do with depletion at all.
Parameters
----------
y : numpy.ndarray
An array representing y.
mat : int
Material id.
Returns
-------
scipy.sparse.csr_matrix
Sparse matrix representing f(y).
"""
pass
def finalize(self):
pass

View file

@ -278,24 +278,6 @@ class OpenMCOperator(Operator):
number = density * 1.0e24
self.number.set_atom_density(mat_id, nuclide, number)
def form_matrix(self, y, mat):
"""Forms the depletion matrix.
Parameters
----------
y : numpy.ndarray
An array representing reaction rates for this material.
mat : int
Material id.
Returns
-------
scipy.sparse.csr_matrix
Sparse matrix representing the depletion matrix.
"""
return copy.deepcopy(self.chain.form_matrix(y[mat, :, :]))
def initial_condition(self):
"""Performs final setup and returns initial condition.