From e7694a1f163d9c4797ac381eec7ccf45d96347ab Mon Sep 17 00:00:00 2001 From: Jean-Matthieu Etancelin <jean-matthieu.etancelin@imag.fr> Date: Wed, 27 Mar 2013 07:55:38 +0000 Subject: [PATCH] Fix some isVector --- HySoP/hysop/operator/advection.py | 4 ++-- HySoP/hysop/operator/analytic.py | 2 +- HySoP/hysop/operator/gpu_particle_advection.py | 2 +- HySoP/hysop/operator/gpu_particle_advection_1k.py | 2 +- HySoP/hysop/operator/gpu_particle_advection_2k.py | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/HySoP/hysop/operator/advection.py b/HySoP/hysop/operator/advection.py index 787b8d426..b0b5f8730 100644 --- a/HySoP/hysop/operator/advection.py +++ b/HySoP/hysop/operator/advection.py @@ -87,7 +87,7 @@ class Advection(Operator): self.discreteFieldId[v] = dfId if self.discreteOperator is None: if self.method.find('gpu_2k') >= 0: - if self.advectedFields.vector: + if self.advectedFields.isVector: raise ValueError("Not implemented yet. GPU advection" + " is only for scalar fields") from parmepy.operator.gpu_particle_advection_2k \ @@ -96,7 +96,7 @@ class Advection(Operator): GPUParticleAdvection2k(self, method=self.method, **self.config) elif self.method.find('gpu_1k') >= 0: - if self.advectedFields.vector: + if self.advectedFields.isVector: raise ValueError("Not implemented yet. GPU advection" + " is only for scalar fields") from parmepy.operator.gpu_particle_advection_1k \ diff --git a/HySoP/hysop/operator/analytic.py b/HySoP/hysop/operator/analytic.py index 7d81310bf..a4c2f3733 100644 --- a/HySoP/hysop/operator/analytic.py +++ b/HySoP/hysop/operator/analytic.py @@ -6,7 +6,7 @@ Analytic operator representation. from parmepy.constants import debug from parmepy.operator.continuous import Operator from parmepy.mpi.topology import Cartesian -from parmepy.operator.velocity_d import Analytic_D +from parmepy.operator.analytic_d import Analytic_D class Analytic(Operator): diff --git a/HySoP/hysop/operator/gpu_particle_advection.py b/HySoP/hysop/operator/gpu_particle_advection.py index c63da826e..dd6cb3f06 100644 --- a/HySoP/hysop/operator/gpu_particle_advection.py +++ b/HySoP/hysop/operator/gpu_particle_advection.py @@ -280,7 +280,7 @@ class GPUParticleAdvection(ParticleAdvection): for gpudf in self.variables: if __VERBOSE__: print "deallocate :", gpudf.name - if gpudf.vector: + if gpudf.isVector: [gpudf.gpu_data[d].release() for d in xrange(len(self.resolution))] else: diff --git a/HySoP/hysop/operator/gpu_particle_advection_1k.py b/HySoP/hysop/operator/gpu_particle_advection_1k.py index 1b1c1df76..c93c7b5c4 100644 --- a/HySoP/hysop/operator/gpu_particle_advection_1k.py +++ b/HySoP/hysop/operator/gpu_particle_advection_1k.py @@ -86,7 +86,7 @@ class GPUParticleAdvection1k(GPUParticleAdvection): ## Result scalar particle_scalar = Field(self.advectedFields.topology.domain, "Particle_Scalar", - vector=False) + isVector=False) self.part_scalar, dfId = particle_scalar.discretize( self.advectedFields.topology) GPUScalarField.fromScalarField( diff --git a/HySoP/hysop/operator/gpu_particle_advection_2k.py b/HySoP/hysop/operator/gpu_particle_advection_2k.py index f288738e5..ef54829c6 100644 --- a/HySoP/hysop/operator/gpu_particle_advection_2k.py +++ b/HySoP/hysop/operator/gpu_particle_advection_2k.py @@ -90,7 +90,7 @@ class GPUParticleAdvection2k(GPUParticleAdvection): ## Particle position particle_position = Field(self.advectedFields.topology.domain, "Particle_Position", - vector=False) + isVector=False) self.part_position, dfID = particle_position.discretize( self.advectedFields.topology) GPUScalarField.fromScalarField( @@ -99,7 +99,7 @@ class GPUParticleAdvection2k(GPUParticleAdvection): ## Result scalar particle_scalar = Field(self.advectedFields.topology.domain, "Particle_Scalar", - vector=False) + isVector=False) self.part_scalar, dfId = particle_scalar.discretize( self.advectedFields.topology) GPUScalarField.fromScalarField( -- GitLab