Skip to content

Commit 2b5387c

Browse files
committed
Refactor for space transfer classes
1 parent 913463d commit 2b5387c

File tree

4 files changed

+5
-44
lines changed

4 files changed

+5
-44
lines changed

pySDC/core/space_transfer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@ class SpaceTransfer(object):
2727
coarse_prob (pySDC.Problem.ptype): reference to the coarse problem
2828
"""
2929

30-
def __init__(self, fine_prob, coarse_prob, space_transfer_params):
30+
def __init__(self, fine_prob, coarse_prob, params):
3131
"""
3232
Initialization routine
3333
3434
Args:
3535
fine_prob (pySDC.Problem.ptype): reference to the fine problem
3636
coarse_prob (pySDC.Problem.ptype): reference to the coarse problem
37-
space_transfer_params (dict): user-defined parameters
37+
params (dict): user-defined parameters
3838
"""
3939

40-
self.params = _Pars(space_transfer_params)
40+
self.params = _Pars(params)
4141

4242
# set up logger
4343
self.logger = logging.getLogger('space-transfer')

pySDC/implementations/transfer_classes/TransferFenicsMesh.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,6 @@ class mesh_to_mesh_fenics(SpaceTransfer):
1010
This implementation can restrict and prolong between fenics meshes
1111
"""
1212

13-
def __init__(self, fine_prob, coarse_prob, params):
14-
"""
15-
Initialization routine
16-
17-
Args:
18-
fine_prob: fine problem
19-
coarse_prob: coarse problem
20-
params: parameters for the transfer operators
21-
"""
22-
23-
# invoke super initialization
24-
super(mesh_to_mesh_fenics, self).__init__(fine_prob, coarse_prob, params)
25-
26-
pass
27-
2813
def project(self, F):
2914
"""
3015
Restriction implementation via projection

pySDC/implementations/transfer_classes/TransferMesh_NoCoarse.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
class mesh_to_mesh(SpaceTransfer):
77
"""
8-
Custon base_transfer class, implements Transfer.py
8+
Custom base_transfer class, implements Transfer.py
99
1010
This implementation can restrict and prolong between nd meshes with dirichlet-0 or periodic boundaries
1111
via matrix-vector products
@@ -15,18 +15,6 @@ class mesh_to_mesh(SpaceTransfer):
1515
Pspace: spatial prolongation matrix, dim. Nc x Nf
1616
"""
1717

18-
def __init__(self, fine_prob, coarse_prob, params):
19-
"""
20-
Initialization routine
21-
22-
Args:
23-
fine_prob: fine problem
24-
coarse_prob: coarse problem
25-
params: parameters for the transfer operators
26-
"""
27-
# invoke super initialization
28-
super(mesh_to_mesh, self).__init__(fine_prob, coarse_prob, params)
29-
3018
def restrict(self, F):
3119
"""
3220
Restriction implementation

pySDC/implementations/transfer_classes/TransferParticles_NoCoarse.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,12 @@
55

66
class particles_to_particles(SpaceTransfer):
77
"""
8-
Custon transfer class, implements SpaceTransfer.py
8+
Custom transfer class, implements SpaceTransfer.py
99
1010
This implementation is just a dummy for particles with no direct functionality, i.e. the number of particles is not
1111
reduced on the coarse problem
1212
"""
1313

14-
def __init__(self, fine_prob, coarse_prob, params):
15-
"""
16-
Initialization routine
17-
18-
Args:
19-
fine_prob: fine problem
20-
coarse_prob: coarse problem
21-
params: parameters for the transfer operators
22-
"""
23-
super(particles_to_particles, self).__init__(fine_prob, coarse_prob, params)
24-
pass
25-
2614
def restrict(self, F):
2715
"""
2816
Dummy restriction routine

0 commit comments

Comments
 (0)