Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add random vector #225

Open
millerta opened this issue Jun 1, 2021 · 0 comments
Open

add random vector #225

millerta opened this issue Jun 1, 2021 · 0 comments

Comments

@millerta
Copy link
Collaborator

millerta commented Jun 1, 2021

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
@millerta millerta added this to the Release V3.5 milestone Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant