ADflow  v1.0
ADflow is a finite volume RANS solver tailored for gradient-based aerodynamic design optimization.
Variables
autoEditReverse Namespace Reference

Variables

string EXT = "_b.f90"
 
 DIR_ORI = sys.argv[1]
 
 DIR_MOD = sys.argv[2]
 
 patt_modules = re.compile(r"(\s*use\s*\w*)(_b)\s*")
 
 patt_module = re.compile(r"\s*module\s\w*")
 
 patt_module_start = re.compile("(\s*module\s)(\w*)(_b)\s*")
 
 patt_module_end = re.compile("(\s*end module\s)(\w*)(_b)\s*")
 
 patt_subroutine = re.compile(r"\s*subroutine\s\w*")
 
 patt_subend = re.compile(r"\s*end\s*subroutine")
 
 patt_comment = re.compile(r"\s*!.*")
 
 patt_inttype = re.compile(r"\s*integer\*4\s\w*")
 
list useful_modules
 
 file_object_ori = open(os.path.join(DIR_ORI, f), "r")
 
 all_src = file_object_ori.read()
 
bool isModule = False
 
bool hasSubroutine = False
 
 line = line.lower()
 
 f = f.replace("_b", "_b")
 
 file_object_mod = open(os.path.join(DIR_MOD, f), "w")
 
bool inSubroutine = False
 
 m = patt_modules.match(line)
 
bool found = False
 

Detailed Description

autoEdit - A Python tool to automatically edit a set of files
           according to the specified user rules:
G. Kenway

Variable Documentation

◆ all_src

autoEditReverse.all_src = file_object_ori.read()

Definition at line 56 of file autoEditReverse.py.

◆ DIR_MOD

autoEditReverse.DIR_MOD = sys.argv[2]

Definition at line 17 of file autoEditReverse.py.

◆ DIR_ORI

autoEditReverse.DIR_ORI = sys.argv[1]

Definition at line 16 of file autoEditReverse.py.

◆ EXT

string autoEditReverse.EXT = "_b.f90"

Definition at line 14 of file autoEditReverse.py.

◆ f

autoEditReverse.f = f.replace("_b", "_b")

Definition at line 76 of file autoEditReverse.py.

◆ file_object_mod

autoEditReverse.file_object_mod = open(os.path.join(DIR_MOD, f), "w")

Definition at line 79 of file autoEditReverse.py.

◆ file_object_ori

autoEditReverse.file_object_ori = open(os.path.join(DIR_ORI, f), "r")

Definition at line 51 of file autoEditReverse.py.

◆ found

bool autoEditReverse.found = False

Definition at line 97 of file autoEditReverse.py.

◆ hasSubroutine

bool autoEditReverse.hasSubroutine = False

Definition at line 63 of file autoEditReverse.py.

◆ inSubroutine

bool autoEditReverse.inSubroutine = False

Definition at line 83 of file autoEditReverse.py.

◆ isModule

bool autoEditReverse.isModule = False

Definition at line 62 of file autoEditReverse.py.

◆ line

string autoEditReverse.line = line.lower()

Definition at line 65 of file autoEditReverse.py.

◆ m

autoEditReverse.m = patt_modules.match(line)

Definition at line 95 of file autoEditReverse.py.

◆ patt_comment

autoEditReverse.patt_comment = re.compile(r"\s*!.*")

Definition at line 26 of file autoEditReverse.py.

◆ patt_inttype

autoEditReverse.patt_inttype = re.compile(r"\s*integer\*4\s\w*")

Definition at line 27 of file autoEditReverse.py.

◆ patt_module

autoEditReverse.patt_module = re.compile(r"\s*module\s\w*")

Definition at line 21 of file autoEditReverse.py.

◆ patt_module_end

autoEditReverse.patt_module_end = re.compile("(\s*end module\s)(\w*)(_b)\s*")

Definition at line 23 of file autoEditReverse.py.

◆ patt_module_start

autoEditReverse.patt_module_start = re.compile("(\s*module\s)(\w*)(_b)\s*")

Definition at line 22 of file autoEditReverse.py.

◆ patt_modules

autoEditReverse.patt_modules = re.compile(r"(\s*use\s*\w*)(_b)\s*")

Definition at line 20 of file autoEditReverse.py.

◆ patt_subend

autoEditReverse.patt_subend = re.compile(r"\s*end\s*subroutine")

Definition at line 25 of file autoEditReverse.py.

◆ patt_subroutine

autoEditReverse.patt_subroutine = re.compile(r"\s*subroutine\s\w*")

Definition at line 24 of file autoEditReverse.py.

◆ useful_modules

list autoEditReverse.useful_modules
Initial value:
1 = [
2  "bcroutines_b",
3  "turbbcroutines_b",
4  "utils_b",
5  "flowutils_b",
6  "walldistance_b",
7  "bcpointers_b",
8  "initializeflow_b",
9  "turbutils_b",
10  "sa_b",
11  "fluxes_b",
12  "solverutils_b",
13  "residuals_b",
14  "surfaceintegrations_b",
15 ]

Definition at line 32 of file autoEditReverse.py.