Skip to content

How to initialize "global" variables before @InitLocalVariables ? #554

Answered by thelfer
Mora1n asked this question in Q&A
Discussion options

You must be logged in to vote

@Mora1n I did not see your anwer, sorry

I'd like to use flag to record the loading status (i.e. loading or unloading) of each Gaussian point. At first the flag is set to 1 to represent the loading status, and then the generalized shear stress (which is what I chose here) is compared between two time steps to determine whether it is loading or unloading, and once it is unloading the flag is set to 0 and not modified, and the different statuses result in different Young's modulus. So I need to define a flag before @InitLocalVariable and set it to 1. Here the val are set to an extremely large value in order to initialize flag only once at the first time (normally it is very difficult to get…

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@thelfer
Comment options

@Mora1n
Comment options

@thelfer
Comment options

@thelfer
Comment options

Answer selected by Mora1n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants