lanl / LaGriT

Los Alamos Grid Toolbox (LaGriT) is a library of user callable tools that provide mesh generation, mesh optimization and dynamic mesh maintenance in two and three dimensions.
https://lanl.github.io/LaGriT/
Other
116 stars 48 forks source link

add random vector #225

Open millerta opened 3 years ago

millerta commented 3 years ago

macro for routine: random_vector / mo_name / attribute_name / nnodes|nelements / min_value / max_value

Example with current commands from Carl:

cmo / create / mopts

createpts / xyz / 3 3 1 / 0. 0. 0. / 1. 1. 0.
#
# Instead of the above, the opening lines could be:
# read / mesh.inp / mopts
#
cmo / addatt / mopts
cmo / addatt / mopts / x_save / vdouble / scalar / nnodes
cmo / addatt / mopts / random_vector / vdouble / scalar / nnodes
cmo / copyatt / mopts / mopts / x_save / xic
cmo / setatt / mopts / xic / 1 0 0 / 0.0
cmo / printatt / mopts / xic
perturb / 1 0 0 / 1.0 0.0 0.0
cmo / printatt / mopts / xic
cmo / copyatt / mopts / mopts / random_vector / xic
cmo / copyatt / mopts / mopts / xic / x_save

sort / mopts / index / ascending / ikey / random_vector

cmo / printatt / mopts / random_vector
cmo / printatt / mopts / ikey

finish