Quickstart

Use Quickstart to check the installation, run one project, and inspect the returned result.

Prerequisites

Complete Installation before you start. The companion Quickstart Tutorial supplies mie2D.jcmp and its project support files: layout.jcm, materials.jcm, and sources.jcm. Run the files together from the tutorial root.

Inspect The Installation

Call info to inspect the JCMsuite installation and runtime details:

import jcmsuite

jcmsuite.info()

Run A Project

Pass a project path to solve. By default, the call waits for the solve to finish and returns a SolveResult. A SolveResult contains metadata and result data from the project:

import jcmsuite
result = jcmsuite.solve("mie2D.jcmp")

Inspect The Result

The result can include costs, eigenvalues, and postprocesses. A postprocess is result data declared by the project. Available properties depend on the project. For example, a scattering project does not populate eigenvalues.

The supplied mie2D.jcmp project declares an energy-flux postprocess first. Select this postprocess through result.postprocesses[0] before you inspect its data. Use to_dict() to convert it to a dictionary:

postprocess = result.postprocesses[0]
print(postprocess.to_dict())

The quickstart succeeds when the solve completes and the command prints a dictionary for the ElectromagneticFieldEnergyFlux postprocess. The exact numerical values depend on the JCMsuite version and runtime settings.

Troubleshoot The Quickstart

  • If jcmsuite cannot find JCMsuite, verify the configured installation path or JCMROOT. See Installation.

  • If the solve reports a license error, verify that the JCMsuite license is available to the process. Then run the command again.

  • If a project or project support file is missing, run the Quickstart Tutorial with its supplied files from the tutorial root.

  • If no postprocess is available, inspect titles() on result.postprocesses. Then verify that the project contains the expected PostProcess declaration.

The available export methods depend on the result data type. Continue to Working With Results for costs, eigenvalues, postprocesses, field exports, and export formats.

Getting Started

The Getting Started pages use one Mie-scattering project. The pages introduce fixed project inputs, project keys, templates, scans, parallel execution, and persistent results. Run each example from the documentation tutorial root with the command on the page.

See the complete runnable Quickstart example for the supplied project, project support files, and one runnable command.

Next Steps