Welcome, Guest
Username: Password: Remember me

TOPIC: How to use Maskob ?

How to use Maskob ? 11 years 11 months ago #6577

  • gwenchou
  • gwenchou's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 7
Id' like to try the subroutine Maksob but i didn't manage to find out how ?
I've read everything on the forum, on the manuals but yet...didn't find out.


Could someone explain me how to do it with eventually an example file "Maskob.f" modified or a maskel table... that's the very point i don't understand).

Thanks in adavance for your help.
The administrator has disabled public write access.

How to use Maskob ? 11 years 11 months ago #6579

  • jmhervouet
  • jmhervouet's Avatar
Hello,

Actually I don't really like this possibility in Telemac but well, it consists of cancelling finite element integrals on a number of triangles, so that the results are just like if these triangles are removed from the mesh.

MASKOB is called when you set the keyword:

ELEMENTS MASKED BY USER : YES

In this case the array MASKEL is set to 1.D0 before calling MASKOB, so you basically just need to cancel MASKEL on the elements you want to mask.

For example if you want to masl element 125 you just write :

MASKEL(125)=0.D0

The difficulty is that the remaining mesh must be a finite element mesh, e.g. two elements masked that have a single point in common is not a finite element mesh.

Another difficulty is that element 125 has a modified value in parallel and you do not know in which processor you will be. If you have only few elements to mask, you can do a loop on all elements and try to recognise them by their gravity center for example, allowing a tolerance to account for truncation errors. Please have a look at the guide for programming in the Telemac system for more details on data structures, for example note that MESH%XEL%R is a double precision array that gives the X-coordinate of points in an element.

With best regards,

Jean-Michel Hervouet
The administrator has disabled public write access.

How to use Maskob ? 11 years 11 months ago #6580

  • gwenchou
  • gwenchou's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 7
Thank you very much for your quick and clear answer.
In practical terms, i have to put "ELEMENTS MASKED BY USER = true" in my steering file. And then ?

Do i have to modify the Maskob.f or create a new file in my simulation folder ?
In fact, where do i have to put the "MASKEL(NELEM)=0.D0" command ?

Sorry, if that question seems a bit stupid.
The administrator has disabled public write access.

How to use Maskob ? 11 years 11 months ago #6583

  • gwenchou
  • gwenchou's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 7
I guess that i have to call it in my fortran file.
I put the subroutine in my folder i called it in my steering file and i tried this :

! *****************
SUBROUTINE MASKOB
! *****************
!
&(MASKEL,X,Y,IKLE,NELEM,NELMAX,NPOIN,AT,LT)
!
!***********************************************************************
! TELEMAC2D V6P1 21/08/2010
!***********************************************************************
!
!brief FORMALLY REMOVES ELEMENTS FROM THE MESH,
!+ USING THE MASKING ARRAY MASKEL:
!+
!+ MASKEL = 0.D0 FOR MASKED ELEMENTS
!+
!+ MASKEL = 1.D0 FOR'NORMAL' ELEMENTS
!
!warning USER SUBROUTINE; DOES NOTHING BY DEFAULT
!
!history J-M JANIN (LNH)
!+ 17/08/1994
!+ V5P2
!+
!
!history N.DURAND (HRW), S.E.BOURBAN (HRW)
!+ 13/07/2010
!+ V6P0
!+ Translation of French comments within the FORTRAN sources into
!+ English comments
!
!history N.DURAND (HRW), S.E.BOURBAN (HRW)
!+ 21/08/2010
!+ V6P0
!+ Creation of DOXYGEN tags for automated documentation and
!+ cross-referencing of the FORTRAN sources
!
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!| AT |-->| TIME IN SECONDS
!| IKLE |-->| CONNECTIVITY TABLE.
!| LT |-->| CURRENT TIME STEP
!| MASKEL |-->| MASKING OF ELEMENTS
!| | | =1. : NORMAL =0. : MASKED ELEMENT
!| NELEM |-->| NUMBER OF ELEMENTS
!| NELMAX |-->| MAXIMUM NUMBER OF ELEMENTS
!| NPOIN |-->| NUMBER OF POINTS
!| X |-->| ABSCISSAE OF POINTS IN THE MESH
!| Y |-->| ORDINATES OF POINTS IN THE MESH
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
IMPLICIT NONE
!
!+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
!
INTEGER, INTENT(IN) :: NELEM,NPOIN,NELMAX,LT
INTEGER, INTENT(IN) :: IKLE(NELMAX,*)
!
DOUBLE PRECISION, INTENT(INOUT) :: MASKEL(NELEM)
DOUBLE PRECISION, INTENT(IN) :: X(NPOIN),Y(NPOIN),AT
!
!+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
!
!
!
!
MASKEL(125)=0.D0
!
!
!
RETURN
END


Bu i have an error.
"Non-Numeric character in statement lable"
The administrator has disabled public write access.
Moderators: pham

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.