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

oxideRegrowth Python example error #93

Open
simbilod opened this issue Aug 22, 2024 · 1 comment
Open

oxideRegrowth Python example error #93

simbilod opened this issue Aug 22, 2024 · 1 comment

Comments

@simbilod
Copy link
Contributor

Run out-of-the-box, the oxideRegrowth Python example raises

simbil@simbilod ~/G/V/e/oxideRegrowth (update_examples) [127]> python oxideRegrowth.py config.txt    (process) 
Running 2D simulation.
Stability: 13.333333333333334
Traceback (most recent call last):
  File "/home/simbil/Github/ViennaPS/examples/oxideRegrowth/oxideRegrowth.py", line 50, in <module>
    domain.generateCellSet(
TypeError: generateCellSet(): incompatible function arguments. The following argument types are supported:
    1. (self: viennaps2d.viennaps2d.Domain, arg0: float, arg1: viennaps2d.viennaps2d.Material, arg2: bool) -> None

Invoked with: <viennaps2d.viennaps2d.Domain object at 0x7fe9aef75030>, 270.0, True

The faulty line is line 50 in the oxideRegrowth.py:

domain.generateCellSet(
    params["substrateHeight"] + params["numLayers"] * params["layerHeight"] + 10.0, True
)

The signature suggests that the second argument (material) is missing, see e.g. the C++ example:

  domain->generateCellSet(
      params.get("substrateHeight") +
          params.get("numLayers") * params.get("layerHeight") + 10.,
      ps::Material::GAS, true /* true means cell set above surface */);

However, rewriting line 50 as the following

domain.generateCellSet(
    params["substrateHeight"] + params["numLayers"] * params["layerHeight"] + 10.0, vps.Material.GAS, True
)

still raises an error:

simbil@simbilod ~/G/V/e/oxideRegrowth (update_examples) [1]> python oxideRegrowth.py config.txt      (process) 
Running 2D simulation.
Stability: 13.333333333333334
    Building cell set BVH took: 0.031742 s 
TypeError: Unregistered type : viennacs::DenseCellSet<double, 2>

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/simbil/Github/ViennaPS/examples/oxideRegrowth/oxideRegrowth.py", line 53, in <module>
    cellSet = domain.getCellSet()
              ^^^^^^^^^^^^^^^^^^^
TypeError: Unable to convert function return value to a Python type! The signature was
        (self: viennaps2d.viennaps2d.Domain) -> viennacs::DenseCellSet<double, 2>
@tobre1
Copy link
Member

tobre1 commented Aug 26, 2024

Unfortunately, the ViennaCS Python library, which provides the Cell-Set functionalities, is not yet available on PyPi. This package is required for the Cell-Set examples to work in Python.

However, we are actively working on a release for the ViennaCS Python package, so it should be available soon.

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