Skip to content

Resolve "Introduce a single System handle class"

brgerhar requested to merge 20-introduce-a-single-system-handle-class into devel

Closes #20

Step 1: MATLAB

  • wrap up structs and matrices always passed together (see Motivation)
  • add stress_state field and phase_field.init.StressState (uint8?) enumeration
    • instances: PlaneStrain (int value 1), PlaneStress (int value 2)
    • if need to specify built-in numeric type to get integer value (e.g. uint8(system.stress_state)), then instead add int read-only dependent property of phase_field.init.StressState enum
    • possible values are only: 'PLANE_STRAIN' (1) and 'PLANE_STRESS' (2), else error
  • refactor into read-only dependent properties
    • num_materials
  • Rename or drop init.all in favour of System constructor
    • opt. init.stiffness_matrix as a cached dependent property etc.
  • add diss_fct as a property

Step 2: F90

  • stress_state - no enums in F90 (came only in F2003), but refactor at least a small util to compute alpha from SYSTEM%stress_state and ni=> put in scalar_utils module;
    • utility function name: freddi_factor
  • [ ] optionally, passing objects to F90 via mex interface (instead to the task below)
    • look like this is only avail for C++ MEX Applications, cf. MATLAB Objects in MEX Functions docs => we need to either pass explicitly SYSTEM struct fields or, if still many after re-factoring, leave SYSTEM struct as a convenient way to pass multiple args
  • [ ] try get rid of SYSTEM structure and use instead explicitly parameters and structures needed by F90 functions (moved to #39 (closed) )
Edited by Ghost User

Merge request reports