Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Convert protobuf Point to python Vector. #3239

Merged
merged 6 commits into from
Sep 2, 2024
Merged

Conversation

prmukherj
Copy link
Collaborator

@prmukherj prmukherj commented Aug 27, 2024

Earlier solver.fields.reduction. was returning a protobuf message. Currently they are wrapped as a python class.

For instance:

Earlier behavior:

>>> x = solver.fields.reduction.force(locations=["wall"])
>>> x
x: 2.862068334485282
y: -2.5299803741481259
z: -0.0014375438414745349

>>> type(x)
<class 'ansys.api.fluent.v0.common_api_pb2.Point'>

Current behavior:

>>> x = s.fields.reduction.force(locations=["wall"])
>>> x                                                
(2.600005424922768e-31, -1.080374020897745e-24, 3.302743550728087e-17)
>>> type(x) 
<class 'tuple'>
>>> type(x[0]) 
<class 'float'>

@prmukherj prmukherj self-assigned this Aug 27, 2024
@prmukherj prmukherj linked an issue Aug 27, 2024 that may be closed by this pull request
@prmukherj prmukherj marked this pull request as ready for review August 27, 2024 06:09
@prmukherj prmukherj enabled auto-merge (squash) August 27, 2024 12:49
@prmukherj prmukherj merged commit b720a5c into main Sep 2, 2024
26 of 27 checks passed
@prmukherj prmukherj deleted the fix/reduction_point branch September 2, 2024 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

solver.fields.reduction.force returns protobuf message
6 participants