Skip to content

Commit 2f526ee

Browse files
committed
Use exactly the same identity_map in State as in Geometry.
1 parent 41f2e03 commit 2f526ee

1 file changed

Lines changed: 1 addition & 15 deletions

File tree

src/pyclaw/state.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,6 @@
44
Module containing all Pyclaw solution objects
55
"""
66

7-
# Default mapc2p functions
8-
def identity_map_1d(x):
9-
return x,
10-
11-
def identity_map_2d(x,y):
12-
return x,y
13-
14-
def identity_map_3d(x,y,z):
15-
return x,y,z
16-
17-
identity_map={'1': identity_map_1d,
18-
'2': identity_map_2d,
19-
'3': identity_map_3d}
20-
21-
227
class State(object):
238
r"""
249
A PyClaw State object contains the current state on a particular patch,
@@ -193,6 +178,7 @@ def is_valid(self):
193178
194179
"""
195180
import logging
181+
from .geometry import identity_map
196182
valid = True
197183
logger = logging.getLogger('pyclaw.solution')
198184
if not self.q.flags['F_CONTIGUOUS']:

0 commit comments

Comments
 (0)