Skip to content
Snippets Groups Projects
Commit 0e61f80d authored by Amira Abdel-Rahman's avatar Amira Abdel-Rahman
Browse files

small adjustment

parent 912f6860
No related branches found
No related tags found
No related merge requests found
Pipeline #5870 passed
......@@ -181,7 +181,7 @@
// edge.color=edge.stresses[count]
// });
});
Graph.linkColor(({ stresses }) => stresses[count]);
// Graph.linkColor(({ stresses }) => stresses[count]);
// count++;
......
......@@ -185,6 +185,34 @@ function externalForce(currentTimeStep,N_position,N_force)
return N_force
end
function externalForce(currentTimeStep,N_position,N_force)
if(convert(Float64,N_force.z)>0.0)
pi=3.14159265359
a0=0.1;
f=5.0/10000.0;
t=currentTimeStep;
ampZ=0.0;
z= a0* CUDAnative.cos(2.0*3.14159265359*(f*t+ampZ))
ampY=0.25;
y= a0* CUDAnative.sin(2.0*3.14159265359*(f*t+ampY))
if(convert(Float64,N_force.z)>1.5)
z=-z
y=-y
end
return Vector3(0.0,y,z)
else
return Vector3(0.0,0.0,0.0)
end
end
function externalForce(currentTimeStep,N_position,N_force)
if(convert(Float64,N_force.z)>0.0)
pi=3.14159265359
......@@ -224,6 +252,8 @@ function externalForce(currentTimeStep,N_position,N_force)
end
function updateTemperature(currentRestLength,currentTimeStep,mat)
return currentRestLength
end
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment