copy Function

private function copy(matrix_in) result(matrix_out)

Dedicated function to copy a matrix structure into a new matrix structure. The datastructure contains pointers, such that simply setting matrix1 = matrix2 may result in pointer target losses (and wrong results).

Note

We should not overload the generic assignment(=) with this function, as it may clash with the constructor.

Type Bound

matrix_t

Arguments

Type IntentOptional Attributes Name
class(matrix_t), intent(in) :: matrix_in

the original matrix

Return Value type(matrix_t)

copy from the original matrix