4. Examples#

Example 1 (topological and logical criteria) :

Let ma be a mesh that already contains the mesh groups:

M1 M2 M3

and node groups:

N1 N2 N3
ma = DEFI_GROUP (reuse = ma, MAILLAGE = ma,

CREA_GROUP_MA = (_F (NOM = NM1, GROUP_MA = (GMA7, GMA9,…)), _F (NOM = NM2, UNION = (M1, NM1)), _F (NOM = NM3, DIFFE = (NM2, M2)),), CREA_GROUP_NO = _F (TOUT_GROUP_MA = “OUI”),

ma = DEFI_GROUP (reuse = ma, MAILLAGE = ma,

CREA_GROUP_MA = _F (NOM = NM4, GROUP_MA = (GMA7, GMA11, GMA13)) CREA_GROUP_NO = (_F (NOM = NN1, INTERSEC = (NM1, N1)), _F (GROUP_MA = NM4)))

After these two calls to command DEFI_GROUP, the mesh then contains:

  • mesh groups:

  • M1, M2, M3 (initial)

  • NM1 = (stitches: MA7, MA9,…)

  • NM2 = M1 « union » NM1

  • NM3 = NM2 « minus » M2

  • NM4 = (MAILLES: MA7, MA11, MA13)

  • node groups:

  • N1, N2, N3 (initial)

M1, M2, M3, NM1, NM2, NM3: group_no containing group_ma nodes with**same names*. These group_nos are created by the 1st command DEFI_GROUP.

  • NN1 = NM1 « intersection » N1

  • NM4 = (nodes in group_ma NM4)

Example 2 (geometric criteria) :

ma = DEFI_GROUP (reuse = ma, MAILLAGE = ma,

CREA_GROUP_MA = (_F (NOM = facesup, OPTION = “FACE_NORMALE”, VECT_NORMALE = (0., 0., 1. )), _F (NOM = S01, OPTION = “SPHERE”, POINT = (0., 0., 0.), RAYON = 1.),), CREA_GROUP_NO =( _F (NOM = BO_S01, OPTION = “ENV_SPHERE”, POINT =( 0.,0.,0.) , RAYON =1. , PRECISION =0.01), _F (NOM = S01_1, GROUP_MA = S01), _F (NOM = S01_2, OPTION = “ENV_SPHERE”, POINT =( 0.,0.,0.) , RAYON =0.5, PRECISION =0.5),), )

After DEFI_GROUP the ma mesh will contain 2 new GROUP_MA and 3 new GROUP_NO:

  • facesup contains facets whose normal is oriented according to \(\mathrm{OZ}\) (towards \(Z>0\)),

S01 contains**all**the cells where**one of the nodes* belongs to the sphere with radius 1. and centered in \(O\) (origin of the axes),

  • B0_S01 is the group of nodes that are in the vicinity of the envelope of the previous sphere (S01),

  • S01_1 is the group of all the nodes in the cells in the S01 group of elements; be careful: some nodes in this group may be outside the sphere!

  • S01_2 is the group of nodes included in the S01 sphere: \(∣d(M,O)-0.5∣\le 0.5\)