Test Gradients¶
To test jacobian and gradient matrix, i.e. B
- class test_gradients.TestBMatrix¶
To test B-matrix.
- test__B_shape__given_1d_mesh()¶
AIM: To test the shape of the B matrix.
EXPECTED: True, for a 1D mesh the B matrix is a single rowed matrix and each element has 2 nodes i.e. (1,2)
- test__B_shape__given_2d_mesh()¶
AIM: To test the shape of the B matrix.
EXPECTED: True, for a 2D mesh the B matrix is a two rowed matrix and since each element has 4 nodes it must be (2,4)
- class test_gradients.TestJacobian¶
To test jacobian matrix.
- test__J_shape__given_1d_mesh()¶
AIM: To test the shape of the jacobian matrix.
EXPECTED: True, for a 1D mesh the jacobian is a single value.
- test__J_shape__given_2d_mesh()¶
AIM: To test the shape of the jacobian matrix.
EXPECTED: True, for a 2D mesh the jacobian is expected to be of shape (2,2).