Basic Controller¶
- class pyrefine.controller.basic.ControllerBasic(project_name, pbs=None)¶
Bases:
ControllerBaseMultiplies the complexity every
steps_per_complexitysteps by a fixed factor,complexity_multiplier. The default behavior is to double the complexity every 5 steps.- Parameters
project_name (
str) – The root name of the project (without any mesh numbers)pbs (
PBS) – PBS queue helper
- steps_per_complexity¶
The number of meshes per complexity. The default value is 5.
- Type
int
- complexity_multiplier¶
the multiplier applied to the complexity when the complexity needs to be updated. The default value is 2.0.
- Type
float
- compute_complexity(istep, current_complexity)¶
Basic complexity schedule that will double the value after n iterations
- Parameters
istep (
int) – Adaptation step numbercurrent_complexity (
float) – The current complexity in the driver. If doing a restart, the current complexity will be None
- Return type
complexity
- compute_iterations()¶
Computes number of iterations based on initial and final complexity which both need to be defined. Final complexity must be equal or greater than initial complexity.
- Return type
iterations