mapc2p.py.html CLAWPACK  
 Source file:   mapc2p.py
 Directory:   /Users/rjl/clawpack_src/clawpack_master/classic/examples/advection_2d_annulus
 Converted:   Mon Feb 19 2024 at 17:58:41   using clawcode2html
 This documentation file will not reflect any later changes in the source file.

 


from __future__ import absolute_import
def mapc2p(xc,yc):
    """
    Specifies the mapping to curvilinear coordinates -- should be consistent
    with mapc2p.f
    """
    from numpy import sin, cos

    # Polar coordinates (xc = r,  yc = theta)
    xp = xc * cos(yc)
    yp = xc * sin(yc)
    return xp,yp