NEML2 2.0.0
Loading...
Searching...
No Matches
core Namespace Reference

Classes

class  Factory
 
class  LabeledAxis
 
class  MatrixAssembler
 
class  Model
 
class  TensorValue
 
class  VariableName
 
class  VectorAssembler
 

Functions

list[str] diagnose (Model model)
 
Factory load_input (typing.Any path, str cli_args='')
 
Model load_model (typing.Any path, str name)
 

Detailed Description

NEML2 Python bindings

Function Documentation

◆ diagnose()

list[str] diagnose ( Model model)
  Diagnose common issues in model setup. Raises a runtime error including all identified issues,
  if any.

  :param model: Model to be diagnosed

◆ load_input()

Factory load_input ( typing.Any path,
str cli_args = '' )
  Parse all options from an input file. Note that Previously loaded input options
  will be discarded.

  :param path:     Path to the input file to be parsed
  :param cli_args: Additional command-line arguments to pass to the parser

◆ load_model()

Model load_model ( typing.Any path,
str name )
  A convenient function to load an input file and get a model.

  This function is equivalent to calling core.load_input followed by
  Factory.get_model. Note that this convenient function does not support passing
  additional command-line arguments and will force the creation of a new
  core.Model even if one has already been created. Use core.load_input and
  Factory.get_model if you need finer control over the model creation behavior.

  :param path:      Path to the input file to be parsed
  :param name:      Name of the model