Associate a name with a element set based on various selection criteria and logical operators. Output element sets.
By convention, ifirst,ilast,istride syntax represents a set selection defined either by a set of elements from ifirst to ilast, with increments of istride (1 by default). A set selection can also be defined with eltset,get, eset_name where eset_name has been defined by the following eltset commands. Most commands with the syntax ifirst,ilast,istride can also use eltset,get, elset_name.
The following are the syntax and parameter definitions, click on options in table or scroll down the page.
attribute_name |
delete |
list |
logicals |
pset |
region |
quality volume |
quality aspect |
write |
attribute_name eltset/eset_name/ attribute_name /eq or ne or lt or gt or le or ge /value/
forms an eltset from elements in attribute_name that compare to value. The comparators are eq equal to, gt greater than, lt less than, ge greater than or equal, le less than or equal to, ne not equal.
delete eltset/eset_name/ delete
removes a previously define element set from current mesh object
list eltset/eset_name/ list eltset / / list
list all elements in eset_name. If the 2nd argument is empty, list all names all of eltsets for the mesh object
logicals eltset/eset_name/ union / eset1 eset2 [ eset3 ... ] / eltset/eset_name/ inter / eset1 eset2 [ eset3 ... ] / eltset/eset_name/ not / eset1 [ eset2 eset3 ... ] /
logical operations on previously defined eltsets. Each takes a list of any number of eltsets, separated by blanks or commas:
union: the cells in at least one of the listed eltsets.inter: the cells in every one of the listed eltsets.not with one eltset: the cells not in it. With two or more: the cells in eset1 and in none of the others, so not/e1/e2 means e1 and (not(e2)).One command can list up to 31 eltsets, and a mesh object can hold at most 32 eltsets at a time; remove the ones no longer needed with delete.
In LaGriT V3.3.3 and earlier, inter and not with three or more eltsets gave wrong results without a message (inter gave an empty set). With two eltsets they were correct, and union was correct with any number.
Examples:
eltset / e_lev2 / itetlev / eq / 2
eltset / e_leaf / itetkid / eq / 0
eltset / e_near / inclusive / pset,get,p_near
eltset / e_ref / inter / e_lev2 e_leaf e_near
eltset / e_any / union / e_lev2 e_near
eltset / e_other / not / e_leaf e_lev2 e_near
e_ref holds the leaf cells of level 2 that touch a vertex of p_near; e_any the cells of level 2 or touching p_near; e_other the leaf cells that are neither.
pset eltset/eset_name/ inclusive or exclusive or face /pset,get, pset_name/
forms an eltset from nodes in a pset with name pset_name. The following criteria are used to define which elements node set are included. The selection criteria is required.
region mregion eltset/eset_name/ region or mregion / region_name /
will return all nodes that are in the specified geometry region or material mregion given by its region_name.
This command calculates the center of mass of the element and determine which mregion or region the center lies in. It is possible if the interface surfaces are curved that the center will not lie in the same material or geometry region as the vertices. Using values of itetclr may give the better result.
volume aspect eltset/eset_name/ volume/ eq or ne or lt or gt or le or ge /value eltset/eset_name/ aspect/ eq or ne or lt or gt or le or ge /value
forms an eltset based on the quality criteria volume or aspect ratio. The value and comparator detirmines the set selection.
write eltset/eset_name or -all- / write /file_name[.cellset]/ ascii or binary
write or dump an element list with name eset_name to a file, options are ascii or binary. The argument -all- will write all eltsets in the mesh object.
eltset/element_set1/itetclr/eq/4
eltset/element_set2/face/pset/get/mypset
eltset/element_set3/inclusive/pset/get/mypset
eltset/element_set4/region/upper
eltset/element_set5/volume/lt/3.0
eltset/element_set5/delete
eltset / / list
These are various examples of the eltset command.
cmo / select / mo_hex
intersect_elements / mo_hex / mo_wells / if_inter
eltset / e_refine / if_inter / gt / 0
refine/ eltset / eltset,get,e_refine
cmo / setatt / mo_hex / if_inter / 1,0,0 / 0
eltset / e_refine / delete
This set of commands will intersect mesh object named mo_hex with mesh object named mo_wells. The attribute if_inter is created by intersect_elements and has a non-zero value for elements intersected by mo_wells. The selected set is refined. It is good practice to clean up if using names and attributes over again. Here we set if_inter values to 0 and remove the element set when we are done.