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

Not possible to make a Cell with only one Region #11

Open
AnderGray opened this issue Sep 30, 2020 · 2 comments
Open

Not possible to make a Cell with only one Region #11

AnderGray opened this issue Sep 30, 2020 · 2 comments

Comments

@AnderGray
Copy link

AnderGray commented Sep 30, 2020

Hi,

I'm trying to make a Cell with only one Region, and I'm having some trouble.

Cell takes an array of Regions and a Julia Expr. No trouble with the array of Regions. The problem is that Julia converts :(1) to an Int

Surf = Sphere(Coord(0,0,0), 50.0)
Regions = [Region(Surf, -1)]
Cells = Cell(Regions, :(1))

returns the error:

ERROR: MethodError: Cannot `convert` an object of type Int64 to an object of type Expr
Closest candidates are:
  convert(::Type{T}, ::T) where T at essentials.jl:171
  Expr(::Any...) at boot.jl:224

Would a quick fix be?

Cells = Cell(Regions, :(1 ^ 1))

Any idea if that would break anything down the line for me?

Cheers,
Ander

@jtramm
Copy link
Owner

jtramm commented Oct 2, 2020

Thanks for reporting this! I'll try to take a look next week and will get back to you with my thoughts and/or a fix.

@AnderGray
Copy link
Author

Thanks :)

I tried it with :(1 ^ 1)) and it didn't seem to break anything

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

No branches or pull requests

2 participants