Hello everyone,
i'm trying to include sediment slide to my model, but only on certain regions of the mesh. In the according subroutine (maxslope.f) this is done by a loop over the elements. I defined a polygon and checked if the first point of the element is inside this polygon (and so the slide is calculated) or outside (do nothing). Although i dont find any mistake it is not working... If i specify an element directly by it number it works...
In the following is the according code:
! LOOP ON ELEMENTS
DO IELEM=1,NELEM
!
I1=IKLE(IELEM,1)
I2=IKLE(IELEM,2)
I3=IKLE(IELEM,3)
NS=4
!the 4 corner-nodes of the polygon
XS(01)=74082
YS(01)=99787
XS(02)=74110
YS(02)=99821
XS(03)=74069
YS(03)=99840
XS(04)=74057
YS(04)=99804
!checks if the x- and y- coordinate of point 1 is inside polygon
IF(inpoly(XEL(IELEM,1),YEL(IELEM,1),xS,yS,nS))THEN
!for only one point
! IF(IELEM.EQ.59188)THEN
...
...
Has someone an idea or finds a mistake?
Best regards,
Markus