<s> """<STR_LIT>""" <EOL> from __future__ import print_function <EOL> import math <EOL> import numpy as np <EOL> import mesh . patch as patch <EOL> from util import msg <EOL> def init_data ( my_data , rp ) : <EOL> """<STR_LIT>""" <EOL> msg . bold ( "<STR_LIT>" ) <EOL> if not isinstance ( my_data , patch . CellCenterData2d ) : <EOL> print ( my_data . __class__ ) <EOL> msg . fail ( "<STR_LIT>" ) <EOL> u = my_data . get_var ( "<STR_LIT>" ) <EOL> v = my_data . get_var ( "<STR_LIT>" ) <EOL> myg = my_data . grid <EOL> if ( myg . xmin != <NUM_LIT:0> or myg . xmax != <NUM_LIT:1> or <EOL> myg . ymin != <NUM_LIT:0> or myg . ymax != <NUM_LIT:1> ) : <EOL> msg . fail ( "<STR_LIT>" ) <EOL> u . d [ : , : ] = <NUM_LIT:1.0> - <NUM_LIT> * np . cos ( <NUM_LIT> * math . pi * myg . x2d ) * np . sin ( <NUM_LIT> * math . pi * myg . y2d ) <EOL> v . d [ : , : ] = <NUM_LIT:1.0> + <NUM_LIT> * np . sin ( <NUM_LIT> * math . pi * myg . x2d ) * np . cos ( <NUM_LIT> * math . pi * myg . y2d ) <EOL> def finalize ( ) : <EOL> """<STR_LIT>""" <EOL> msg = """<STR_LIT>""" <EOL> print ( msg ) </s>
