|X|^2, where X is of type t_var_sol, so three values are returned: |X1|^2,|X2|^2,|LA|^2
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_sol_var_MHD3D), | intent(in) | :: | sf |
self |
FUNCTION sol_var_MHD3D_norm_2( sf ) RESULT(norm_2) IMPLICIT NONE !----------------------------------------------------------------------------------------------------------------------------------- ! INPUT VARIABLES CLASS(t_sol_var_MHD3D), INTENT(IN ) :: sf !!self !----------------------------------------------------------------------------------------------------------------------------------- ! OUTPUT VARIABLES REAL(wp) :: norm_2(sf%nvars) !----------------------------------------------------------------------------------------------------------------------------------- ! LOCAL VARIABLES !=================================================================================================================================== IF(.NOT.sf%initialized) CALL abort(__STAMP__,& 'taking the norm of a sol_var that is not initialized' ) norm_2(1)=SUM(sf%X1*sf%X1) norm_2(2)=SUM(sf%X2*sf%X2) norm_2(3)=SUM(sf%LA*sf%LA) END FUNCTION sol_var_MHD3D_norm_2