Skip to content
Snippets Groups Projects
Commit e7694a1f authored by Jean-Matthieu Etancelin's avatar Jean-Matthieu Etancelin
Browse files

Fix some isVector

parent 443680b2
No related branches found
No related tags found
No related merge requests found
...@@ -87,7 +87,7 @@ class Advection(Operator): ...@@ -87,7 +87,7 @@ class Advection(Operator):
self.discreteFieldId[v] = dfId self.discreteFieldId[v] = dfId
if self.discreteOperator is None: if self.discreteOperator is None:
if self.method.find('gpu_2k') >= 0: if self.method.find('gpu_2k') >= 0:
if self.advectedFields.vector: if self.advectedFields.isVector:
raise ValueError("Not implemented yet. GPU advection" + raise ValueError("Not implemented yet. GPU advection" +
" is only for scalar fields") " is only for scalar fields")
from parmepy.operator.gpu_particle_advection_2k \ from parmepy.operator.gpu_particle_advection_2k \
...@@ -96,7 +96,7 @@ class Advection(Operator): ...@@ -96,7 +96,7 @@ class Advection(Operator):
GPUParticleAdvection2k(self, method=self.method, GPUParticleAdvection2k(self, method=self.method,
**self.config) **self.config)
elif self.method.find('gpu_1k') >= 0: elif self.method.find('gpu_1k') >= 0:
if self.advectedFields.vector: if self.advectedFields.isVector:
raise ValueError("Not implemented yet. GPU advection" + raise ValueError("Not implemented yet. GPU advection" +
" is only for scalar fields") " is only for scalar fields")
from parmepy.operator.gpu_particle_advection_1k \ from parmepy.operator.gpu_particle_advection_1k \
......
...@@ -6,7 +6,7 @@ Analytic operator representation. ...@@ -6,7 +6,7 @@ Analytic operator representation.
from parmepy.constants import debug from parmepy.constants import debug
from parmepy.operator.continuous import Operator from parmepy.operator.continuous import Operator
from parmepy.mpi.topology import Cartesian 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): class Analytic(Operator):
......
...@@ -280,7 +280,7 @@ class GPUParticleAdvection(ParticleAdvection): ...@@ -280,7 +280,7 @@ class GPUParticleAdvection(ParticleAdvection):
for gpudf in self.variables: for gpudf in self.variables:
if __VERBOSE__: if __VERBOSE__:
print "deallocate :", gpudf.name print "deallocate :", gpudf.name
if gpudf.vector: if gpudf.isVector:
[gpudf.gpu_data[d].release() [gpudf.gpu_data[d].release()
for d in xrange(len(self.resolution))] for d in xrange(len(self.resolution))]
else: else:
......
...@@ -86,7 +86,7 @@ class GPUParticleAdvection1k(GPUParticleAdvection): ...@@ -86,7 +86,7 @@ class GPUParticleAdvection1k(GPUParticleAdvection):
## Result scalar ## Result scalar
particle_scalar = Field(self.advectedFields.topology.domain, particle_scalar = Field(self.advectedFields.topology.domain,
"Particle_Scalar", "Particle_Scalar",
vector=False) isVector=False)
self.part_scalar, dfId = particle_scalar.discretize( self.part_scalar, dfId = particle_scalar.discretize(
self.advectedFields.topology) self.advectedFields.topology)
GPUScalarField.fromScalarField( GPUScalarField.fromScalarField(
......
...@@ -90,7 +90,7 @@ class GPUParticleAdvection2k(GPUParticleAdvection): ...@@ -90,7 +90,7 @@ class GPUParticleAdvection2k(GPUParticleAdvection):
## Particle position ## Particle position
particle_position = Field(self.advectedFields.topology.domain, particle_position = Field(self.advectedFields.topology.domain,
"Particle_Position", "Particle_Position",
vector=False) isVector=False)
self.part_position, dfID = particle_position.discretize( self.part_position, dfID = particle_position.discretize(
self.advectedFields.topology) self.advectedFields.topology)
GPUScalarField.fromScalarField( GPUScalarField.fromScalarField(
...@@ -99,7 +99,7 @@ class GPUParticleAdvection2k(GPUParticleAdvection): ...@@ -99,7 +99,7 @@ class GPUParticleAdvection2k(GPUParticleAdvection):
## Result scalar ## Result scalar
particle_scalar = Field(self.advectedFields.topology.domain, particle_scalar = Field(self.advectedFields.topology.domain,
"Particle_Scalar", "Particle_Scalar",
vector=False) isVector=False)
self.part_scalar, dfId = particle_scalar.discretize( self.part_scalar, dfId = particle_scalar.discretize(
self.advectedFields.topology) self.advectedFields.topology)
GPUScalarField.fromScalarField( GPUScalarField.fromScalarField(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment