piglot.solver.input_file_solver.InputFileCase

class InputFileCase(name: str, fields: Dict[str, OutputField], generator: InputDataGenerator)[source]

Bases: Case, ABC

Base case class for input file-based solvers.

Methods

get_dependencies

Get the dependencies for a given input file.

get_fields

Get the fields to output for this case.

get_supported_fields

Get the supported fields for this input file type.

name

Return the name of the case.

read

Read the case from the configuration dictionary.

run

Run the case for the given set of parameters.

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

Get the dependencies for a given input file.

Override this method to provide custom dependencies.

Parameters

input_filestr

Input file to check for dependencies.

Returns

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

Substitution and copy dependencies for this input file.

get_fields() List[str][source]

Get the fields to output for this case.

Returns

List[str]

Fields to output for this case.

abstract 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.

name() str[source]

Return the name of the case.

Returns

str

Name of the case.

classmethod read(name: str, config: Dict[str, Any]) V[source]

Read the case from the configuration dictionary.

Parameters

namestr

Name of the case.

configDict[str, Any]

Configuration dictionary.

Returns

InputFileCase

Case to use for this problem.

run(parameters: ParameterSet, values: ndarray, tmp_dir: str) CaseResult[source]

Run the case for the given set of parameters.

Parameters

parametersParameterSet

Parameter set for this problem.

valuesnp.ndarray

Current parameters to evaluate.

tmp_dirstr

Temporary directory to run the problem.

Returns

CaseResult

Result of the case.