initial upload
This commit is contained in:
82
test/level01/pset_readwrite/input.lgi
Executable file
82
test/level01/pset_readwrite/input.lgi
Executable file
@@ -0,0 +1,82 @@
|
||||
# test pset for zone and zonn files
|
||||
# option -all- will write one file for all psets
|
||||
# for single file, cat into single file
|
||||
# write zonn or zone only once at top
|
||||
# do not write stop until end of file
|
||||
|
||||
|
||||
|
||||
define X0 0.
|
||||
define X1 100.
|
||||
define Y0 0.
|
||||
define Y1 100.
|
||||
define Z0 1.
|
||||
define Z1 100.
|
||||
|
||||
define / NX / 11
|
||||
define / NY / 2
|
||||
define / NZ / 11
|
||||
|
||||
cmo/create/cmohex///hex
|
||||
createpts/brick/xyz/NX NY NZ /X0 Y0 Z0 / X1 Y1 Z1 / &
|
||||
1,1,1/ 1,1,0/ 1. 1. 1.
|
||||
resetpts itp
|
||||
|
||||
cmo/copyatt/cmohex cmohex/ imt zic
|
||||
cmo/printatt/ cmohex / imt minmax
|
||||
|
||||
pset/p1/ attribute imt/1,0,0/ lt 10.
|
||||
pset/p2/ attribute imt/1,0,0/ gt 90.
|
||||
pset/p3/ attribute imt/1,0,0/ eq 50.
|
||||
|
||||
cmo setatt cmohex idebug 10
|
||||
|
||||
# LIST the sets
|
||||
pset/-all- list
|
||||
pset/ list
|
||||
pset/ / list
|
||||
|
||||
|
||||
#######################################
|
||||
# Write all vertex, zonn and zone, ascii and binary
|
||||
|
||||
# vertex ascii
|
||||
pset/-all-/ write / out_pset_asc
|
||||
pset/-all-/ write / out_pset_bin / binary
|
||||
pset/-all-/ zone / out_pset_asc
|
||||
pset/-all-/ zone / out_pset_bin / binary
|
||||
pset/-all-/ zonn / out_pset_bin / binary
|
||||
pset/-all-/ zonn / out_pset_asc
|
||||
|
||||
#######################################
|
||||
# Write single vertex zonn and zone
|
||||
|
||||
pset/ p1 / zone / out_sngl_p1 / ascii / 10
|
||||
pset/ p2 / zonn / out_sngl_p2 / ascii / 20
|
||||
pset/ p3 / write / out_sngl_p3 / ascii / 30
|
||||
|
||||
#######################################
|
||||
# Read single vertex zonn and zone
|
||||
|
||||
read / zone / out_sngl_p1.zone / cmohex / iset10
|
||||
cmo printatt cmohex iset10 minmax
|
||||
read / zonn / out_sngl_p2.zonn / cmohex / iset20
|
||||
cmo printatt cmohex iset20 minmax
|
||||
|
||||
|
||||
#######################################
|
||||
# Write ELEMENTS
|
||||
eltset/e1/ inclusive pset,get,p1
|
||||
eltset/e1/write/ out_eltset_asc / ascii
|
||||
|
||||
# Read ELEMENTS
|
||||
# test read_element for zone file
|
||||
# there is no option to write element zone
|
||||
# use one created outside of lagrit
|
||||
|
||||
read zone_element input_element.zone cmohex ezone
|
||||
cmo printatt cmohex ezone minmax
|
||||
|
||||
finish
|
||||
|
||||
|
||||
Reference in New Issue
Block a user