Optional Inputs for ChElementShellBST in PyChrono

18 views
Skip to first unread message

Qian Cao

unread,
Dec 7, 2021, 12:05:57 PM12/7/21
to ProjectChrono
Hello,

According to the documentation, there 3 optional inputs in ChElementShellBST for neighboring nodes in the triangular mesh:


What is the correct way to specify a "nullptr" in pychrono? Do I just pass in a None? Or do I pass in node initialized with a ChVectorD that's been SetNull()?

from pychrono.fea import fea

nullvec = chrono.ChVectorD()
nullvec.SetNull()
nullnode = fea.ChNodeFEAxyz(nullvec)

element = fea.ChElementShellBST()
element.SetNodes(node0, node1, node2, None, node4, nullnode)

Thanks,

Qian

ben...@wisc.edu

unread,
Dec 7, 2021, 1:10:39 PM12/7/21
to ProjectChrono
Hi Qian,
SetNull is a ChVector method that sets x,y,z = 0, so definitely not what you're looking for.
The Python equivalent of nullptr is, in fact, None.
There is also an example here:

Thanks,
Simon
Reply all
Reply to author
Forward
0 new messages