Nodes of different colours represent the following:
Solid arrows point from a submodule to the (sub)module which it is
descended from. Dashed arrows point from a module or program unit to
modules which it uses.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Source Code
subroutine cross(a,b,c)use mod_global_parametersuse mod_geometrydouble precision,dimension(ndir),intent(in)::a,bdouble precision,dimension(ndir),intent(out)::c! ndir needs to be three for this to work!!!if(ndir==3)then select case(coordinate)case(Cartesian,Cartesian_stretched,spherical)c(1)=a(2)*b(3)-a(3)*b(2)c(2)=a(3)*b(1)-a(1)*b(3)c(3)=a(1)*b(2)-a(2)*b(1)case(cylindrical)c(r_)=a(phi_)*b(z_)-a(z_)*b(phi_)c(phi_)=a(z_)*b(r_)-a(r_)*b(z_)c(z_)=a(r_)*b(phi_)-a(phi_)*b(r_)case defaultcall mpistop('geometry not implemented in cross(a,b,c)')end select else call mpistop("cross in particles needs to be run with three components!")end if end subroutine cross