Skip to content
Snippets Groups Projects
Unverified Commit 352dedab authored by Thomas Baumann's avatar Thomas Baumann Committed by GitHub
Browse files

Refactor for space transfer classes (#517)

parent 913463d4
Branches
Tags
No related merge requests found
......@@ -27,17 +27,17 @@ class SpaceTransfer(object):
coarse_prob (pySDC.Problem.ptype): reference to the coarse problem
"""
def __init__(self, fine_prob, coarse_prob, space_transfer_params):
def __init__(self, fine_prob, coarse_prob, params):
"""
Initialization routine
Args:
fine_prob (pySDC.Problem.ptype): reference to the fine problem
coarse_prob (pySDC.Problem.ptype): reference to the coarse problem
space_transfer_params (dict): user-defined parameters
params (dict): user-defined parameters
"""
self.params = _Pars(space_transfer_params)
self.params = _Pars(params)
# set up logger
self.logger = logging.getLogger('space-transfer')
......
......@@ -10,21 +10,6 @@ class mesh_to_mesh_fenics(SpaceTransfer):
This implementation can restrict and prolong between fenics meshes
"""
def __init__(self, fine_prob, coarse_prob, params):
"""
Initialization routine
Args:
fine_prob: fine problem
coarse_prob: coarse problem
params: parameters for the transfer operators
"""
# invoke super initialization
super(mesh_to_mesh_fenics, self).__init__(fine_prob, coarse_prob, params)
pass
def project(self, F):
"""
Restriction implementation via projection
......
......@@ -5,7 +5,7 @@ from pySDC.implementations.datatype_classes.mesh import mesh, imex_mesh
class mesh_to_mesh(SpaceTransfer):
"""
Custon base_transfer class, implements Transfer.py
Custom base_transfer class, implements Transfer.py
This implementation can restrict and prolong between nd meshes with dirichlet-0 or periodic boundaries
via matrix-vector products
......@@ -15,18 +15,6 @@ class mesh_to_mesh(SpaceTransfer):
Pspace: spatial prolongation matrix, dim. Nc x Nf
"""
def __init__(self, fine_prob, coarse_prob, params):
"""
Initialization routine
Args:
fine_prob: fine problem
coarse_prob: coarse problem
params: parameters for the transfer operators
"""
# invoke super initialization
super(mesh_to_mesh, self).__init__(fine_prob, coarse_prob, params)
def restrict(self, F):
"""
Restriction implementation
......
......@@ -5,24 +5,12 @@ from pySDC.implementations.datatype_classes.particles import particles, fields,
class particles_to_particles(SpaceTransfer):
"""
Custon transfer class, implements SpaceTransfer.py
Custom transfer class, implements SpaceTransfer.py
This implementation is just a dummy for particles with no direct functionality, i.e. the number of particles is not
reduced on the coarse problem
"""
def __init__(self, fine_prob, coarse_prob, params):
"""
Initialization routine
Args:
fine_prob: fine problem
coarse_prob: coarse problem
params: parameters for the transfer operators
"""
super(particles_to_particles, self).__init__(fine_prob, coarse_prob, params)
pass
def restrict(self, F):
"""
Dummy restriction routine
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment