Skip to content

Assigning displacement on nodes (when using condense) #1068

Answered by kinnala
federicodalinger asked this question in Q&A
Discussion options

You must be logged in to vote

Something like:

x = basis.zeros()
D1 = basis.get_dofs('brace1').all('u')
x[D1] = [...]  # your values go here in the correct order
# the order is the same as in basis.doflocs[:, D1]
x = solve(*condense(K, f, x=x, D=D1))

If you have multiple braces then you can do D1, D2, etc. and concatenate them: D=np.concatenate((D1, D2)).

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
3 replies
@federicodalinger
Comment options

@kinnala
Comment options

@kinnala
Comment options

Answer selected by federicodalinger
Comment options

You must be logged in to vote
1 reply
@kinnala
Comment options

Comment options

You must be logged in to vote
2 replies
@kinnala
Comment options

@kinnala
Comment options

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