132£®²»¹æÔòMesh: HPF ³ÌÐò |
USE HPF_LIBRARY
REAL x(nnode), flux(nedge)
INTEGER iedge(nedge,2)
INTEGER permute_node(nnode), permute_edge(nedge)
!HPF$ DISTRIBUTE x(BLOCK)
!HPF$ DISTRIBUTE flux(BLOCK)
!HPF$ ALIGN iedge(i,*) WITH flux(i)
!HPF$ ALIGN permute_edge(i) WITH flux(i)
!HPF$ ALIGN permute_node(i) WITH x(i)
CALL renumber_nodes( iedge, permute_node )
x(permute_node(:)) = x
FORALL (i=1:nedge) iedge(i,:) = permute_node(iedge(i,:))
permute_edge = GRADE_UP( iedge(:,1))
FORALL (i=1:nedge) iedge(i,:) = iedge(permute_edge(i),:)
err = tol * le6
DO WHILE (err > tol)
¡¡¡¡¡¡flux = (x(iedge(1:nedge,1))-x(iedge(1:nedge,2)))/2
¡¡¡¡¡¡x=SUM_SCATTER(-flux(1:nedge), x, iedge(1:nedge,1))
¡¡¡¡¡¡x=SUM_SCATTER( flux(1:nedge), x, iedge(1:nedge,2))
¡¡¡¡¡¡err = SUM( flux*flux**2 ) / nedge
END DO
Copyright: NPACT |