Glossary
This glossary defines the terms used for solve inputs and results.
The definitions describe how jcmsuite uses each term.
- Project
A JCM project file or template passed to
solve. A project with all values filled in uses the.jcmpextension. A project template uses the.jcmptextension and is rendered before the solve runs. See Solving Projects.import jcmsuite result = jcmsuite.solve("project.jcmp")
- Ordered project bundle
A
solveinput that contains more than one project in an ordered sequence.jcmsuiteruns the projects in the given order and treats them as one solve unit. A later project can use files produced by an earlier project. See Ordered Project Bundles.import jcmsuite bundle = jcmsuite.solve([ "prepare.jcmp", "analyze.jcmp", ]) analysis_result = bundle[1]
- Project support file
An input file used with a project while the solve runs. The supported files are
layout.jcm,grid.jcm,materials.jcm,sources.jcm, andboundary_conditions.jcm.jcmsuitecan render.jcmtversions oflayout.jcm,materials.jcm,sources.jcm, andboundary_conditions.jcm.grid.jcmhas no.jcmtvariant. See Selecting Project Support Files.project.jcmp layout.jcm materials.mie.jcm sources.jcm
- Templating
The process of rendering a project or project support file from a template. A template can contain JCM text, replacements based on project keys, and Python blocks.
jcmsuiterenders.jcmtfiles to.jcmfiles and.jcmptfiles to.jcmpfiles. See Templating.A template can contain a printf-style place for a project keys value:
Radius = %(radius)e
Pass the value with
keys=:result = jcmsuite.solve( "project.jcmp", keys={"radius": 0.33}, )
- JCMT pattern
An optional choice for a project support file. For
solve("project.jcmp"), the default selects file names without a suffix. Forsolve("project.jcmp", jcmt_pattern="mie"), the solve selects files such aslayout.mie.jcmbeforelayout.jcm. See Selecting Project Support Files.The JCMT pattern selects both
.jcmttemplates and plain.jcmfiles. It does not selectproject.mie.jcmpas an alternate project start file.project.jcmpremains the project file.result = jcmsuite.solve( "project.jcmp", jcmt_pattern="mie", )
- Project keys
Named values used when filling a JCM template. Pass one set of project keys to
solvewithkeys=. The names must match the places for values in the template. See Project Key substitution.import jcmsuite project_keys = {"radius": 0.5} result = jcmsuite.solve("project.jcmp", keys=project_keys)
- Batched project keys
A sequence of sets of project keys passed to
solvewithkeys=. The sets are handled in input order, and the result is aBatchSolveResult. See Batched Solves.import jcmsuite batched_project_keys = [ {"radius": 0.3}, {"radius": 0.4}, {"radius": 0.5}, ] batch = jcmsuite.solve("project.jcmp", keys=batched_project_keys)
- Filter function
A function that receives one set of project keys and returns
Truewhen the command must select that Resultbag entry. Pass a filter function toresultbag.management.remove. See Resultbag Management.resultbag.management.remove( filter_function=lambda project_keys: project_keys.get("material") == "Si" )
- Solve results
The values returned by
solveorget_results. Solve results can contain data for one project, several sets of project keys, or an ordered project bundle. Use the Working With Results guide to inspect and export this data. See the Result API for the exact return types.- Fieldbag
A native JCMsuite file containing computed field data. A solution fieldbag holds the saved solution used for postprocessing. For main-solve results,
filegives the solution fieldbag’s path. See SolveResult Access.- SolveResult
The return type for one project and no or one set of project keys. Use its attributes to access costs, eigenvalues, postprocesses, logs, and result information. See
SolveResultand SolveResult Access.- BatchSolveResult
The return type for one project and batched project keys. It preserves the input order and adds batch selection and export behavior. See Batched Results. The API type is
BatchSolveResult.- BundledSolveResult
The return type for one ordered project bundle and no or one set of project keys. Select a project to work with its result as a
SolveResult. See Bundled Results.bundle = jcmsuite.solve(["prepare.jcmp", "analyze.jcmp"]) result = bundle[1]
- BundledBatchSolveResult
The return type for one ordered project bundle repeated over batched project keys. Select a project to work with its results as a
BatchSolveResult. See Bundled Results.bundle_batch = jcmsuite.solve( ["prepare.jcmp", "analyze.jcmp"], keys=[{"radius": 0.3}, {"radius": 0.5}], ) analysis_batch = bundle_batch[1]
- Submission
A solve handle sent to a daemon that you complete later with
wait. Use a submission when the solve must continue while the code performs other operations. See Submit And Wait.submission = jcmsuite.solve( "project.jcmp", dispatch="submit", ) result = submission.wait()
- Resultbag entry
One stored result record in a Resultbag, identified by project keys and an optional JCMT pattern. A Resultbag can contain one entry for each set of project keys and multiple versions with a suffix. See Resultbag.
- Resultbag
Storage for solved results and access to saved runs. A
Resultbagstores entries in a.jcmrbfile and can reuse matching results in later solves. See Resultbag.import jcmsuite with jcmsuite.results.Resultbag("results.jcmrb") as resultbag: result = jcmsuite.solve( "project.jcmp", keys={"radius": 0.5}, resultbag=resultbag, )
- Base fields
The field values without parameter derivatives in a field export. Base fields do not include derivative fields. Use the
baseattribute of aFieldExportPayloadto access them. SeeFieldExportPayloadand Field Exports.base_fields = fields.base