piglot

Examples

  • Curve Fitting
  • Response Design
  • Analytical Objectives
  • Post-processing results

Advanced Options

  • Solver Options

Input file templates

  • Input File Options
  • Optimiser options
  • Solver options

Reference

  • API
  • Integration with solvers
  • Papers
piglot
  • piglot.solver.links package
  • View page source

piglot.solver.links package

Submodules

piglot.solver.links.fields module

Module for output fields from Links solver.

class OutFile(field: str | int, i_elem: int | None = None, i_gauss: int | None = None, x_field: str = 'LoadFactor')[source]

Bases: OutputField

Links .out file reader.

check(input_data: InputData) → None[source]

Sanity checks on the input file.

This checks for: - homogenised outputs only from microscopic simulations; - for GP outputs, ensure the input file lists the element and GP number requested; - whether the .out file is in single or double precision.

Parameters

input_dataInputData

Input data for this case.

Raises

RuntimeError

If requesting homogenised outputs from macroscopic analyses.

RuntimeError

If GP outputs have not been specified in the input file.

RuntimeError

If the requested element and GP has not been specified in the input file.

get(input_data: InputData) → OutputResult[source]

Get a parameter from the .out file.

Parameters

input_dataInputData

Input data for this case.

Returns

DataFrame

DataFrame with the requested fields.

classmethod read(config: Dict[str, Any]) → OutFile[source]

Read the output field from the configuration dictionary.

Parameters

configDict[str, Any]

Configuration dictionary.

Returns

Reaction

Output field to use for this problem.

class Reaction(field: str, group: int = 1)[source]

Bases: OutputField

Reaction outputs reader.

check(input_data: InputData) → None[source]

Sanity checks on the input file.

This checks if: - we are reading the reactions of a macroscopic analysis; - the file has NODE_GROUPS outputs.

Parameters

input_dataInputData

Input data for this case.

Raises

RuntimeError

If not reading a macroscopic analysis file.

RuntimeError

If reaction output is not requested in the input file.

get(input_data: InputData) → OutputResult[source]

Reads reactions from a Links analysis.

Parameters

input_dataInputData

Input data for this case.

Returns

array

2D array with load factor in the first column and reactions in the second.

classmethod read(config: Dict[str, Any]) → Reaction[source]

Read the output field from the configuration dictionary.

Parameters

configDict[str, Any]

Configuration dictionary.

Returns

Reaction

Output field to use for this problem.

piglot.solver.links.solver module

Module for Links solver.

class LinksCase(name: str, fields: Dict[str, OutputField], generator: InputDataGenerator, links: str, mpi_command: str | None = None)[source]

Bases: InputFileCase

Class for Links cases.

classmethod get_dependencies(input_file: str) → Tuple[List[str], List[str]][source]

Get the dependencies for a given input file.

Parameters

input_filestr

Input file to check for dependencies.

Returns

Tuple[List[str], List[str]]

Substitution and copy dependencies for this input file.

classmethod get_supported_fields() → Dict[str, Type[OutputField]][source]

Get the supported fields for this input file type.

Returns

Dict[str, Type[OutputField]]

Names and supported fields for this input file type.

class LinksSolver(cases: List[Case], parameters: ParameterSet, output_dir: str, tmp_dir: str, verbosity: str, parallel: int = 1)[source]

Bases: InputFileSolver

Links solver class.

classmethod get_case_class() → Type[InputFileCase][source]

Get the case class to use for this solver.

Returns

Type[InputFileCase]

InputFileCase class to use for this solver.

Module contents


© Copyright 2025, CM2S.

Built with Sphinx using a theme provided by Read the Docs.