piglot.solver.input_file_solver.InputFileCase
- class InputFileCase(name: str, fields: Dict[str, OutputField], generator: InputDataGenerator)[source]
-
Base case class for input file-based solvers.
Methods
Get the dependencies for a given input file.
Get the fields to output for this case.
Get the supported fields for this input file type.
Return the name of the case.
Read the case from the configuration dictionary.
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.
- 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.