-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
33eeb43
commit ac6a395
Showing
4 changed files
with
104 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import copy | ||
import unittest | ||
import numpy as np | ||
import sympy as sp | ||
|
||
from mechpy.core.symbolic.coord import ( | ||
SymbolicCoordSystem, | ||
SymbolicCartesianCoordSystem, | ||
SymbolicCylindricalCoordSystem, | ||
SymbolicSphericalCoordSystem, | ||
) | ||
|
||
|
||
class TestSymbolicCoordSystem(unittest.TestCase): | ||
def test_eq(self): | ||
origin_a = (sp.Float(0), sp.Float(0), sp.Float(0)) | ||
basis_a = sp.symbols("x1 x2 x3") | ||
origin_b = (sp.Float(0), sp.Float(0), sp.Float(0)) | ||
basis_b = sp.symbols("x1 x2 x3") | ||
coord_system_a = SymbolicCoordSystem(origin_a, basis_a) | ||
coord_system_b = SymbolicCoordSystem(origin_b, basis_b) | ||
self.assertEqual(coord_system_a, coord_system_b) | ||
|
||
origin = (sp.Float(0), sp.Float(0), sp.Float(0)) | ||
basis = sp.symbols("x1 x2 x3") | ||
coord_system_a = SymbolicCoordSystem(origin, basis) | ||
coord_system_b = copy.deepcopy(coord_system_a) | ||
self.assertEqual(coord_system_a, coord_system_b) | ||
|