Subroutine compositionmapgen

出自 DDCC TCAD TOOL Manual
前往: 導覽搜尋

Subroutine compositionmapgen is a subroutine used to called after the program read-in the gmsh file. This routine is designed for user to generate composition map for the random alloy fluctuation. However, it is not limited on this. This one usually goes with subsroutine readEg. And this subroutine is activated by the command $gencompositionmap. The example is as follows


 Subroutine compositionmapgen
   use meshelement
   use global3d
   use compositionvar
   implicit none
   real(dp) :: x,y,z,qw_begin,qw_end
   integer(i8b) :: nodetype ,i ,j, k 

open(155,FILE="In.out") write(155,"(a11)")"$MeshFormat" write(155,"(a5)")"2 0 8" write(155,"(a9)")"$NodeData" write(155,"(a1)")"1" write(155,"(a8)")"Al_check" write(155,"(a1)")"1" write(155,"(a3)")"1.0" write(155,"(a1)")"3" write(155,"(a1)")"0" write(155,"(a1)")"1" write(155,*) mshnd%n

do i=1,mshnd%n ! Eg_check.out nodetype = mshnd%element(i) ! Get the node number x=mshnd%x(i) y=mshnd%y(i) z=mshnd%z(i) Incom_inter =0.0 if(z>=qw_begin .and. z<= qw_end) then Incom_inter=randm() end if write(155,*) i ,Incom_inter end do write(155,*) "$EndNodeData" close(155)
end subroutine