Skip to main content
Version: 12

viktor.external.dgeostability

DGeoStabilityAnalysis

class viktor.external.dgeostability.DGeoStabilityAnalysis(input_file)

Bases: viktor.external.external_program.ExternalProgram

DGeoStabilityAnalysis can be used to perform an analysis using DGeoStability on a third-party worker. To start an analysis call the method execute(), with an appropriate timeout (in seconds). To retrieve the results call the method get_output_file(), after execute().

Note: the input for the BytesIO object should be of type bytes. You can convert a string to bytes by calling the method encode(). Default encoding is ‘utf-8’.

Usage:

input_file = BytesIO("dgeostability input file body".encode('utf-8'))
dgeostability_analysis = DGeoStabilityAnalysis(input_file=input_file)
dgeostability_analysis.execute(timeout=10)
output_file = dgeostability_analysis.get_output_file()

Exceptions which can be raised during calculation: - viktor.errors.ExecutionError: generic error. Error message provides more information

Parameters

input_file (BytesIO) – BytesIO object with the body of the .sti input file.

get_output_file(extension='.sto')

Method can be used to retrieve the results generated by running an external analysis. Call method execute() first and get_output_file() afterwards.

Parameters

extension (str) – extension of the file you want to return; ‘.sto’, ‘.error.log’, ‘.err’

Return type

Optional[BytesIO]