# Path: sucemfem/Forms.py
# class NullForm(object):
# class GalerkinInteriorForms(object):
# class EMGalerkinInteriorForms(GalerkinInteriorForms):
# class CombineGalerkinForms(object):
#     def __add__(self, other):
#     def set_material_functions(self, material_functions):
#     def set_function_space(self, function_space):
#     def get_mass_form(self):
#     def get_stiffness_form(self):
#     def get_mass_form(self):
#     def get_stiffness_form(self):
#     def set_interior_forms(self, interior_forms):
#     def set_boundary_conditions(self, boundary_conditions):
#     def get_combined_forms(self):
#         V = self.function_space = function_space


import dolfin 
from sucemfem import Forms
# Authors:
# Neilen Marais <nmarais@gmail.com>
from __future__ import division


class SystemMatrices(object):
    MatrixClass = dolfin.PETScMatrix

    def set_matrix_class(self, matrix_class):
        """Set matrix class to use for system matrix.

        Overrides the default value (dolfin.PETScMatrix) set in the
        class definition
        
        """
        self.MatrixClass = matrix_class

    def set_matrix_forms(self, matrix_forms):
        """Set matrix_forms with a dict mapping matrix names to bilinear forms"""
        self.matrix_forms = matrix_forms

    def set_boundary_conditions(self, boundary_conditions):
        """Set boundary_conditions with instance of BoundaryConditions"""
        self.boundary_conditions = boundary_conditions

    def calc_system_matrices(self):
        """Calculate and return system matrices in a dict"""
        system_matrices = dict()
        for matname, form in self.matrix_forms.items():
            mat = self.MatrixClass()

# Path: sucemfem/Forms.py
# class NullForm(object):
# class GalerkinInteriorForms(object):
# class EMGalerkinInteriorForms(GalerkinInteriorForms):
# class CombineGalerkinForms(object):
#     def __add__(self, other):
#     def set_material_functions(self, material_functions):
#     def set_function_space(self, function_space):
#     def get_mass_form(self):
#     def get_stiffness_form(self):
#     def get_mass_form(self):
#     def get_stiffness_form(self):
#     def set_interior_forms(self, interior_forms):
#     def set_boundary_conditions(self, boundary_conditions):
#     def get_combined_forms(self):
#         V = self.function_space = function_space


# Path: sucemfem/SystemMatrices.py
import dolfin 
from sucemfem import Forms

# Authors:
# Neilen Marais <nmarais@gmail.com>
from __future__ import division


class SystemMatrices(object):
    MatrixClass = dolfin.PETScMatrix

    def set_matrix_class(self, matrix_class):
        """Set matrix class to use for system matrix.

        Overrides the default value (dolfin.PETScMatrix) set in the
        class definition
        
        """
        self.MatrixClass = matrix_class

    def set_matrix_forms(self, matrix_forms):
        """Set matrix_forms with a dict mapping matrix names to bilinear forms"""
        self.matrix_forms = matrix_forms

    def set_boundary_conditions(self, boundary_conditions):
        """Set boundary_conditions with instance of BoundaryConditions"""
        self.boundary_conditions = boundary_conditions

    def calc_system_matrices(self):
        """Calculate and return system matrices in a dict"""
        system_matrices = dict()
        for matname, form in self.matrix_forms.items():
            mat = self.MatrixClass()

            if isinstance(form, Forms.NullForm):