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
function atomic_structure_center(self,weight)result(r)use strings,only:to_upperimplicit none class(atomic_structure)::selfcharacter(len=*),optional::weightreal(c_double)::r(3)character(len=8)::wtypecharacter(len=8),parameter::WTYPE_NONE='NONE'character(len=8),parameter::WTYPE_MASS='MASS'wtype=WTYPE_NONEif(present(weight))wtype=to_upper(weight)r=0select case(wtype)case(WTYPE_NONE)r=sum(self%xyz,2)/ubound(self%xyz,2)case(WTYPE_MASS)r=matmul(self%xyz,self%mass)/sum(self%mass)case defaulterror stop"Unknown weight type in atomic_structure_center: "//wtypeend select end function atomic_structure_center