def createScene(node): node.gravity = "0 -1 0" node.dt = 0.1 scene.display_flags(node, show="Behavior Visual", hide="MechanicalMappings") scene.requires(node, "Flexible", "Compliant") n = 10 for x in [True, False]: color = "1 0 0 1" if x else "0 1 0 1" c = chain(node, name="chain-{}".format(x), n=n, compliance=1e-14, use_compliance=x, color=color) # ode = c.createObject('CompliantStaticSolver', # ls_iterations = 20, # ls_precision = 1e-14, # line_search = 1) ode = c.createObject( "CompliantImplicitSolver", stabilization=0, neglecting_compliance_forces_in_geometric_stiffness=False ) num = c.createObject("MinresSolver", iterations=100, precision=1e-14)
def createScene(node): node.gravity = '0 -10 0' node.dt = 1e-2 scene.display_flags(node, show = 'Behavior Visual CollisionModels', hide = 'MechanicalMappings') scene.requires(node, 'Flexible', 'Compliant') node.createObject('SimpleAnimationLoop') scene.contacts(node, response = 'FrictionCompliantContact', # response = 'CompliantContact', ) c = cloth(node) b = ball(node) ode = node.createObject('CompliantImplicitSolver', stabilization = 0, neglecting_compliance_forces_in_geometric_stiffness = False) num = node.createObject('ModulusSolver', iterations = 15, precision = 1e-6, nlnscg = True, anderson = 4)
def createScene(node): node.gravity = '0 -1 0' node.dt = 0.1 scene.display_flags(node, show='Behavior Visual', hide='MechanicalMappings') scene.requires(node, 'Flexible', 'Compliant') n = 10 for x in [True, False]: color = "1 0 0 1" if x else "0 1 0 1" c = chain(node, name='chain-{}'.format(x), n=n, compliance=1e-14, use_compliance=x, color=color) # ode = c.createObject('CompliantStaticSolver', # ls_iterations = 20, # ls_precision = 1e-14, # line_search = 1) ode = c.createObject( 'CompliantImplicitSolver', stabilization=0, neglecting_compliance_forces_in_geometric_stiffness=False) num = c.createObject('MinresSolver', iterations=100, precision=1e-14)
def createScene(node): node.gravity = '0 -1 0' node.dt = 1e-8 scene.display_flags(node, show='Behavior Visual', hide='MechanicalMappings') scene.requires(node, 'Flexible', 'Compliant') n = 100 c = chain(node, name='chain', n=n) ode = c.createObject('CompliantStaticSolver', ls_iterations=20, ls_precision=1e-14) ode.printLog = True script = Script(node) script.dofs = c.getObject('dofs') script.distance = c.getChild('distance').getObject('dofs') script.expected = np.array(list(reversed(xrange(1, n))))
def createScene(node): node.gravity = '0 -10 0' node.dt = 1e-5 scene.display_flags(node, show = 'Behavior Visual', hide = 'MechanicalMappings') scene.requires(node, 'Flexible', 'Compliant') static = beam(node, name = 'static', color = '1 0.8 0.2') ode = static.createObject('CompliantStaticSolver', ls_iterations = 10, ls_precision = 1e-5, line_search = 2, conjugate = True) ode.printLog = True
def createScene(node): node.gravity = '0 -10 0' node.dt = 1e-5 scene.display_flags(node, show='Behavior Visual', hide='MechanicalMappings') scene.requires(node, 'Flexible', 'Compliant') static = beam(node, name='static', color='1 0.8 0.2') ode = static.createObject('CompliantStaticSolver', ls_iterations=10, ls_precision=1e-5, line_search=2, conjugate=True) ode.printLog = True
def createScene(node): node.gravity = '0 -1 0' node.dt = 1 scene.display_flags(node, show = 'Behavior Visual', hide = 'MechanicalMappings') scene.requires(node, 'Flexible', 'Compliant') n = 10 c = chain(node, name = 'chain', n = n) ode = c.createObject('CompliantStaticSolver', ls_precision = 1e-14) # ode.printLog = True script = Script(node) script.dofs = c.getObject('dofs') script.distance = c.getChild('distance').getObject('dofs') script.expected = np.array( list(reversed(xrange(1, n))) )