I haven't made a code for it yet, however I will be making a Gauss-Seidel algorithm in Fortran, for solving very large matrices (actually to initiate the multi-gird method but that's irrelevant for this). As part of this, I wish to insert matrices into other matrices.
in MATLAB this is very simple, for example:
A=[1,2;3,4]
B=[A,A;A,A]
Outputs:
B =
1 2 1 2
3 4 3 4
1 2 1 2
3 4 3 4
as a 4x4 matrix.
However I have been having difficulties achieving the same with Fortran.
Please ignore the context - I don't require help with the GS/MG methods, I just need help embedding matrices (for other topics too), if at all possible!