Files
LaGriT/test/level01/refine_octree_prd/input.lgi
2025-12-17 11:00:57 +08:00

146 lines
4.1 KiB
Plaintext
Executable File

**************************************************************
* Test AMR refinement levels using principal refine direction (prd)
* Refine to 2 levels in xyz, refine to 7 levels in xy
* Use the refine command with amr keyword followed by iprd
* iprd - integer indicating the principal refinement direction.
* 123 = x,y,z
* 1 = x, 2 = y, 3 = z
* 12 = xy, 23 = yz, 13 = xz
* no amr flag reverts to the original octree without prd option
*
**************************************************************
* create a box with hex elements
cmo/create/cmo_hex///hex
createpts/brick/xyz/3,3,2/0.,0.,0./50.,50.,20./1,1,1
cmo/setatt/cmo_hex/imt/1,0,0/1
cmo/setatt/cmo_hex/idebug/3
cmo/set_id/cmo_hex/element/itetclr
* select a subset group of the hex elements to refine
pset/p1/geom/xyz/ 1,0,0/0.,0.,0./1. 1. 50.
cmo/setatt/cmo_hex/imt/pset,get,p1/2
* refine the selected set of elements in all directions
* begin compare here
refine/constant/imt1/linear/element/pset,get,p1/-1.,0.,0./inclusive/ amr 123
cmo status cmo_hex brief
* end compare here
rmpoint compress
* refine again
pset/p1/release
cmo/setatt/cmo_hex/imt/1,0,0/1
pset/p1/geom/xyz/ 1,0,0/0.,0.,0./1. 1. 50.
cmo/setatt/cmo_hex/imt/pset,get,p1/2
refine/constant/imt1/linear/element/pset,get,p1/-1.,0.,0./inclusive/ amr 123
rmpoint compress
* refine again in the x and y directions
pset/p1/release
cmo/setatt/cmo_hex/imt/1,0,0/1
pset/p1/geom/xyz/ 1,0,0/0.,0.,0./1. 1. 50.
cmo/setatt/cmo_hex/imt/pset,get,p1/2
refine/constant/imt1/linear/element/pset,get,p1/-1.,0.,0./inclusive/ amr 12
rmpoint compress
* refine again
pset/p1/release
cmo/setatt/cmo_hex/imt/1,0,0/1
pset/p1/geom/xyz/ 1,0,0/0.,0.,0./1. 1. 50.
cmo/setatt/cmo_hex/imt/pset,get,p1/2
refine/constant/imt1/linear/element/pset,get,p1/-1.,0.,0./inclusive/ amr 12
rmpoint compress
* refine again
pset/p1/release
cmo/setatt/cmo_hex/imt/1,0,0/1
pset/p1/geom/xyz/ 1,0,0/0.,0.,0./1. 1. 50.
cmo/setatt/cmo_hex/imt/pset,get,p1/2
refine/constant/imt1/linear/element/pset,get,p1/-1.,0.,0./inclusive/ amr 12
rmpoint compress
* refine again
pset/p1/release
cmo/setatt/cmo_hex/imt/1,0,0/1
pset/p1/geom/xyz/ 1,0,0/0.,0.,0./1. 1. 50.
cmo/setatt/cmo_hex/imt/pset,get,p1/2
refine/constant/imt1/linear/element/pset,get,p1/-1.,0.,0./inclusive/ amr 12
rmpoint compress
* refine again
pset/p1/release
cmo/setatt/cmo_hex/imt/1,0,0/1
pset/p1/geom/xyz/ 1,0,0/0.,0.,0./1. 1. 50.
cmo/setatt/cmo_hex/imt/pset,get,p1/2
refine/constant/imt1/linear/element/pset,get,p1/-1.,0.,0./inclusive/ amr 12
rmpoint compress
* refine again
pset/p1/release
cmo/setatt/cmo_hex/imt/1,0,0/1
pset/p1/geom/xyz/ 1,0,0/0.,0.,0./1. 1. 50.
cmo/setatt/cmo_hex/imt/pset,get,p1/2
* begin compare here
refine/constant/imt1/linear/element/pset,get,p1/-1.,0.,0./inclusive/ amr 123
rmpoint compress
cmo status cmo_hex brief
cmo printatt cmo_hex -all- minmax
* end compare here
*dump gmv output20_prd_L8.gmv
cmo delete cmo_hex
* Element set 3D
* one level xyz, second z
read avs input_hex.inp cmo_hex
eltset/ elm2 /itetclr/eq 2
pset/ pelm2 / eltset elm2
cmo setatt cmo_hex idebug 6
refine/constant/imt1/linear/element/pset,get,pelm2/-1.,0.,0./inclusive/ amr 123
rmpoint compress
eltset/ elm2 /itetclr/eq 2
pset/ pelm2 / eltset elm2
cmo setatt cmo_hex idebug 6
*begin compare here
refine/constant/imt1/linear/element/pset,get,pelm2/-1.,0.,0./inclusive/ amr 12
*end compare here
*dump gmv output21_L2x.gmv
cmo delete cmo_hex
* Element set 2D
* one level xy, second x
read avs input_quad.inp cmo_hex
cmo setatt cmo_hex idebug 6
cmo setatt cmo_hex imt1 1
resetpts itp
eltset/ elm2 /itetclr/ge 7
pset/ pelm2 / eltset elm2
refine/constant/imt1/linear/element/pset,get,pelm2/-1.,0.,0./inclusive/ amr 12
* begin compare here
cmo printatt cmo_hex itetclr
cmo printatt cmo_hex itetlev
cmo printatt cmo_hex itetkid
cmo printatt cmo_hex itetpar
* end compare here
*dump gmv output22_2d_L1xy.gmv cmo_hex ascii
eltset elm2 delete
pset pelm2 delete
eltset/ elm2 /itetclr/le 2
pset/ pelm2 / eltset elm2
* begin compare here
refine/constant/imt1/linear/element/pset,get,pelm2/-1.,0.,0./inclusive/ amr 1
* end compare here
*dump gmv output23_2d_L2xyz.gmv
* STOP
finish