precice / matlab-bindings

MATLAB language bindings for preCICE
https://www.precice.org
GNU Lesser General Public License v3.0
5 stars 3 forks source link

n x d vs. d x n ordering of vector valued data #4

Closed BenjaminRodenberg closed 4 years ago

BenjaminRodenberg commented 4 years ago

Old discussion (https://github.com/precice/precice/issues/458), but now for the MATLAB bindings.

Which format should we follow?

BenjaminRodenberg commented 4 years ago

We do not have to hurry on this issue, but make sure to come to a reasonable decision before the release.

BenjaminRodenberg commented 4 years ago

We should also make sure to add some security checks on user input. See here.

ghost commented 4 years ago

In terms of user usage, I have seen that using n x d or d x n is a heavily personal choice. However, MATLAB stores its arrays in column-major order (FORTRAN-like). As such, keeping the d x n convention would save some memory-management steps in the interface with preCICE.

We could try keeping it as d x n and see if there is some feedback or comments from users.

ghost commented 4 years ago

We should also make sure to add some security checks on user input. See here.

I added the security checks in #14.

BenjaminRodenberg commented 4 years ago

However, MATLAB stores its arrays in column-major order (FORTRAN-like).

This sounds like we have a reasonable convention for MATLAB. Since #14 implements the checks, we also enforce this convention in our bindings. This closes the issue.