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

Look into make_a_copy functionality for settings named object #3294

Open
seanpearsonuk opened this issue Sep 12, 2024 · 1 comment
Open

Look into make_a_copy functionality for settings named object #3294

seanpearsonuk opened this issue Sep 12, 2024 · 1 comment

Comments

@seanpearsonuk
Copy link
Collaborator

seanpearsonuk commented Sep 12, 2024

materials method make_a_copy returns string as follows:

>>> x=solver.setup.materials.fluid.make_a_copy(from_="water",to="water-2")
>>> x
"'water"

Rename goes like this (it returns a string list):

>>> solver.setup.materials.fluid.rename(old="bob", new="bobby")
["'bob"]

create behaves differently to make_a_copy. create returns an object. Why only this one?

>>> mysolid = solver.setup.materials.solid.create("mysolid")
>>> mysolid
<flapi.flobject.child_object_type object at 0x00000000D30002E0>
>>> mysolid.chemical_formula = "SiO2"
>>> mysolid.density = 2650
@prmukherj
Copy link
Collaborator

Discussion from Scrum (24/09/2024)

solver.setup.materials.fluid.make_a_copy(from_="water",to="water-2") -->> Should return python object like 'create'

solver.setup.materials.fluid.rename(old="bob", new="bobby") -->> Can be fixed from settings-api to not return anything

@prmukherj prmukherj self-assigned this Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants