Modular output of results
This issue builds upon issue #56 (closed) (modular Paraview output) which dealt with the Paraview part of generating the output files. This issue concerns the Matlab part which is calling the former, addressing two problems:
- Currently, all of the (possibly) not needed Gauss-point results are projected to the nodes for the paraview output.
- Future extensions of the library need further other variables to be output.
Thus, it makes sense, to also "modularize" the Matlab function phase_field.output.paraview_step
, meaning that one gives this function the input
-
filename
which is the complete filename of the paraview file to be generated, e.g.example_name/fields_00005.vtk
-
MESH
containing the mesh-struct for all nodes, elements etc. needed for the vtk-file -
RESULTS_NODES
which containsRESULTS_NODES.scalars
,RESULTS_NODES.vectors
,RESULTS_NODES.tensors
andRESULTS_NODES.labels
with the respective labels. They can directly be transferred to the Fortran-routine writing the file. -
RESULTS_GAUSSPTS
which containsRESULTS_GAUSSPTS.scalars
,RESULTS_GAUSSPTS.vectors
,RESULTS_GAUSSPTS.tensors
andRESULTS_GAUSSPTS.labels
with the respective labels. They need to be projected from the Gauss points to the nodes before they can then be transferred to the Fortran-routine writing the file.
With this modular setup, the idea is that a loop runs through the given Gauss point results and projects their values to the corresponding nodes instead of just having a hard-coded projection. Furthermore, this allows to extend the library arbitrarily, since this means that the structs of nodal and Gauss point results just contains additional fields.
Possibly, all of the above could be implemented into one Fortran routine instead of having a Matlab- and an Fortran-part for the output.
At this point, also check if it possible to get rid of the phase_field.mex.output.paraview_TEST
function.