[yt-svn] commit/yt: 3 new changesets

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Wed Sep 27 10:06:28 PDT 2017


3 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/932cd9306e32/
Changeset:   932cd9306e32
User:        Yi-Hao Chen
Date:        2017-09-26 20:03:16+00:00
Summary:     Call __init__ on the superclass and remove redundant initializations.
Affected #:  3 files

diff -r 6952560f1d68aee46a5910f0cafa287a01c98aa1 -r 932cd9306e32f099bc5127d466128a3d3bc8e5f7 yt/data_objects/grid_patch.py
--- a/yt/data_objects/grid_patch.py
+++ b/yt/data_objects/grid_patch.py
@@ -58,8 +58,7 @@
     OverlappingSiblings = None
 
     def __init__(self, id, filename=None, index=None):
-        self.field_data = YTFieldData()
-        self.field_parameters = {}
+        super(AMRGridPatch, self).__init__(index.dataset, None)
         self.id = id
         self._child_mask = self._child_indices = self._child_index_mask = None
         self.ds = index.dataset
@@ -69,8 +68,6 @@
         self._last_mask = None
         self._last_count = -1
         self._last_selector_id = None
-        self._current_particle_type = 'all'
-        self._current_fluid_type = self.ds.default_fluid_type
 
     def get_global_startindex(self):
         """

diff -r 6952560f1d68aee46a5910f0cafa287a01c98aa1 -r 932cd9306e32f099bc5127d466128a3d3bc8e5f7 yt/data_objects/octree_subset.py
--- a/yt/data_objects/octree_subset.py
+++ b/yt/data_objects/octree_subset.py
@@ -55,10 +55,9 @@
     _block_reorder = None
 
     def __init__(self, base_region, domain, ds, over_refine_factor = 1):
+        super(OctreeSubset, self).__init__(ds, None)
         self._num_zones = 1 << (over_refine_factor)
         self._oref = over_refine_factor
-        self.field_data = YTFieldData()
-        self.field_parameters = {}
         self.domain = domain
         self.domain_id = domain.domain_id
         self.ds = domain.ds
@@ -66,8 +65,6 @@
         self.oct_handler = domain.oct_handler
         self._last_mask = None
         self._last_selector_id = None
-        self._current_particle_type = 'all'
-        self._current_fluid_type = self.ds.default_fluid_type
         self.base_region = base_region
         self.base_selector = base_region.selector
 

diff -r 6952560f1d68aee46a5910f0cafa287a01c98aa1 -r 932cd9306e32f099bc5127d466128a3d3bc8e5f7 yt/data_objects/unstructured_mesh.py
--- a/yt/data_objects/unstructured_mesh.py
+++ b/yt/data_objects/unstructured_mesh.py
@@ -39,9 +39,8 @@
 
     def __init__(self, mesh_id, filename, connectivity_indices,
                  connectivity_coords, index):
-        self.field_data = YTFieldData()
+        super(UnstructuredMesh, self).__init__(index.dataset, None)
         self.filename = filename
-        self.field_parameters = {}
         self.mesh_id = mesh_id
         # This is where we set up the connectivity information
         self.connectivity_indices = connectivity_indices
@@ -56,8 +55,6 @@
         self._last_mask = None
         self._last_count = -1
         self._last_selector_id = None
-        self._current_particle_type = 'all'
-        self._current_fluid_type = self.ds.default_fluid_type
 
     def _check_consistency(self):
         if self.connectivity_indices.shape[1] != self._connectivity_length:


https://bitbucket.org/yt_analysis/yt/commits/160aa7244872/
Changeset:   160aa7244872
User:        Yi-Hao Chen
Date:        2017-09-26 20:48:04+00:00
Summary:     Remove unused import of YTFieldData
Affected #:  2 files

diff -r 932cd9306e32f099bc5127d466128a3d3bc8e5f7 -r 160aa724487206808511da7d55e38e9804b2902f yt/data_objects/grid_patch.py
--- a/yt/data_objects/grid_patch.py
+++ b/yt/data_objects/grid_patch.py
@@ -21,8 +21,6 @@
 from yt.config import ytcfg
 from yt.data_objects.data_containers import \
     YTSelectionContainer
-from yt.data_objects.field_data import \
-    YTFieldData
 from yt.funcs import iterable
 from yt.geometry.selection_routines import convert_mask_to_indices
 import yt.geometry.particle_deposit as particle_deposit

diff -r 932cd9306e32f099bc5127d466128a3d3bc8e5f7 -r 160aa724487206808511da7d55e38e9804b2902f yt/data_objects/unstructured_mesh.py
--- a/yt/data_objects/unstructured_mesh.py
+++ b/yt/data_objects/unstructured_mesh.py
@@ -23,8 +23,6 @@
 
 from yt.data_objects.data_containers import \
     YTSelectionContainer
-from yt.data_objects.field_data import \
-    YTFieldData
 import yt.geometry.particle_deposit as particle_deposit
 
 class UnstructuredMesh(YTSelectionContainer):


https://bitbucket.org/yt_analysis/yt/commits/f292c74a3a4f/
Changeset:   f292c74a3a4f
User:        ngoldbaum
Date:        2017-09-27 17:05:57+00:00
Summary:     Merge pull request #1572 from yihaochen/superclass_init

Superclass init for grid objects
Affected #:  3 files

diff -r 6952560f1d68aee46a5910f0cafa287a01c98aa1 -r f292c74a3a4f6b535647dd138465dc2561b68850 yt/data_objects/grid_patch.py
--- a/yt/data_objects/grid_patch.py
+++ b/yt/data_objects/grid_patch.py
@@ -21,8 +21,6 @@
 from yt.config import ytcfg
 from yt.data_objects.data_containers import \
     YTSelectionContainer
-from yt.data_objects.field_data import \
-    YTFieldData
 from yt.funcs import iterable
 from yt.geometry.selection_routines import convert_mask_to_indices
 import yt.geometry.particle_deposit as particle_deposit
@@ -58,8 +56,7 @@
     OverlappingSiblings = None
 
     def __init__(self, id, filename=None, index=None):
-        self.field_data = YTFieldData()
-        self.field_parameters = {}
+        super(AMRGridPatch, self).__init__(index.dataset, None)
         self.id = id
         self._child_mask = self._child_indices = self._child_index_mask = None
         self.ds = index.dataset
@@ -69,8 +66,6 @@
         self._last_mask = None
         self._last_count = -1
         self._last_selector_id = None
-        self._current_particle_type = 'all'
-        self._current_fluid_type = self.ds.default_fluid_type
 
     def get_global_startindex(self):
         """

diff -r 6952560f1d68aee46a5910f0cafa287a01c98aa1 -r f292c74a3a4f6b535647dd138465dc2561b68850 yt/data_objects/octree_subset.py
--- a/yt/data_objects/octree_subset.py
+++ b/yt/data_objects/octree_subset.py
@@ -55,10 +55,9 @@
     _block_reorder = None
 
     def __init__(self, base_region, domain, ds, over_refine_factor = 1):
+        super(OctreeSubset, self).__init__(ds, None)
         self._num_zones = 1 << (over_refine_factor)
         self._oref = over_refine_factor
-        self.field_data = YTFieldData()
-        self.field_parameters = {}
         self.domain = domain
         self.domain_id = domain.domain_id
         self.ds = domain.ds
@@ -66,8 +65,6 @@
         self.oct_handler = domain.oct_handler
         self._last_mask = None
         self._last_selector_id = None
-        self._current_particle_type = 'all'
-        self._current_fluid_type = self.ds.default_fluid_type
         self.base_region = base_region
         self.base_selector = base_region.selector
 

diff -r 6952560f1d68aee46a5910f0cafa287a01c98aa1 -r f292c74a3a4f6b535647dd138465dc2561b68850 yt/data_objects/unstructured_mesh.py
--- a/yt/data_objects/unstructured_mesh.py
+++ b/yt/data_objects/unstructured_mesh.py
@@ -23,8 +23,6 @@
 
 from yt.data_objects.data_containers import \
     YTSelectionContainer
-from yt.data_objects.field_data import \
-    YTFieldData
 import yt.geometry.particle_deposit as particle_deposit
 
 class UnstructuredMesh(YTSelectionContainer):
@@ -39,9 +37,8 @@
 
     def __init__(self, mesh_id, filename, connectivity_indices,
                  connectivity_coords, index):
-        self.field_data = YTFieldData()
+        super(UnstructuredMesh, self).__init__(index.dataset, None)
         self.filename = filename
-        self.field_parameters = {}
         self.mesh_id = mesh_id
         # This is where we set up the connectivity information
         self.connectivity_indices = connectivity_indices
@@ -56,8 +53,6 @@
         self._last_mask = None
         self._last_count = -1
         self._last_selector_id = None
-        self._current_particle_type = 'all'
-        self._current_fluid_type = self.ds.default_fluid_type
 
     def _check_consistency(self):
         if self.connectivity_indices.shape[1] != self._connectivity_length:

Repository URL: https://bitbucket.org/yt_analysis/yt/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list