Question: For the example above, the setup code provides the already partitioned matrices kpp , kpf , kfp and kff , the known prescribed displacement xp
For the example above, the setup code provides the already partitioned matrices kpp kpf kfp and kff the known prescribed displacement xp and the applied force Ff Note here that Ff is given as a d numpy array, where the first column of the array corresponds to "Force configuration and the second column corresponds to "Force configuration Write a code snippet that computes the displacement solution xf corresponding to the force configuration and the displacement solution xf corresponding to the force configuration Use the plottrussxf function given by the setup code to plot these displacement solutions. Store the images in the variables imagexf and imagexf
The setup code provides the functions mylu and mytriangularsolve, so you do not need to copy your functions again here.
Note: You must use these given functions to solve the linear system of equations, since you are not allowed to use any canned functionality such as numpy. linalg. inv, scipy. linalg.inv, scipy. linalg. lu scipy.linalg. lufactor, numpy. linalg. solve, scipy.linalg.solve, scipy.linalg.solvetriangular.
Note: The autograder will also count the number of times you call each of the given functions, so you should avoid using some of the functions too many times. For the two different force configurations, one element will remain the same for the two linear systems. What is the thing? And what is that extra function call that you can avoid? Your code snippet should define the following variables andor functions:
For the example above, the setup code provides the already partitioned matrices kpp kpf kfp and kff the known prescribed displacement xp and the applied force Ff Note here that Ff is given as a d numpy array, where the first column of the array corresponds to "Force configuration and the second column corresponds to "Force configuration Write a code snippet that computes the displacement solution xf corresponding to the force configuration and the displacement solution xf corresponding to the force configuration Use the plottrussxf function given by the setup code to plot these displacement solutions. Store the images in the variables imagexf and imagexf
The setup code provides the functions mylu and mytriangularsolve, so you do not need to copy your functions again here.
Note: You must use these given functions to solve the linear system of equations, since you are not allowed to use any canned functionality such as numpy. linalg. inv, scipy. linalg.inv, scipy. linalg. lu scipy.linalg. lufactor, numpy. linalg. solve, scipy.linalg.solve, scipy.linalg.solvetriangular.
Note: The autograder will also count the number of times you call each of the given functions, so you should avoid using some of the functions too many times. For the two different force configurations, one element will remain the same for the two linear systems. What is the thing? And what is that extra function call that you can avoid? Your code snippet should define the following variables andor functions:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
