From f227fb93822d202c184445014c6861bbec088ef7 Mon Sep 17 00:00:00 2001 From: Eirik Keilegavlen Date: Fri, 10 May 2019 12:13:49 +0200 Subject: [PATCH] Formating and black --- src/porepy/numerics/mixed_dim/assembler.py | 10 +++++----- test/unit/test_assembler.py | 6 +++--- test/unit/test_darcy_mortar.py | 5 +++-- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/porepy/numerics/mixed_dim/assembler.py b/src/porepy/numerics/mixed_dim/assembler.py index 4336f8959..adccb4d6b 100644 --- a/src/porepy/numerics/mixed_dim/assembler.py +++ b/src/porepy/numerics/mixed_dim/assembler.py @@ -37,11 +37,11 @@ def __init__(self, gb, active_variables=None): accordingly. NOTE: For edge coupling terms where the edge variable is defined as active, all involved node variables must also be active. - + Raises: ValueError: If an edge_coupling is defined with an active edge variable but with an inactive node variable. - + """ self.gb = gb @@ -751,15 +751,15 @@ def _local_variables(self, d): def _is_active_variable(self, key): """ Check if a key denotes an active variable - + Parameters: key (str): Variable identifier. active_variables (list of str, or str): Active variables. - + Returns: boolean: True if key is in active_variables, or active_variables is None. - + """ if self.active_variables is None: return True diff --git a/test/unit/test_assembler.py b/test/unit/test_assembler.py index 88c000237..34106adf2 100644 --- a/test/unit/test_assembler.py +++ b/test/unit/test_assembler.py @@ -220,7 +220,7 @@ def test_single_variable_not_active(self): def test_explicitly_define_edge_variable_active(self): """ Explicitly define edge and node variables as active. The result should be the same as if no active variable was defined. - + """ gb = self.define_gb() @@ -263,7 +263,7 @@ def test_explicitly_define_edge_variable_active(self): def test_define_edge_variable_inactive(self): """ Define edge-variable as inactive. The resulting system should have no coupling term. - + """ gb = self.define_gb() @@ -304,7 +304,7 @@ def test_define_edge_variable_inactive(self): def test_define_edge_variable_active_node_variable_inactive(self): """ Define edge-variable as inactive. The resulting system should have no coupling term. - + """ gb = self.define_gb() diff --git a/test/unit/test_darcy_mortar.py b/test/unit/test_darcy_mortar.py index d8e519c1f..178199a37 100644 --- a/test/unit/test_darcy_mortar.py +++ b/test/unit/test_darcy_mortar.py @@ -1202,7 +1202,7 @@ def run_mpfa(self, gb): key = "flow" method = pp.Mpfa(key) self._solve(gb, method, key) - + def run_vem(self, gb): key = "flow" method = pp.MVEM(key) @@ -1294,5 +1294,6 @@ def test_RT0_refined_1d(self): self.run_RT0(gb) self.verify_cv(gb) + if __name__ == "__main__": - unittest.main() \ No newline at end of file + unittest.main()