Skip to content

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

@AnderGray

Description

@AnderGray

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions