コード例 #1
0
    def __init__(self, physics='transport'):
        self.physics = physics

        self.discr = Upwind(self.physics)
        self.discr_ndof = self.discr.ndof
        self.coupling_conditions = UpwindCoupling(self.discr)

        self.solver = Coupler(self.discr, self.coupling_conditions)
コード例 #2
0
    def __init__(self, physics='flow'):
        self.physics = physics

        self.discr = Mpfa(self.physics)
        self.discr_ndof = self.discr.ndof
        self.coupling_conditions = TpfaCoupling(self.discr)

        self.solver = Coupler(self.discr, self.coupling_conditions)
コード例 #3
0
    def __init__(self, physics="flow"):
        self.physics = physics

        self.discr = P1(self.physics)
        self.discr_ndof = self.discr.ndof
        self.coupling_conditions = P1Coupling(self.discr)

        self.solver = Coupler(self.discr, self.coupling_conditions)
コード例 #4
0
    def __init__(self, physics="flow", coupling=None):
        self.physics = physics

        self.discr = DualSource(self.physics)
        self.discr_ndof = self.discr.ndof
        self.coupling_conditions = coupling

        self.solver = Coupler(self.discr, self.coupling_conditions)
        SolverMixedDim.__init__(self)
コード例 #5
0
ファイル: source.py プロジェクト: mrezajalali/porepy
    def __init__(self, physics='flow'):
        self.physics = physics

        self.discr = Integral(self.physics)
        self.discr_ndof = self.discr.ndof
        self.coupling_conditions = None

        self.solver = Coupler(self.discr)
        SolverMixedDim.__init__(self)
コード例 #6
0
    def __init__(self, physics="flow"):
        self.physics = physics

        self.discr = P1Source(self.physics)
        self.discr_ndof = self.discr.ndof
        self.coupling_conditions = None

        self.solver = Coupler(self.discr)
        SolverMixedDim.__init__(self)
コード例 #7
0
ファイル: Case3.py プロジェクト: mrezajalali/porepy
    def __init__(self, physics='flow'):
        self.physics = physics
        self.discr = tpfa.Tpfa(self.physics)
        self.discr_ndof = self.discr.ndof
        self.coupling_conditions = tpfa.TpfaCoupling(self.discr)
        tp = tpfa.Tpfa(self.physics)
        mp = mpfa.Mpfa(self.physics)

        def discr_fct(g, d): return mp.matrix_rhs(g, d) if g.dim < 3 \
            else tp.matrix_rhs(g, d)
        kwargs = {'discr_fct': discr_fct}
        self.solver = Coupler(self.discr, self.coupling_conditions, **kwargs)
コード例 #8
0
ファイル: tpfa.py プロジェクト: mrezajalali/porepy
    def __init__(self, dim_max, physics='flow'):
        # NOTE: There is no flow along the intersections of the fractures.

        self.physics = physics
        self.dim_max = dim_max

        self.discr = Tpfa(self.physics)
        self.coupling_conditions = TpfaCouplingDFN(self.discr)

        kwargs = {"discr_ndof": self.discr.ndof,
                  "discr_fct": self.__matrix_rhs__}
        self.solver = Coupler(coupling = self.coupling_conditions, **kwargs)
        SolverMixedDim.__init__(self)
コード例 #9
0
    def time_disc(self):
        """
        Returns the time discretization.
        """
        class TimeDisc(mass_matrix.MassMatrix):
            def __init__(self, deltaT):
                self.deltaT = deltaT

            def matrix_rhs(self, g, data):
                lhs, rhs = mass_matrix.MassMatrix.matrix_rhs(self, g, data)
                return lhs * data['compressibility'], rhs * data[
                    'compressibility']

        time_discretization = TimeDisc(self.time_step())
        if self.is_GridBucket:
            time_discretization = Coupler(time_discretization)
        return time_discretization
コード例 #10
0
ファイル: vem_source.py プロジェクト: jontateixeira/porepy
    def __init__(self, dim_max, physics='flow'):
        # NOTE: There is no flow along the intersections of the fractures.
        # In this case a mixed solver is considered. We assume only two
        # (contiguous) dimensions active. In the higher dimensional grid the
        # physical problem is discretise with a vem solver and in the lower
        # dimensional grid Lagrange multiplier are used to "glue" the velocity
        # dof at the interface between the fractures.
        # For this reason the matrix_rhs and ndof need to be carefully taking
        # care.

        self.physics = physics
        self.dim_max = dim_max

        self.discr = DualSource(self.physics)
        self.coupling_conditions = None

        kwargs = {"discr_ndof": self.__ndof__,
                  "discr_fct": self.__matrix_rhs__}
        self.solver = Coupler(coupling = None, **kwargs)
        SolverMixedDim.__init__(self)
コード例 #11
0
    def __init__(self, physics='flow'):
        self.physics = physics

        self.discr = InvMassMatrix(self.physics)

        self.solver = Coupler(self.discr)
コード例 #12
0
    def __init__(self, physics="flow"):
        self.physics = physics

        self.discr = P1MassMatrix(self.physics)

        self.solver = Coupler(self.discr)
コード例 #13
0
 def outflow(self, gb):
     def bind(g, d):
         return self.discr.outflow(g, d), np.zeros(g.num_cells)
     return Coupler(self.discr, solver_fct=bind).matrix_rhs(gb)[0]