Skip to content
Snippets Groups Projects
Commit 3b5b887a authored by Maren Kaluza's avatar Maren Kaluza Committed by Sebastian Müller
Browse files

Updated to type opti_sim_t with flexible opti data, minimal eval interface

New features:

- The eval interface only has two variables: config, opti_sim(:)
    - config contains the parameters. Also for example the indices. The
      indices are helpful for parallelization: the eval would only use a
      subset of domains.
    - opti_sim is an array that will have the size nDomains in case of
      mHM. Each element of the array is then of type opti_sim and can
      have an array of different optimization variables 'opti_vars'.
- opti_vars replaces specific optimization variables like runoff, et,
  tws, etc. You can add an arbitrary variable with dimension 1, 2, 3, 4
  or 5 with an arbitrary name like "runoff", "et", "tws", etc.
    - optivars contains:
      - add: to add a variable. -- This might not work correctly if
	a second variable is added and so on.
      - has: by name, if a variable is added.
      - allocate: allocates the space for the variable. It cannot be
	done through a pointer.
      - set_pointer: sets a pointer to the allocated space of a
	variable.

Changes of plan:

- The opti_sim input variable in the eval interface was not supposed to
  be an array. But it was more convenient that way and would have added
  another complicated layer to the code otherwise.
- There was not supposed to be a procedure 'allocate' in opti_sim. But
  int turned out, associated arrays cannot be allocated through
  pointers.
parent c1eb67ee
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment