Analytical Mapping#
Analytical Mappings are provided as symbolic expressions, which allow us to compute automatically their jacobian matrices and all related geometrical information.
Available mappings#
SymPDE objects |
Physical Dimension |
Logical Dimension |
Description |
---|---|---|---|
|
1D, 2D, 3D |
1D, 2D, 3D |
Identity Mapping object |
|
1D, 2D, 3D |
1D, 2D, 3D |
Affine Mapping object |
|
2D |
2D |
Polar Mapping object (Annulus) |
|
2D |
2D |
Target Mapping object |
|
2D |
2D |
Czarny Mapping object |
|
2D |
2D |
Collela Mapping object |
|
3D |
3D |
Parametrization of a torus (or a portion of it) |
|
3D |
2D |
surface obtained by “slicing” the torus above at r = a |
|
3D |
2D |
surface obtained by “twisting” the |
|
3D |
3D |
volume obtained by “extruding” the |
|
3D |
3D |
Parametrization of a sphere (or a portion of it) |
Examples#
from sympde.topology import Square
from sympde.topology import PolarMapping
ldomain = Square('A',bounds1=(0., 1.), bounds2=(0, np.pi))
mapping = PolarMapping('M1',2, c1= 0., c2= 0., rmin = 0., rmax=1.)
domain = mapping(ldomain)
x,y = domain.coordinates
mapping_1 = IdentityMapping('M1', 2)
mapping_2 = PolarMapping ('M2', 2, c1 = 0., c2 = 0.5, rmin = 0., rmax=1.)
mapping_3 = AffineMapping ('M3', 2, c1 = 0., c2 = np.pi, a11 = -1, a22 = -1, a21 = 0, a12 = 0)
A = Square('A',bounds1=(0.5, 1.), bounds2=(-1., 0.5))
B = Square('B',bounds1=(0.5, 1.), bounds2=(0, np.pi))
C = Square('C',bounds1=(0.5, 1.), bounds2=(np.pi-0.5, np.pi + 1))
D1 = mapping_1(A)
D2 = mapping_2(B)
D3 = mapping_3(C)
connectivity = [((0,1,1),(1,1,-1)), ((1,1,1),(2,1,-1))]
patches = [D1, D2, D3]
domain = Domain.join(patches, connectivity, 'domain')
A = Square('A',bounds1=(0.2, 0.6), bounds2=(0, np.pi))
B = Square('B',bounds1=(0.2, 0.6), bounds2=(np.pi, 2*np.pi))
C = Square('C',bounds1=(0.6, 1.), bounds2=(0, np.pi))
D = Square('D',bounds1=(0.6, 1.), bounds2=(np.pi, 2*np.pi))
mapping_1 = PolarMapping('M1',2, c1= 0., c2= 0., rmin = 0., rmax=1.)
mapping_2 = PolarMapping('M2',2, c1= 0., c2= 0., rmin = 0., rmax=1.)
mapping_3 = PolarMapping('M3',2, c1= 0., c2= 0., rmin = 0., rmax=1.)
mapping_4 = PolarMapping('M4',2, c1= 0., c2= 0., rmin = 0., rmax=1.)
D1 = mapping_1(A)
D2 = mapping_2(B)
D3 = mapping_3(C)
D4 = mapping_4(D)
connectivity = [((0,1,1),(1,1,-1)), ((2,1,1),(3,1,-1)), ((0,0,1),(2,0,-1)),((1,0,1),(3,0,-1))]
patches = [D1, D2, D3, D4]
domain = Domain.join(patches, connectivity, 'domain')