Skip to content

Commit

Permalink
Revert reduction changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
prmukherj committed Oct 16, 2024
1 parent 536f25c commit eb0c1b7
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/ansys/fluent/core/services/reduction.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import weakref

import grpc
import numpy as np

from ansys.api.fluent.v0 import reduction_pb2 as ReductionProtoModule
from ansys.api.fluent.v0 import reduction_pb2_grpc as ReductionGrpcModule
Expand Down Expand Up @@ -299,7 +298,7 @@ def centroid(self, locations, ctxt=None) -> Any:
request = ReductionProtoModule.CentroidRequest()
request.locations.extend(self._get_location_string(locations, ctxt))
response = self.service.centroid(request)
return np.array([response.value.x, response.value.y, response.value.z])
return (response.value.x, response.value.y, response.value.z)

def count(self, locations, ctxt=None) -> Any:
"""Get count."""
Expand All @@ -321,7 +320,7 @@ def force(self, locations, ctxt=None) -> Any:
request = ReductionProtoModule.ForceRequest()
request.locations.extend(self._get_location_string(locations, ctxt))
response = self.service.force(request)
return np.array([response.value.x, response.value.y, response.value.z])
return (response.value.x, response.value.y, response.value.z)

def mass_average(self, expression, locations, ctxt=None) -> Any:
"""Get mass average."""
Expand Down Expand Up @@ -384,14 +383,14 @@ def pressure_force(self, locations, ctxt=None) -> Any:
request = ReductionProtoModule.PressureForceRequest()
request.locations.extend(self._get_location_string(locations, ctxt))
response = self.service.pressure_force(request)
return np.array([response.value.x, response.value.y, response.value.z])
return (response.value.x, response.value.y, response.value.z)

def viscous_force(self, locations, ctxt=None) -> Any:
"""Get viscous force."""
request = ReductionProtoModule.ViscousForceRequest()
request.locations.extend(self._get_location_string(locations, ctxt))
response = self.service.viscous_force(request)
return np.array([response.value.x, response.value.y, response.value.z])
return (response.value.x, response.value.y, response.value.z)

def volume(self, locations, ctxt=None) -> Any:
"""Get volume."""
Expand Down Expand Up @@ -422,7 +421,7 @@ def moment(self, expression, locations, ctxt=None) -> Any:
request.expression = expression
request.locations.extend(self._get_location_string(locations, ctxt))
response = self.service.moment(request)
return np.array([response.value.x, response.value.y, response.value.z])
return (response.value.x, response.value.y, response.value.z)

def sum(self, expression, locations, weight, ctxt=None) -> Any:
"""Get sum."""
Expand Down

0 comments on commit eb0c1b7

Please sign in to comment.