From 781c2dfe8557ffe6e712453802e37a146ceb2b27 Mon Sep 17 00:00:00 2001 From: Frederick Roy Date: Tue, 24 Sep 2024 20:37:38 +0900 Subject: [PATCH] remove aliases on topology components (#143) --- examples/others/SphereOnAPlane/softSphereFalling.pyscn | 4 ++-- examples/others/caduceus/reduced/reduced_caduceusNG.py | 2 +- examples/others/hexaBeam/reduced/reduced_hexaBeam.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/others/SphereOnAPlane/softSphereFalling.pyscn b/examples/others/SphereOnAPlane/softSphereFalling.pyscn index 60a2507..0ae734f 100644 --- a/examples/others/SphereOnAPlane/softSphereFalling.pyscn +++ b/examples/others/SphereOnAPlane/softSphereFalling.pyscn @@ -67,7 +67,7 @@ def createScene(rootNode): sphereTranslation = [0,7,0] model = solverNode.addChild('model') model.addObject('MeshVTKLoader', name='loader', filename=pathMesh+'sphere.vtk', translation=sphereTranslation) - model.addObject('Mesh',src = '@loader') + model.addObject('MeshTopology',src = '@loader') model.addObject('MechanicalObject', name='tetras', template='Vec3d', showIndices='false', showIndicesScale='4e-5', rx='0',printLog="0") model.addObject('UniformMass', totalMass='0.1', printLog='0') model.addObject('TetrahedronFEMForceField', template='Vec3d',youngModulus=30) @@ -109,7 +109,7 @@ def createScene(rootNode): #rotation=[30,0,0] planeNode = rootNode.addChild('Plane') planeNode.addObject('MeshOBJLoader', name='loader', filename="mesh/floorFlat.obj", triangulate="true",rotation=rotation) - planeNode.addObject('Mesh', src="@loader") + planeNode.addObject('MeshTopology', src="@loader") planeNode.addObject('MechanicalObject', src="@loader", rotation="0 0 0", translation="0 0 0", scale="1") planeNode.addObject('TriangleCollisionModel',simulated="0", moving="0",group="1",name='TriPlane') diff --git a/examples/others/caduceus/reduced/reduced_caduceusNG.py b/examples/others/caduceus/reduced/reduced_caduceusNG.py index 1cae53d..3d4be06 100644 --- a/examples/others/caduceus/reduced/reduced_caduceusNG.py +++ b/examples/others/caduceus/reduced/reduced_caduceusNG.py @@ -81,7 +81,7 @@ def Reduced_test( collis = Snake.addChild('collis') collis.addObject('MeshOBJLoader' , name = 'loader', filename = pathMesh + r'/mesh/meca_snake_900tri.obj', translation = add(translation,[0, 5, 0]), rotation = add(rotation,[0.0, 0.0, 0.0]), scale3d = multiply(scale,[1.0, 1.0, 1.0])) - collis.addObject('Mesh' , src = '@loader', name = 'topo') + collis.addObject('MeshTopology' , src = '@loader', name = 'topo') collis.addObject('MechanicalObject' , name = 'CollisModel') collis.addObject('TriangleCollisionModel' , selfCollision = False) collis.addObject('LineCollisionModel' , selfCollision = False) diff --git a/examples/others/hexaBeam/reduced/reduced_hexaBeam.py b/examples/others/hexaBeam/reduced/reduced_hexaBeam.py index 2e24f40..f9bcfe8 100644 --- a/examples/others/hexaBeam/reduced/reduced_hexaBeam.py +++ b/examples/others/hexaBeam/reduced/reduced_hexaBeam.py @@ -72,7 +72,7 @@ def Reduced_test( M1 = M1_MOR.addChild('M1') M1.addObject('MechanicalObject') M1.addObject('UniformMass' , totalMass = '0.1') - M1.addObject('RegularGrid' , nx = '4', ny = '4', nz = '20', xmin = '-9', xmax = '-6', ymin = '0', ymax = '3', zmin = '0', zmax = '19') + M1.addObject('RegularGridTopology' , nx = '4', ny = '4', nz = '20', xmin = '-9', xmax = '-6', ymin = '0', ymax = '3', zmin = '0', zmax = '19') M1.addObject('HyperReducedRestShapeSpringsForceField' , points = '0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15', stiffness = 1000000000000.0, name = 'reducedFF_M1_0', nbModes = nbrOfModes, performECSW = hyperReduction, modesPath = path + r'/data/modes.txt', RIDPath = path + r'/data/reducedFF_M1_0_RID.txt', weightsPath = path + r'/data/reducedFF_M1_0_weight.txt') M1.addObject('HyperReducedHexahedronFEMForceField' , name = 'reducedFF_M1_1', youngModulus = '4000', poissonRatio = '0.3', method = 'large', nbModes = nbrOfModes, performECSW = hyperReduction, modesPath = path + r'/data/modes.txt', RIDPath = path + r'/data/reducedFF_M1_1_RID.txt', weightsPath = path + r'/data/reducedFF_M1_1_weight.txt') M1.addObject('ModelOrderReductionMapping' , input = '@../MechanicalObject', modesPath = path + r'/data/modes.txt', output = '@./MechanicalObject')