generalized Fortran text-file output
Currently, two different mex-functions exist to output text-data to observe the solution process (Sources/+phase_field/+mex/+output/Load_displ_output.f90
and Sources/+phase_field/+mex/+output/Convergence_output.f90
). To make the code more versatile and general (e.g. to output additional information such as the current crack tip position, crack growth rate, etc. without having to implement specialised output functions), it makes sense to have a common, modular mex-function to output text-based data.
The Fortran function takes the following input arguments:
- the data, e.g. the convergence information or the load-displacement information, the crack tip position:
[step, u_x, F_x, u_y, F_y]
- the names of the data columns, e.g.
{'step', 'displ_x', 'Force_x', 'displ_y', 'Force_y'}
- the filename, e.g.
'load_displ.dat'
If the file with the given filename does not already exist, a header row with the names is printed, otherwise only the data row is appended at the ending of the file.