diff --git a/.flake8 b/.flake8 deleted file mode 100644 index 43bdcf1f3..000000000 --- a/.flake8 +++ /dev/null @@ -1,8 +0,0 @@ -[flake8] -extend-exclude = - src/build/fort_depend.py - src/adjoint/autoEdit/autoEdit*.py - src_cs/build/complexify.py - adflow/pyWeightAndBalance.py - adflow/pyWingCG.py - adflow/om_*.py diff --git a/.gitignore b/.gitignore index 5a438dc04..8894f6f17 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,8 @@ syntax:glob +# Ignore pre-commit config +.pre-commit-config.yaml + *.mod *.o *.a diff --git a/LICENSE.md b/LICENSE.md index f00c4e890..ea66f3598 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -17,4 +17,3 @@ University of Michigan's Multidisciplinary Design Optimization Laboratory (MDO L College of Engineering, Aerospace Engineering Department\ http://mdolab.engin.umich.edu/ ______________________________________________________________________________ - diff --git a/Makefile b/Makefile index 60c05126d..1f0eb626f 100644 --- a/Makefile +++ b/Makefile @@ -29,4 +29,3 @@ clean: adflow_build: ln -sf config/config.mk config.mk; (cd src/build/ && make) - diff --git a/Makefile_CS b/Makefile_CS index 473ee006f..cd88a90c9 100644 --- a/Makefile_CS +++ b/Makefile_CS @@ -34,4 +34,3 @@ adflow_build: (cd src_cs/build/ && make -f Makefile1 directories) (cd src_cs/build/ && make -f Makefile1 complexify) (cd src_cs/build/ && make) - diff --git a/adflow/mphys/mphys_adflow.py b/adflow/mphys/mphys_adflow.py index df61c2141..4dd92da9b 100644 --- a/adflow/mphys/mphys_adflow.py +++ b/adflow/mphys/mphys_adflow.py @@ -43,9 +43,9 @@ def print_func_call(component): message += f" for {component.ap.name} problem" if component.comm.rank == 0: - print(f"\n{'='*len(message)}", flush=True) + print(f"\n{'=' * len(message)}", flush=True) print(message, flush=True) - print(f"{'='*len(message)}", flush=True) + print(f"{'=' * len(message)}", flush=True) def set_vol_coords(solver, inputs): @@ -309,7 +309,7 @@ def _getTriangulatedMeshSurface(self, groupName=None, **kwargs): # Now go around the face and add a triangle for each adjacent pair # of points. This assumes an ordered connectivity from the - # meshwarping + # mesh warping for i in range(faceSize): idx = faceNodes[i] p0.append(avgPt) diff --git a/adflow/pyADflow.py b/adflow/pyADflow.py index 9f11d44ce..8cbdfc990 100644 --- a/adflow/pyADflow.py +++ b/adflow/pyADflow.py @@ -88,7 +88,7 @@ def __init__(self, comm=None, options=None, debug=False, dtype="d"): # Load the compiled module using MExt, allowing multiple # imports try: - self.adflow + _ = self.adflow except AttributeError: curDir = os.path.basename(os.path.dirname(os.path.realpath(__file__))) self.adflow = MExt.MExt("libadflow", curDir, debug=debug)._module @@ -457,8 +457,8 @@ def setDisplacements(self, aeroProblem, dispFile): # Now we need to search each localX in X to find the corresponding D try: from scipy.spatial import KDTree - except ImportError: - raise Error("scipy must be available to use setDisplacements") + except ImportError as err: + raise Error("scipy must be available to use setDisplacements") from err tree = KDTree(numpy.array(X)) d, index = tree.query(localX) for j in range(len(localX)): @@ -783,7 +783,6 @@ def addIntegrationSurface(self, fileName, familyName, isInflow=True, coordXfer=N Parameters ---------- - fileName : str Surface Plot 3D file (may have multiple zones) defining integration surface. @@ -809,8 +808,7 @@ def addIntegrationSurface(self, fileName, familyName, isInflow=True, coordXfer=N # Check that the family name is not already defined: if familyName.lower() in self.families: raise Error( - "Cannot add integration surface with family name '%s'" - "because the name it already exists." % familyName + "Cannot add integration surface with family name '%s'because the name it already exists." % familyName ) # Need to add an additional family so first figure out what @@ -888,7 +886,6 @@ def addActuatorRegion( Parameters ---------- - fileName : str Surface Plot 3D file (multiblock ascii) defining the closed region over which the integration is to be applied. @@ -945,7 +942,7 @@ def addActuatorRegion( # else. if familyName.lower() in self.families: raise Error( - "Cannot add ActuatorDiskRegion with family name '%s'" "because the name it already exists." % familyName + "Cannot add ActuatorDiskRegion with family name '%s'because the name it already exists." % familyName ) # Need to add an additional family so first figure out what @@ -1029,7 +1026,7 @@ def addUserFunction(self, funcName, functions, callBack): >>> def LoverD(funcs): funcs['L/D'] = funcs['cl']/funcs['cd'] return funcs - >>> CFDSolver.addUserFunction('L/D', ['cl','cd'], LoverD) + >>> CFDSolver.addUserFunction("L/D", ["cl", "cd"], LoverD) """ funcName = funcName.lower() @@ -1039,11 +1036,11 @@ def addUserFunction(self, funcName, functions, callBack): # Now check that we've supplied at least 2 or more functions if len(functions) == 1: - raise Error("addUserFunction requries at least 2 existing functions" " to be provided") + raise Error("addUserFunction requries at least 2 existing functions to be provided") # Check that each of the functions are valid: for func in functions: if func not in self.adflowCostFunctions: - raise Error("Supplied function %s to addUserFunction " "not know to ADflow" % func) + raise Error("Supplied function %s to addUserFunction not known to ADflow" % func) self.adflowUserCostFunctions[funcName] = adflowUserFunc(funcName, functions, callBack) return funcName @@ -1057,7 +1054,7 @@ def addFunction(self, funcName, groupName, name=None): routine may be used to "change the name" of a function. For example, - >>> addFunction('cd', None, 'super_cd') + >>> addFunction("cd", None, "super_cd") will add a function that is the same as 'cd', but called 'super_cd'. @@ -1083,13 +1080,14 @@ def addFunction(self, funcName, groupName, name=None): def addFunctions(self, funcNames, groupNames, names=None): """Add a series of new functions to ADflow. This is a vector version of - the addFunction() routine. See that routine for more documentation.""" + the addFunction() routine. See that routine for more documentation. + """ if names is None: names = [None] * len(funcNames) if len(funcNames) != len(groupNames) or len(funcNames) != len(names): - raise Error("funcNames, groupNames, and names all have to be " "lists of the same length") + raise Error("funcNames, groupNames, and names all have to be lists of the same length") newFuncNames = [] for i in range(len(funcNames)): @@ -1148,9 +1146,7 @@ def setRotationRate(self, rotCenter, rotRate, cgnsBlocks=None): elif aeroProblem.liftIndex == 3: rotations = [p, q, r] else: - raise Error( - "Invalid lift direction. Must be 2 or 3 for " "steady rotations and specifying an aeroProblem" - ) + raise Error("Invalid lift direction. Must be 2 or 3 for steady rotations and specifying an aeroProblem") else: rotations = rotRate @@ -1429,7 +1425,7 @@ def getConvergenceHistory(self, workUnitTime=None): Examples -------- >>> CFDsolver(ap) - >>> CFDsolver.evalFunctions(ap1, funcs, ['cl', 'cd']) + >>> CFDsolver.evalFunctions(ap1, funcs, ["cl", "cd"]) >>> hist = CFDSolver.getConvergenceHistory() >>> if MPI.COMM_WORLD.rank == 0: >>> with open(os.path.join(output_dir, "convergence_history.pkl"), "wb") as f: @@ -1563,7 +1559,7 @@ def evalFunctions(self, aeroProblem, funcs, evalFuncs=None, ignoreMissing=False) -------- >>> funcs = {} >>> CFDsolver(ap) - >>> CFDsolver.evalFunctions(ap1, funcs, ['cl', 'cd']) + >>> CFDsolver.evalFunctions(ap1, funcs, ["cl", "cd"]) >>> funcs >>> # Result will look like (if aeroProblem, ap1, has name of 'wing'): >>> # {'wing_cl':0.501, 'wing_cd':0.02750} @@ -1693,7 +1689,7 @@ def evalFunctionsSens(self, aeroProblem, funcsSens, evalFuncs=None): Examples -------- >>> funcSens = {} - >>> CFDsolver.evalFunctionsSens(ap1, funcSens, ['cl', 'cd']) + >>> CFDsolver.evalFunctionsSens(ap1, funcSens, ["cl", "cd"]) """ # This is the one and only gateway to the getting derivatives @@ -2565,9 +2561,7 @@ def solveSep( funcName = "%s_%s" % (ap.name, sepName) if not self.getOption("rkreset") and self.getOption("usenksolver"): - ADFLOWWarning( - "RKReset option is not set. It is usually necessary " "for solveSep() when NK solver is used." - ) + ADFLOWWarning("RKReset option is not set. It is usually necessary for solveSep() when NK solver is used.") # Solve first problem ap.alpha = alpha0 @@ -2677,7 +2671,6 @@ def writeSolution(self, outputDir=None, baseName=None, number=None, writeSlices= Parameters ---------- - outputDir : str Use the supplied output directory baseName : str @@ -3234,7 +3227,7 @@ def setSurfaceCoordinates(self, coordinates, groupName=None): self._updateGeomInfo = True if self.mesh is None: - raise Error("Cannot set new surface coordinate locations without a mesh" "warping object present.") + raise Error("Cannot set new surface coordinate locations without a mesh warping object present.") # First get the surface coordinates of the meshFamily in case # the groupName is a subset, those values will remain unchanged. @@ -3267,7 +3260,7 @@ def setAeroProblem(self, aeroProblem, releaseAdjointMemory=True): # See if the aeroProblem has adflowData already, if not, create. try: - aeroProblem.adflowData + _ = aeroProblem.adflowData except AttributeError: aeroProblem.adflowData = adflowFlowCase() aeroProblem.ptSetName = ptSetName @@ -3459,7 +3452,7 @@ def _setAeroProblemData(self, aeroProblem, firstCall=False): # modified if they are different than the current option. AP = aeroProblem try: - AP.savedOptions + _ = AP.savedOptions except AttributeError: AP.savedOptions = {"adflow": {}} @@ -3524,11 +3517,11 @@ def _setAeroProblemData(self, aeroProblem, firstCall=False): # Do some checking here for things that MUST be specified: if AP.mach is None: - raise Error("'mach' number must be specified in the aeroProblem" " for ADflow.") + raise Error("'mach' number must be specified in the aeroProblem for ADflow.") if areaRef is None: - raise Error("'areaRef' must be specified in aeroProblem" " for ADflow.") + raise Error("'areaRef' must be specified in aeroProblem for ADflow.") if chordRef is None: - raise Error("'chordRef' must be specified in aeroProblem" " for ADflow.") + raise Error("'chordRef' must be specified in aeroProblem for ADflow.") # Now set defaults if alpha is None: @@ -4050,7 +4043,7 @@ def _setupAdjoint(self, reform=False): def releaseAdjointMemory(self): """ - release the PETSc Memory that have been allocated + Release the PETSc Memory that have been allocated """ if self.adjointSetup: self.adflow.adjointutils.destroypetscvars() @@ -4060,7 +4053,7 @@ def solveAdjoint(self, aeroProblem, objective, forcePoints=None, structAdjoint=N # Remind the user they are using frozen turbulence. if self.getOption("frozenTurbulence") and self.myid == 0: self.getOption("equationType").lower() == "rans" and ADFLOWWarning( - "Turbulence is frozen!!! DERIVATIVES WILL BE WRONG!!! " "USE AT OWN RISK!!!" + "Turbulence is frozen!!! DERIVATIVES WILL BE WRONG!!! USE AT OWN RISK!!!" ) # May be switching aeroProblems here @@ -4130,7 +4123,8 @@ def solveAdjoint(self, aeroProblem, objective, forcePoints=None, structAdjoint=N def _processAeroDerivatives(self, dIda, dIdBC): """This internal furncion is used to convert the raw array ouput from the matrix-free product bwd routine into the required - dictionary format.""" + dictionary format. + """ funcsSens = {} @@ -4200,7 +4194,8 @@ def _processAeroDerivatives(self, dIda, dIdBC): def _setAeroDVs(self): """Do everything that is required to deal with aerodynamic - design variables in ADflow""" + design variables in ADflow + """ DVsRequired = list(self.curAP.DVs.keys()) for dv in DVsRequired: @@ -4221,7 +4216,7 @@ def _setAeroDVs(self): pass else: raise Error( - "The design variable '%s' as specified in the" " aeroProblem cannot be used with ADflow." % key + "The design variable '%s' as specified in the aeroProblem cannot be used with ADflow." % key ) def solveAdjointForRHS(self, inVec, relTol=None): @@ -4292,7 +4287,7 @@ def saveAdjointRHS(self, baseFileName, objective): def computeStabilityParameters(self): """ - run the stability derivative driver to compute the stability parameters + Run the stability derivative driver to compute the stability parameters from the time spectral solution """ self.adflow.utils.stabilityderivativedriver() @@ -4499,7 +4494,8 @@ def getAdjointResNorms(self): def getResNorms(self): """Return the initial, starting and final Res Norms. Typically - used by an external solver.""" + used by an external solver. + """ return ( numpy.real(self.adflow.iteration.totalr0), numpy.real(self.adflow.iteration.totalrstart), @@ -4508,7 +4504,8 @@ def getResNorms(self): def setResNorms(self, initNorm=None, startNorm=None, finalNorm=None): """Set one of these norms if not None. Typlically used by an - external solver""" + external solver + """ if initNorm is not None: self.adflow.iteration.totalr0 = initNorm if startNorm is not None: @@ -4986,7 +4983,7 @@ def computeJacobianVectorProductBwd( # can't do it. xDVDeriv may be specified even when no # mesh is present. if xSDeriv: - raise Error("Could not complete requested xSDeriv " "derivatives since no mesh is present") + raise Error("Could not complete requested xSDeriv derivatives since no mesh is present") # Process all the way back to the DVs: if xDvDeriv: @@ -5007,7 +5004,7 @@ def computeJacobianVectorProductBwd( ) else: if self.comm.rank == 0: - ADFLOWWarning("No mesh object is present. No geometric " "derivatives computed.") + ADFLOWWarning("No mesh object is present. No geometric derivatives computed.") # Include aero derivatives here: xdvbar.update(self._processAeroDerivatives(extrabar, bcdatavaluesbar)) @@ -5146,7 +5143,8 @@ def getAdjointStateSize(self): that are on this processor. The reason this is different from getStateSize() is that if frozenTurbulence is used for RANS, the nonlinear system has 5+neq turb states per cell, while the - adjoint still has 5.""" + adjoint still has 5. + """ if self.getOption("frozenTurbulence"): nstate = self.adflow.flowvarrefstate.nwf else: @@ -5160,7 +5158,8 @@ def getAdjointStateSize(self): def getSpatialSize(self): """Return the number of degrees of spatial degrees of freedom on this processor. This is (number of nodes)*(number of - spectral instances)*3""" + spectral instances)*3 + """ nnodes = self.adflow.adjointvars.nnodeslocal[0] ntime = self.adflow.inputtimespectral.ntimeintervalsspectral @@ -5174,7 +5173,8 @@ def getNCells(self): def getStates(self): """Return the states on this processor. Used in aerostructural - analysis""" + analysis + """ return self.adflow.nksolver.getstates(self.getStateSize()) @@ -5348,7 +5348,8 @@ def setAdjoint(self, adjoint, objective=None): def getAdjoint(self, objective): """Return the adjoint values for objective if they - exist. Otherwise just return zeros""" + exist. Otherwise just return zeros + """ if objective in self.curAP.adflowData.adjoints: return self.curAP.adflowData.adjoints[objective] @@ -5357,7 +5358,8 @@ def getAdjoint(self, objective): def getResidual(self, aeroProblem, res=None, releaseAdjointMemory=True): """Return the residual on this processor. Used in aerostructural - analysis""" + analysis + """ self.setAeroProblem(aeroProblem, releaseAdjointMemory) if res is None: res = numpy.zeros(self.getStateSize()) @@ -5424,13 +5426,13 @@ def getFreeStreamResidual(self, aeroProblem): def _getSurfaceSize(self, groupName, includeZipper=True): """Internal routine to return the size of a particular surface. This - does *NOT* set the actual family group""" + does *NOT* set the actual family group + """ if groupName is None: groupName = self.allFamilies if groupName not in self.families: raise Error( - "'%s' is not a family in the CGNS file or has not been added" - " as a combination of families" % groupName + "'%s' is not a family in the CGNS file or has not been added as a combination of families" % groupName ) [nPts, nCells] = self.adflow.surfaceutils.getsurfacesize(self.families[groupName], includeZipper) @@ -5600,8 +5602,7 @@ def setOption(self, name, value): setValue = self.adflow.oversetapi.setblockpriority(blkName, value[blkName]) if not setValue and self.myid == 0: ADFLOWWarning( - "The block name %s was not found in the CGNS file " - "and could not set it's priority" % blkName + "The block name %s was not found in the CGNS file and could not set it's priority" % blkName ) # Special option has been set so return from function @@ -5928,7 +5929,8 @@ def _getDefaultOptions(): def _getImmutableOptions(self): """We define the list of options that *cannot* be changed after the object is created. ADflow will raise an error if a user tries to - change these. The strings for these options are placed in a set""" + change these. The strings for these options are placed in a set + """ return ( "gridfile", @@ -6625,7 +6627,8 @@ def _setForcedFileNames(self): def _createZipperMesh(self): """Internal routine for generating the zipper mesh. This operation is - postposted as long as possible and now it cannot wait any longer.""" + postposted as long as possible and now it cannot wait any longer. + """ # Verify if we already have previous failures, such as negative volumes self.adflow.killsignals.routinefailed = self.comm.allreduce( @@ -6668,12 +6671,14 @@ def finalizeUserIntegrationSurfaces(self): def _expandString(self, s): """Expand a supplied string 's' to be of the constants.maxstring - length so we can set them in fortran""" + length so we can set them in fortran + """ return s + " " * (256 - len(s)) def _createFortranStringArray(self, strList): """Setting arrays of strings in Fortran can be kinda nasty. This - takesa list of strings and returns the array""" + takesa list of strings and returns the array + """ arr = numpy.zeros((len(strList), self.adflow.constants.maxcgnsnamelen), dtype="str") arr[:] = " " @@ -6698,7 +6703,8 @@ def _convertFortranStringArrayToList(self, fortArray): def _readPlot3DSurfFile(self, fileName, convertToTris=True, coordXfer=None): """Read a plot3d file and return the points and connectivity in - an unstructured mesh format""" + an unstructured mesh format + """ pts = None conn = None @@ -6808,7 +6814,7 @@ def evalFunctions(self, funcs): # Make sure the funcName was actually added: if self.funcName not in funcs: raise Error( - "The func '%s' (must be lower-case) was " "not supplied from user-supplied function." % self.funcName + "The func '%s' (must be lower-case) was not supplied from user-supplied function." % self.funcName ) def evalFunctionsSens(self): diff --git a/adflow/pyADflow_C.py b/adflow/pyADflow_C.py index 5ac633e9d..261cf86d3 100644 --- a/adflow/pyADflow_C.py +++ b/adflow/pyADflow_C.py @@ -39,7 +39,7 @@ def __init__(self, *args, **kwargs): curDir = os.path.basename(os.path.dirname(os.path.realpath(__file__))) self.adflow = MExt.MExt("libadflow_cs", curDir, debug=debug)._module - ADFLOW.__init__(self, dtype="D", *args, **kwargs) + ADFLOW.__init__(self, *args, dtype="D", **kwargs) def _on_setOption(self, name, value): """ diff --git a/adflow/pyDynamicPerformance.py b/adflow/pyDynamicPerformance.py index 71300688b..33ab03c6b 100644 --- a/adflow/pyDynamicPerformance.py +++ b/adflow/pyDynamicPerformance.py @@ -91,7 +91,7 @@ def calculateFrequencyAndDamping(Cmq, Clalpha, Cd, Cmalpha, Cmalphadot, mass, Iy def calculateNAlpha(Clalpha, rho, Area, U, mass, g): """ - calculate the g normalized lift derivative + Calculate the g normalized lift derivative """ nalpha = rho * U**2 * Area * Clalpha / (2 * mass * g) diff --git a/adflow/pyPerformanceClass.py b/adflow/pyPerformanceClass.py index 5bdeb8bf1..0308a8561 100644 --- a/adflow/pyPerformanceClass.py +++ b/adflow/pyPerformanceClass.py @@ -29,7 +29,6 @@ class PERFORMANCE(object): - """ Basic Performance class to handle dynamic handling qualities constraints """ @@ -132,7 +131,7 @@ def calculateFrequencyAndDamping(self, Cmq, Clalpha, Cd, Cmalpha, Cmalphadot, ma def calculateNAlpha(self, Clalpha, rho, Area, U, mass, g): """ - calculate the g normalized lift derivative + Calculate the g normalized lift derivative """ nalpha = rho * U**2 * Area * Clalpha / (2 * mass * g) @@ -141,7 +140,7 @@ def calculateNAlpha(self, Clalpha, rho, Area, U, mass, g): def computeStaticMargin(self, averagesol, geom, wbc, acg): """ - compute the percent static margin and return + Compute the percent static margin and return """ # Compute the MAC [MAC, C4MAC] = wbc.calculateWingMAC(acg) @@ -212,7 +211,7 @@ def thumbprintDriver(self, acg, wbc, geom, averagesol, rho, V, A, thickness): def thumbprintDriverpyGeo(self, acg, wbc, geom, averagesol, rho, V, A, surface): """ - run the routines to calculate the CAP values + Run the routines to calculate the CAP values """ # Get Aircraft weight W = wbc.estimateWeight(acg) @@ -250,7 +249,7 @@ def thumbprintDriverpyGeo(self, acg, wbc, geom, averagesol, rho, V, A, surface): def CAPDriver(self, acg, wbc, geom, averagesol, rho, V, A, thickness): """ - run the routines to calculate the CAP values + Run the routines to calculate the CAP values """ # Get Aircraft weight W = wbc.estimateWeight(acg) @@ -300,7 +299,7 @@ def CAPDriver(self, acg, wbc, geom, averagesol, rho, V, A, thickness): def CAPDriverpyGeo(self, acg, wbc, geom, averagesol, rho, V, A, surface): """ - run the routines to calculate the CAP values + Run the routines to calculate the CAP values """ # Get Aircraft weight W = wbc.estimateWeight(acg) @@ -343,7 +342,7 @@ def CAPDriverpyGeo(self, acg, wbc, geom, averagesol, rho, V, A, surface): def computeStaticMarginDerivative(self, x, geo, dvFunc, geom, wbc, acg): """ - compute the percent static margin derivative and return + Compute the percent static margin derivative and return """ xw = copy.deepcopy(x) for i in xw.keys(): @@ -373,7 +372,7 @@ def computeStaticMarginDerivative(self, x, geo, dvFunc, geom, wbc, acg): def CAPDerivativeDriver(self, x, geo, con, acg, wbc, geom, dvFunc, rho, V, A): """ - compute the derivative of the CAP function... + Compute the derivative of the CAP function... """ # print 'dvlists',geo.DV_listGlobal,geo.DV_namesGlobal,'local', geo.DV_listLocal,geo.DV_namesLocal dCondx = con.getThicknessSensitivity(geo, "con") @@ -427,7 +426,7 @@ def CAPDerivativeDriver(self, x, geo, con, acg, wbc, geom, dvFunc, rho, V, A): def CAPDerivativeDriverpyGeo(self, x, geo, con, acg, wbc, geom, dvFunc, rho, V, A, surface, surfInst): """ - compute the derivative of the CAP function... + Compute the derivative of the CAP function... """ # print 'dvlists',geo.DV_listGlobal,geo.DV_namesGlobal,'local', geo.DV_listLocal,geo.DV_namesLocal # dCondx = con.getThicknessSensitivity(geo,'con') @@ -485,7 +484,7 @@ def CAPDerivativeDriverpyGeo(self, x, geo, con, acg, wbc, geom, dvFunc, rho, V, def CAPDerivativeDriverpyGeoFD(self, x, geo, con, acg, wbc, geom, dvFunc, rho, V, A, surface, surfInst): """ - compute the derivative of the CAP function... + Compute the derivative of the CAP function... """ # print 'dvlists',geo.DV_listGlobal,geo.DV_namesGlobal,'local', geo.DV_listLocal,geo.DV_namesLocal # dCondx = con.getThicknessSensitivity(geo,'con') @@ -548,7 +547,7 @@ def CAPDerivativeDriverpyGeoFD(self, x, geo, con, acg, wbc, geom, dvFunc, rho, V def thumbprintDerivativeDriver(self, x, geo, con, acg, wbc, geom, dvFunc, rho, V, A): """ - compute the derivative of the thumbprint function... + Compute the derivative of the thumbprint function... """ # print 'dvlists',geo.DV_listGlobal,geo.DV_namesGlobal,'local', geo.DV_listLocal,geo.DV_namesLocal dCondx = con.getThicknessSensitivity(geo, "con") @@ -600,7 +599,7 @@ def thumbprintDerivativeDriver(self, x, geo, con, acg, wbc, geom, dvFunc, rho, V def thumbprintDerivativeDriverpyGeo(self, x, geo, con, acg, wbc, geom, dvFunc, rho, V, A, surface, surfInst): """ - compute the derivative of the thumbprint function... + Compute the derivative of the thumbprint function... """ # print 'dvlists',geo.DV_listGlobal,geo.DV_namesGlobal,'local', geo.DV_listLocal,geo.DV_namesLocal # dCondx = con.getThicknessSensitivity(geo,'con') diff --git a/adflow/pyWeightAndBalance.py b/adflow/pyWeightAndBalance.py index 600df7135..3351317fc 100644 --- a/adflow/pyWeightAndBalance.py +++ b/adflow/pyWeightAndBalance.py @@ -26,7 +26,6 @@ # Standard Python modules # ============================================================================= import os, sys, copy -import pdb import time # from cmath import pi,cos,tan,sin @@ -48,7 +47,6 @@ class WEIGHTANDBALANCE(Base): - """ Implementation of basic preliminary level CG and inertia estimation methods. @@ -405,12 +403,7 @@ def calculateWingInertias(self, acg, xcg): # print 'centroids',Xs,Ys,Zs3 Ix = ( - Ix - + I1x - - W * (Ys_dot**2) - - W * (Zs3**2) - + W * (Ys_dot + Ysoff) ** 2 - + W * (Zs3 + Zs1) ** 2 + Ix + I1x - W * (Ys_dot**2) - W * (Zs3**2) + W * (Ys_dot + Ysoff) ** 2 + W * (Zs3 + Zs1) ** 2 ) # print 'w',W,(Ys_dot),W*(Ys_dot**2) # Ix = Ix-W*(Ys_dot**2)#-W*(Zs3**2)+W*(Ys_dot+Ysoff)**2 + W*(Zs3+Zs1)**2 diff --git a/adflow/pyWingCG.py b/adflow/pyWingCG.py index 9f8f0b751..aa4d5df12 100644 --- a/adflow/pyWingCG.py +++ b/adflow/pyWingCG.py @@ -26,7 +26,6 @@ # Standard Python modules # ============================================================================= import os, sys -import pdb import time # from cmath import pi,cos,tan,sin @@ -367,9 +366,7 @@ def calculateWingInertias(acg): # print 'zs3',Zs3 Zs4 = acg[i][j].z_Centroid - Ix = ( - Ix + I1x - W * (Ys_dot**2) - W * (Zs3**2) + W * (Ys_dot + Ysoff) ** 2 + W * (Zs3 + Zs1) ** 2 - ) + Ix = Ix + I1x - W * (Ys_dot**2) - W * (Zs3**2) + W * (Ys_dot + Ysoff) ** 2 + W * (Zs3 + Zs1) ** 2 Iy = Iy + I1y - W * (Xs**2) - W * (Zs3**2) + W * (Xs + Xs4) ** 2 + W * (Zs3 + Zs1) ** 2 Iz = Iz + I1z - W * (Xs**2 + Ys_dot**2) + W * (Xs + Xs4) ** 2 + W * (Ys_dot + Ysoff) ** 2 # Ixz = ... diff --git a/config/compilerCheck.sh b/config/compilerCheck.sh index 0ffb70c68..f13240926 100644 --- a/config/compilerCheck.sh +++ b/config/compilerCheck.sh @@ -34,4 +34,4 @@ if [ ! -z "$fc" ]; then fi # Print at end to add to the makefile -echo "$FFLAGS" \ No newline at end of file +echo "$FFLAGS" diff --git a/doc/API.rst b/doc/API.rst index 23b3270cc..e9bde205b 100644 --- a/doc/API.rst +++ b/doc/API.rst @@ -3,4 +3,4 @@ pyADflow API ============ .. autoclass:: adflow.pyADflow.ADFLOW - :members: + :members: diff --git a/doc/README.md b/doc/README.md index 29c44a0c7..50ea74f5d 100644 --- a/doc/README.md +++ b/doc/README.md @@ -18,4 +18,4 @@ Its possible to build either documentation independently. General documentation ## Dependencies - Sphinx >= 1.6.7 - Doxygen >= 1.8.6 -- graphviz >= 2.3 (to generate Doxygen call/caller graph, older versions should also work) \ No newline at end of file +- graphviz >= 2.3 (to generate Doxygen call/caller graph, older versions should also work) diff --git a/doc/_static/theme_overrides.css b/doc/_static/theme_overrides.css index 87b017f9a..3a39a8c3c 100644 --- a/doc/_static/theme_overrides.css +++ b/doc/_static/theme_overrides.css @@ -6,8 +6,8 @@ this as on RTD they are loaded after this stylesheet */ white-space: normal !important; } - + .wy-table-responsive { overflow: visible !important; } - } \ No newline at end of file + } diff --git a/doc/citations.bib b/doc/citations.bib index 553b72477..28e7a2563 100644 --- a/doc/citations.bib +++ b/doc/citations.bib @@ -72,4 +72,3 @@ @phdthesis{Abdul-Kaiyoom2025 school = {University of Michigan}, year = {2025} } - diff --git a/doc/costFunctions.yaml b/doc/costFunctions.yaml index 8db0fd3b2..0158695d4 100644 --- a/doc/costFunctions.yaml +++ b/doc/costFunctions.yaml @@ -310,9 +310,9 @@ sepsensor: sepsensorks: desc: > The separation sensor value based on the KS aggregation for the given surface is provided by this cost function. - We first compute the deviation of the local velocity from the projected freestream on the desired surface. - Then, we use a trigonometric function to compute the sensor by providing an allowable flow deviation angle from this projected vector. - As a result, the sensor provides values ranging from ``-1`` to a positive number, which depends on `sepSensorKsPhi` angle selection. + We first compute the deviation of the local velocity from the projected freestream on the desired surface. + Then, we use a trigonometric function to compute the sensor by providing an allowable flow deviation angle from this projected vector. + As a result, the sensor provides values ranging from ``-1`` to a positive number, which depends on `sepSensorKsPhi` angle selection. Any values that are greater than ``0`` are out of the allowable flow deviation. Thus, to constraint the separation, we use KS aggregation to find the maximum value in the sensor and can constraint it to be less than or equal to ``0``. See :cite:t:`Abdul-Kaiyoom2024a` and :cite:t:`Abdul-Kaiyoom2025` for more details. diff --git a/doc/devguide.rst b/doc/devguide.rst index a4a2acf0d..6a51d1540 100644 --- a/doc/devguide.rst +++ b/doc/devguide.rst @@ -10,16 +10,16 @@ Adjoint .. toctree:: :maxdepth: 2 - + adjoint - -Differentiation + +Differentiation --------------- .. toctree:: :maxdepth: 2 - + autodiff diff --git a/doc/options.yaml b/doc/options.yaml index 6df54826f..20d695764 100644 --- a/doc/options.yaml +++ b/doc/options.yaml @@ -1612,7 +1612,7 @@ sepSensorKsPhi: desc: > This option is for KS based separation sensors, ``sepSensorKs`` and ``sepSensorKsArea`` cost function. This angle is used to compute the allowable flow deviation region with respect to the freestream projected direction on the desired surface. - For example, on a wing, the streamlines on the upper surface flows inboard direction . + For example, on a wing, the streamlines on the upper surface flows inboard direction . And in some regions, it goes in the outboard directions. Therefore, we provide an allowable flow deviation from the projected freestream on the surface to compute the sensor. For instance, when the angle is ``90`` degrees, this approximately closes to the verge of separation. @@ -1650,4 +1650,3 @@ meshMaxSkewness: useSkewnessCheck: desc: > When set to true, ADflow computes the `skewness` of each cell and throws an error if it is above ``meshMaxSkewness``. See also ``printBadlySkewedCells``. - diff --git a/doc/performance.rst b/doc/performance.rst index 8f39cfec3..7b43129ae 100644 --- a/doc/performance.rst +++ b/doc/performance.rst @@ -5,8 +5,8 @@ Performance This section is intended to give a rough measure of the performance that users may expect from ADflow. It is intended to give users some -indication if their simulation is performing as well as it should -be. +indication if their simulation is performing as well as it should +be. In general, simulations should be run on the *minimum* number of processors possible. This will generally mean that memory usage will @@ -40,7 +40,7 @@ used to measure solution performance is: CPPH = # of cells converged/(proc * hour). We will arbitrary say a solution is converged when the L2 norm of the residual (totalR in the monitoring output) has dropped by 8 orders of magnitude. This is equivalent of setting L2convergence=1e-8 -with the NKSolver. +with the NKSolver. For simple cases with good meshes (think isolated wing with a pyHyp) mesh and a modest number of cells (<1M), CPPH can exceed 1 million. As @@ -56,7 +56,7 @@ configuration: wing, body, nacelle, pylon, h-stab and v-stab, the CPPH may be much lower ~200\,000. Another example: * 5 200 000 cell mesh -* 64 processors +* 64 processors * 1200 sec solution time * CPPH = 244 000 @@ -70,4 +70,4 @@ In general, Euler cases will require somewhat less memory than the RANS cases. However, with the matrix-free adjoint solver the fraction reduction will not be much more than 5/6 of the RANS memory. Run time for Euler cases will be typically be 2-5 times smaller than an -equivalently sized RANS case (number of cells). +equivalently sized RANS case (number of cells). diff --git a/doc/tutorial.rst b/doc/tutorial.rst index 0ce0ffbc2..03b35e41d 100644 --- a/doc/tutorial.rst +++ b/doc/tutorial.rst @@ -223,8 +223,3 @@ where ```` is the process id of the mpi process. These signals are often used when debugging. For instance, the ``-USR1`` signal can be useful to write out a semi-converged solution for further investigation, and the ``-USR2`` can be used to stop a stalled solution without loss of data. Other use-cases are also possible. To obtain the ````, one can for example use ``top`` or ``ps -ef``. - - - - - diff --git a/doc/verification.rst b/doc/verification.rst index d3d08824b..2004c59c7 100644 --- a/doc/verification.rst +++ b/doc/verification.rst @@ -48,8 +48,8 @@ Figure 21 shows the thrust and torque calculations from ADflow and EllipSys3D. These results show that ADflow consistently overshoots the EllipSys3D results at all wind speeds. .. figure:: images/wind_turbine_verification.png - + Figure 21 from :cite:t:`Madsen2019a` - + .. bibliography:: :style: unsrt diff --git a/file_license_header.txt b/file_license_header.txt index 2eed7a45d..730085926 100644 --- a/file_license_header.txt +++ b/file_license_header.txt @@ -1,14 +1,14 @@ !______________________________________________________________________________ -! +! ! This file is part of ADflow, a computational fluid dynamics solver ! Copyright (c) 2006 Stanford University ! Copyright (c) 2008 University of Toronto ! Copyright (c) 2012 University of Michigan -! Additional copyright (c) 2012 Edwin van der Weide, Juan J. Alonso, -! Joaquim R. R. A. Martins, Gaetan K. W. Kenway, and Charles A. Mader. +! Additional copyright (c) 2012 Edwin van der Weide, Juan J. Alonso, +! Joaquim R. R. A. Martins, Gaetan K. W. Kenway, and Charles A. Mader. ! All rights reserved. ! -! ADflow is licensed under the GNU Lesser General Public License (LGPL), +! ADflow is licensed under the GNU Lesser General Public License (LGPL), ! version 2.1 (the "License"); you may not use this software except in ! compliance with the License. You may obtain a copy of the License at: ! https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html @@ -17,5 +17,3 @@ ! College of Engineering, Aerospace Engineering Department ! http://mdolab.engin.umich.edu/ !______________________________________________________________________________ - - diff --git a/ruff.toml b/ruff.toml new file mode 100644 index 000000000..38a329fc8 --- /dev/null +++ b/ruff.toml @@ -0,0 +1,9 @@ +extend = "~/.config/ruff/ruff.toml" +extend-exclude =[ + "src/build/fort_depend.py", + "src/adjoint/autoEdit/autoEdit*.py", + "src_cs/build/complexify.py", + "adflow/pyWeightAndBalance.py", + "adflow/pyWingCG.py", + "adflow/om_*.py", +] diff --git a/src/ADT/adtLocalSearch.F90 b/src/ADT/adtLocalSearch.F90 index 7e2fc8646..bd8957f74 100644 --- a/src/ADT/adtLocalSearch.F90 +++ b/src/ADT/adtLocalSearch.F90 @@ -1664,7 +1664,7 @@ subroutine minDistanceTreeSearchSinglePoint(ADT, coor, intInfo, & nNodeElement = 8 elementFound = .true. - kkk = kk; + kkk = kk; uu = chi(1); vv = chi(2); ww = chi(3) m(1) = n(1); m(2) = n(2); m(3) = n(3); m(4) = n(4) diff --git a/src/adjoint/ADFirstAidKit/adStack.c b/src/adjoint/ADFirstAidKit/adStack.c index 60950d30d..9e4472c13 100644 --- a/src/adjoint/ADFirstAidKit/adStack.c +++ b/src/adjoint/ADFirstAidKit/adStack.c @@ -109,7 +109,7 @@ void setCurrentLocationToResumePoint(RepetitionLevel *repetitionLevel) { curStack = repetitionLevel->resumePointBlock ; tapblock = curStack->contents ; tappos = repetitionLevel->resumePoint ; -} +} void setFreePushToCurrentLocation(RepetitionLevel *repetitionLevel) { repetitionLevel->freePushBlock = curStack ; @@ -120,7 +120,7 @@ void setCurrentLocationToFreePush(RepetitionLevel *repetitionLevel) { curStack = repetitionLevel->freePushBlock ; tapblock = curStack->contents ; tappos = repetitionLevel->freePush ; -} +} //TODO: try inline this function for efficiency: int currentLocationStrictBelowFreePush(RepetitionLevel *repetitionLevel) { diff --git a/src/adjoint/Makefile_tapenade b/src/adjoint/Makefile_tapenade index d0077a2ea..963e5bcf5 100644 --- a/src/adjoint/Makefile_tapenade +++ b/src/adjoint/Makefile_tapenade @@ -448,6 +448,3 @@ clean_all_reverse_fast: clean_temp_reverse_fast clean_all: clean_all_forward clean_all_reverse clean_all_reverse_fast clean: clean_all - - - diff --git a/src/metis-4.0/metis.c b/src/metis-4.0/metis.c index e34868098..0b7af6044 100644 --- a/src/metis-4.0/metis.c +++ b/src/metis-4.0/metis.c @@ -19803,4 +19803,3 @@ int log2(int a) for (i=1; a > 1; i++, a = a>>1); return i-1; } - diff --git a/src/metis-4.0/metis.h b/src/metis-4.0/metis.h index 44e52c08e..cb971a9f9 100644 --- a/src/metis-4.0/metis.h +++ b/src/metis-4.0/metis.h @@ -34,4 +34,3 @@ #include #include #include - diff --git a/src/metis-4.0/proto.h b/src/metis-4.0/proto.h index 656e8de6b..d232c3b6a 100644 --- a/src/metis-4.0/proto.h +++ b/src/metis-4.0/proto.h @@ -502,4 +502,3 @@ void Test_PartGraphmC(int, idxtype *, idxtype *); int VerifyPartmC(int, int, idxtype *, idxtype *, idxtype *, idxtype *, int, float *, int, idxtype *); void Test_ND(int, idxtype *, idxtype *); int VerifyND(int, idxtype *, idxtype *); - diff --git a/src/metis-4.0/rename.h b/src/metis-4.0/rename.h index 404d089ea..bcc755862 100644 --- a/src/metis-4.0/rename.h +++ b/src/metis-4.0/rename.h @@ -411,8 +411,3 @@ #define ispow2 __ispow2 #define InitRandom __InitRandom #define log2 __log2New - - - - - diff --git a/src/metis-4.0/struct.h b/src/metis-4.0/struct.h index b8f8494f4..c49f5316d 100644 --- a/src/metis-4.0/struct.h +++ b/src/metis-4.0/struct.h @@ -242,7 +242,3 @@ struct vpwgtdef { }; typedef struct vpwgtdef VPInfoType; - - - - diff --git a/src/modules/kd_tree.f90 b/src/modules/kd_tree.f90 index 1972c5147..de0fbb487 100644 --- a/src/modules/kd_tree.f90 +++ b/src/modules/kd_tree.f90 @@ -1446,11 +1446,11 @@ real(kind=realType) function dis2_from_bnd(x, amin, amax) result(res) real(kind=realType), intent(in) :: x, amin, amax if (x > amax) then - res = (x - amax)**2; + res = (x - amax)**2; return else if (x < amin) then - res = (amin - x)**2; + res = (amin - x)**2; return else res = 0.0 @@ -1891,7 +1891,7 @@ subroutine heapsort_struct(a, n) if (a(j)%dis < a(j + 1)%dis) j = j + 1 end if if (value%dis < a(j)%dis) then - a(i) = a(j); + a(i) = a(j); i = j j = j + j else diff --git a/src/modules/stencils.f90 b/src/modules/stencils.f90 index 504547255..a55c974b6 100644 --- a/src/modules/stencils.f90 +++ b/src/modules/stencils.f90 @@ -104,4 +104,3 @@ subroutine initialize_stencils visc_drdw_stencil(33, :) = (/0, 0, 2/) end subroutine initialize_stencils - diff --git a/src/output/tecplotIO.F90 b/src/output/tecplotIO.F90 index 1b5454e91..bce693efd 100644 --- a/src/output/tecplotIO.F90 +++ b/src/output/tecplotIO.F90 @@ -2208,19 +2208,19 @@ subroutine integrateSlice(lSlc, gSlc, nodalValues, nFields, doConnectivity) end if if (normal_ind == 1) then - M(1, 1) = one; M(1, 2) = zero; M(1, 3) = zero; - M(2, 1) = zero; M(2, 2) = one; M(2, 3) = zero; - M(3, 1) = zero; M(3, 2) = zero; M(3, 3) = one; + M(1, 1) = one; M(1, 2) = zero; M(1, 3) = zero; + M(2, 1) = zero; M(2, 2) = one; M(2, 3) = zero; + M(3, 1) = zero; M(3, 2) = zero; M(3, 3) = one; else if (normal_ind == 2) then ! Y-rotation matrix - M(1, 1) = cos(-theta); M(1, 2) = zero; M(1, 3) = sin(-theta); - M(2, 1) = zero; M(2, 2) = one; M(2, 3) = zero; - M(3, 1) = -sin(-theta); M(3, 2) = zero; M(3, 3) = cos(-theta); + M(1, 1) = cos(-theta); M(1, 2) = zero; M(1, 3) = sin(-theta); + M(2, 1) = zero; M(2, 2) = one; M(2, 3) = zero; + M(3, 1) = -sin(-theta); M(3, 2) = zero; M(3, 3) = cos(-theta); else ! Z rotation Matrix - M(1, 1) = cos(theta); M(1, 2) = -sin(theta); M(1, 3) = zero; - M(2, 1) = sin(theta); M(2, 2) = cos(theta); M(2, 3) = zero; - M(3, 1) = zero; M(3, 2) = zero; M(3, 3) = one; + M(1, 1) = cos(theta); M(1, 2) = -sin(theta); M(1, 3) = zero; + M(2, 1) = sin(theta); M(2, 2) = cos(theta); M(2, 3) = zero; + M(3, 1) = zero; M(3, 2) = zero; M(3, 3) = one; end if allocate (tempCoords(3, size(gSlc%vars, 2))) diff --git a/src/output/writeSol.F90 b/src/output/writeSol.F90 index 51d57e1aa..2a9bd255b 100644 --- a/src/output/writeSol.F90 +++ b/src/output/writeSol.F90 @@ -77,4 +77,3 @@ subroutine writeSol(famList, nFamList) #endif end subroutine writeSol - diff --git a/src/overset/computeCellWallPoint.F90 b/src/overset/computeCellWallPoint.F90 index b04a378c8..f22ecde1f 100644 --- a/src/overset/computeCellWallPoint.F90 +++ b/src/overset/computeCellWallPoint.F90 @@ -122,4 +122,3 @@ subroutine computeCellWallPoint(level, sps) call wHalo1to1RealGeneric(3, level, sps, commPatternCell_2nd, internalCell_2nd) end subroutine computeCellWallPoint - diff --git a/src/overset/flagNearWall.F90 b/src/overset/flagNearWall.F90 index 6390cc6bf..c4f852b51 100644 --- a/src/overset/flagNearWall.F90 +++ b/src/overset/flagNearWall.F90 @@ -265,4 +265,3 @@ subroutine setBoundaryPointers(mm, faceID, fullFaces) end select end subroutine setBoundaryPointers end subroutine flagNearWallCells - diff --git a/src/overset/floodInteriorCells.F90 b/src/overset/floodInteriorCells.F90 index 458c9211c..072ef8e1c 100644 --- a/src/overset/floodInteriorCells.F90 +++ b/src/overset/floodInteriorCells.F90 @@ -265,4 +265,3 @@ function onBlock(i, j, k) end function onBlock end subroutine floodInteriorCells - diff --git a/src/overset/oversetInitialization.F90 b/src/overset/oversetInitialization.F90 index 9fc99f346..f75e87ff6 100644 --- a/src/overset/oversetInitialization.F90 +++ b/src/overset/oversetInitialization.F90 @@ -355,29 +355,29 @@ subroutine initializeOFringes(oFringe, nn, famList) do mm = 1, nBocos select case (BCFaceID(mm)) case (iMin) - iStart = 2; iEnd = 2; + iStart = 2; iEnd = 2; jStart = BCData(mm)%inBeg + 1; jEnd = BCData(mm)%inEnd kStart = BCData(mm)%jnBeg + 1; kEnd = BCData(mm)%jnEnd case (iMax) - iStart = il; iEnd = il; + iStart = il; iEnd = il; jStart = BCData(mm)%inBeg + 1; jEnd = BCData(mm)%inEnd kStart = BCData(mm)%jnBeg + 1; kEnd = BCData(mm)%jnEnd case (jMin) iStart = BCData(mm)%inBeg + 1; iEnd = BCData(mm)%inEnd - jStart = 2; jEnd = 2; + jStart = 2; jEnd = 2; kStart = BCData(mm)%jnBeg + 1; kEnd = BCData(mm)%jnEnd case (jMax) iStart = BCData(mm)%inBeg + 1; iEnd = BCData(mm)%inEnd - jStart = jl; jEnd = jl; + jStart = jl; jEnd = jl; kStart = BCData(mm)%jnBeg + 1; kEnd = BCData(mm)%jnEnd case (kMin) iStart = BCData(mm)%inBeg + 1; iEnd = BCData(mm)%inEnd jStart = BCData(mm)%jnBeg + 1; jEnd = BCData(mm)%jnEnd - kStart = 2; kEnd = 2; + kStart = 2; kEnd = 2; case (kMax) iStart = BCData(mm)%inBeg + 1; iEnd = BCData(mm)%inEnd jStart = BCData(mm)%jnBeg + 1; jEnd = BCData(mm)%jnEnd - kStart = kl; kEnd = kl; + kStart = kl; kEnd = kl; end select famInclude: if (famInList(BCdata(mm)%famID, famList)) then diff --git a/src/overset/oversetUtilities.F90 b/src/overset/oversetUtilities.F90 index facd7e2d0..36f7ad86c 100644 --- a/src/overset/oversetUtilities.F90 +++ b/src/overset/oversetUtilities.F90 @@ -396,29 +396,29 @@ subroutine flagForcedRecv select case (BCFaceID(mm)) case (iMin) - iStart = 1; iEnd = 3; + iStart = 1; iEnd = 3; jStart = BCData(mm)%inBeg + 1; jEnd = BCData(mm)%inEnd kStart = BCData(mm)%jnBeg + 1; kEnd = BCData(mm)%jnEnd case (iMax) - iStart = nx; iEnd = ie; + iStart = nx; iEnd = ie; jStart = BCData(mm)%inBeg + 1; jEnd = BCData(mm)%inEnd kStart = BCData(mm)%jnBeg + 1; kEnd = BCData(mm)%jnEnd case (jMin) iStart = BCData(mm)%inBeg + 1; iEnd = BCData(mm)%inEnd - jStart = 1; jEnd = 3; + jStart = 1; jEnd = 3; kStart = BCData(mm)%jnBeg + 1; kEnd = BCData(mm)%jnEnd case (jMax) iStart = BCData(mm)%inBeg + 1; iEnd = BCData(mm)%inEnd - jStart = ny; jEnd = je; + jStart = ny; jEnd = je; kStart = BCData(mm)%jnBeg + 1; kEnd = BCData(mm)%jnEnd case (kMin) iStart = BCData(mm)%inBeg + 1; iEnd = BCData(mm)%inEnd jStart = BCData(mm)%jnBeg + 1; jEnd = BCData(mm)%jnEnd - kStart = 1; kEnd = 3; + kStart = 1; kEnd = 3; case (kMax) iStart = BCData(mm)%inBeg + 1; iEnd = BCData(mm)%inEnd jStart = BCData(mm)%jnBeg + 1; jEnd = BCData(mm)%jnEnd - kStart = nz; kEnd = ke; + kStart = nz; kEnd = ke; end select if (BCType(mm) == OversetOuterBound) then @@ -2619,7 +2619,7 @@ subroutine newtonUpdate(xCen, blk, frac0, frac) ! Set the starting values of u, v and w based on our previous values - u = frac0(1); v = frac0(2); w = frac0(3); + u = frac0(1); v = frac0(2); w = frac0(3); ! The Newton algorithm to determine the parametric ! weights u, v and w for the given coordinate. diff --git a/src/partitioning/partitioning.F90 b/src/partitioning/partitioning.F90 index b7f798f35..9a2e5f7c3 100644 --- a/src/partitioning/partitioning.F90 +++ b/src/partitioning/partitioning.F90 @@ -1765,14 +1765,14 @@ subroutine allocCoorFineGrid flowDoms(nn, 1, mm)%x = 0.0 - !allocate xInit for all time spectral intervals for meshwarping + !allocate xInit for all time spectral intervals for mesh warping if (ierr /= 0) & call terminate("allocCoorFineGrid", & "Memory allocation failure for flowDoms%xInit") !flowDoms(nn,1,mm)%xInit=0.0 !for the first grid also allocate xPlus and xMinus for the - !meshwarping verification... + !mesh warping verification... end do ! For a time accurate computation on deforming meshes, allocate diff --git a/src/preprocessing/pointMatchedCommPattern.F90 b/src/preprocessing/pointMatchedCommPattern.F90 index 3bd53da1c..44abfa057 100644 --- a/src/preprocessing/pointMatchedCommPattern.F90 +++ b/src/preprocessing/pointMatchedCommPattern.F90 @@ -2977,7 +2977,7 @@ subroutine findDonorsRecvBuffer(recvBuf, nHalos, entityHalo, & allocate (tmpBuf(nItemReturn * nHalos), stat=ierr) if (ierr /= 0) & call terminate("findDonorsRecvBuffer", & - "Memory allocation failure for tmpBuf"); + "Memory allocation failure for tmpBuf"); ! Initialize nn and mm to 0. nn is the counter for the incoming ! halo information (7 per halo) and mm for the outgoing info ! (nItemReturn per halo). diff --git a/src/preprocessing/preprocessingModules.F90 b/src/preprocessing/preprocessingModules.F90 index 2b569d1e3..58062e4c9 100644 --- a/src/preprocessing/preprocessingModules.F90 +++ b/src/preprocessing/preprocessingModules.F90 @@ -1307,4 +1307,3 @@ module coarseningInfo type(coarseningInfoType), dimension(:), allocatable :: coarseInfo end module coarseningInfo - diff --git a/src/solver/solverUtils.F90 b/src/solver/solverUtils.F90 index 2136d930e..c6fcd5034 100644 --- a/src/solver/solverUtils.F90 +++ b/src/solver/solverUtils.F90 @@ -2554,7 +2554,7 @@ subroutine computeUtau_block select case (BCFaceID(mm)) case (iMin) - ww => w(2, 1:, 1:, :); + ww => w(2, 1:, 1:, :); dd2Wall => d2Wall(2, :, :); rrlv => rlv(2, 1:, 1:) !========================================================= diff --git a/src/solver/surfaceIntegrations.F90 b/src/solver/surfaceIntegrations.F90 index 357bc18d4..da0134da5 100644 --- a/src/solver/surfaceIntegrations.F90 +++ b/src/solver/surfaceIntegrations.F90 @@ -475,8 +475,8 @@ subroutine wallIntegrationFace(localValues, mm) ! Initialize the force and moment coefficients to 0 as well as ! yplusMax. - Fp = zero; Fv = zero; - Mp = zero; Mv = zero; + Fp = zero; Fv = zero; + Mp = zero; Mv = zero; COFSumFx = zero; COFSumFy = zero; COFSumFz = zero yplusMax = zero sepSensor = zero @@ -486,8 +486,8 @@ subroutine wallIntegrationFace(localValues, mm) Cavitation = zero cpmin_ks_sum = zero sepSensorAvg = zero - Mpaxis = zero; Mvaxis = zero; - CpError2 = zero; + Mpaxis = zero; Mvaxis = zero; + CpError2 = zero; ! ! Integrate the inviscid contribution over the solid walls, ! either inviscid or viscous. The integration is done with diff --git a/src/solver/userSurfaceIntegrations.F90 b/src/solver/userSurfaceIntegrations.F90 index 760cca989..aa18b7beb 100644 --- a/src/solver/userSurfaceIntegrations.F90 +++ b/src/solver/userSurfaceIntegrations.F90 @@ -561,11 +561,11 @@ subroutine buildVolumeADTs(oBlocks, useDual) select case (BCFaceID(mm)) case (iMin) - iStart = 1; iEnd = 1; + iStart = 1; iEnd = 1; jStart = BCData(mm)%icBeg; jEnd = BCData(mm)%icEnd kStart = BCData(mm)%jcBeg; kEnd = BCData(mm)%jcEnd case (iMax) - iStart = ie; iEnd = ie; + iStart = ie; iEnd = ie; jStart = BCData(mm)%icBeg; jEnd = BCData(mm)%icEnd kStart = BCData(mm)%jcBeg; kEnd = BCData(mm)%jcEnd case (jMin) @@ -574,16 +574,16 @@ subroutine buildVolumeADTs(oBlocks, useDual) kStart = BCData(mm)%jcBeg; kEnd = BCData(mm)%jcEnd case (jMax) iStart = BCData(mm)%icBeg; iEnd = BCData(mm)%icEnd - jStart = je; jEnd = je; + jStart = je; jEnd = je; kStart = BCData(mm)%jcBeg; kEnd = BCData(mm)%jcEnd case (kMin) iStart = BCData(mm)%icBeg; iEnd = BCData(mm)%icEnd jStart = BCData(mm)%jcBeg; jEnd = BCData(mm)%jcEnd - kStart = 1; kEnd = 1; + kStart = 1; kEnd = 1; case (kMax) iStart = BCData(mm)%icBeg; iEnd = BCData(mm)%icEnd jStart = BCData(mm)%jcBeg; jEnd = BCData(mm)%jcEnd - kStart = ke; kEnd = ke; + kStart = ke; kEnd = ke; end select if (BCType(mm) == OversetOuterBound) then diff --git a/src/solver/zipperIntegrations.F90 b/src/solver/zipperIntegrations.F90 index 672360364..81f5c64d9 100644 --- a/src/solver/zipperIntegrations.F90 +++ b/src/solver/zipperIntegrations.F90 @@ -105,7 +105,7 @@ subroutine flowIntegrationZipper(isInflow, conn, fams, vars, localValues, famLis validTrianlge: if (triIsValid) then ! Compute the averaged values for this triangle - vxm = zero; vym = zero; vzm = zero; rhom = zero; pm = zero; MNm = zero; gammam = zero; + vxm = zero; vym = zero; vzm = zero; rhom = zero; pm = zero; MNm = zero; gammam = zero; sF = zero do j = 1, 3 rhom = rhom + vars(conn(j, i), iRho) diff --git a/src/turbulence/turbMod.F90 b/src/turbulence/turbMod.F90 index 31ef814f5..48b0ae0a6 100644 --- a/src/turbulence/turbMod.F90 +++ b/src/turbulence/turbMod.F90 @@ -52,4 +52,3 @@ module turbMod real(kind=realType), dimension(:, :, :), pointer :: strain2d #endif end module turbMod - diff --git a/src/utils/flowUtils.F90 b/src/utils/flowUtils.F90 index d50a08c4b..d61677485 100644 --- a/src/utils/flowUtils.F90 +++ b/src/utils/flowUtils.F90 @@ -1694,10 +1694,10 @@ subroutine allNodalGradients real(kind=realType) :: sx, sx1, sy, sy1, sz, sz1 ! Zero all nodeal gradients: - ux = zero; uy = zero; uz = zero; - vx = zero; vy = zero; vz = zero; - wx = zero; wy = zero; wz = zero; - qx = zero; qy = zero; qz = zero; + ux = zero; uy = zero; uz = zero; + vx = zero; vy = zero; vz = zero; + wx = zero; wy = zero; wz = zero; + qx = zero; qy = zero; qz = zero; ! First part. Contribution in the k-direction. ! The contribution is scattered to both the left and right node ! in k-direction. diff --git a/src/wallDistance/wallDistance.F90 b/src/wallDistance/wallDistance.F90 index 105cd5e6d..53431fac9 100644 --- a/src/wallDistance/wallDistance.F90 +++ b/src/wallDistance/wallDistance.F90 @@ -2102,4 +2102,3 @@ end subroutine destroyWallDistanceDataLevel #endif end module wallDistance - diff --git a/src_cs/build/Makefile1 b/src_cs/build/Makefile1 index b4830bb60..935ce1762 100644 --- a/src_cs/build/Makefile1 +++ b/src_cs/build/Makefile1 @@ -53,5 +53,3 @@ directories: # Add a couple of extra ones mkdir -p ../c_defines mkdir -p ../f2py - - diff --git a/tests/reg_tests/refs/actuator_tests.json b/tests/reg_tests/refs/actuator_tests.json index 10b79f64b..c449265a7 100644 --- a/tests/reg_tests/refs/actuator_tests.json +++ b/tests/reg_tests/refs/actuator_tests.json @@ -354,4 +354,4 @@ ] }, "||dR/dzdir||": 7.560864880047144e-13 -} \ No newline at end of file +} diff --git a/tests/reg_tests/refs/adjoint_euler_scalar_jst_tut_wing.json b/tests/reg_tests/refs/adjoint_euler_scalar_jst_tut_wing.json index 2d4fcc265..4a31816d9 100644 --- a/tests/reg_tests/refs/adjoint_euler_scalar_jst_tut_wing.json +++ b/tests/reg_tests/refs/adjoint_euler_scalar_jst_tut_wing.json @@ -800,4 +800,4 @@ "writeVolumeSolution": true, "zipperSurfaceFamily": null } -} \ No newline at end of file +} diff --git a/tests/reg_tests/refs/adjoint_laminar_tut_wing.json b/tests/reg_tests/refs/adjoint_laminar_tut_wing.json index d817dca18..c77dd8a65 100644 --- a/tests/reg_tests/refs/adjoint_laminar_tut_wing.json +++ b/tests/reg_tests/refs/adjoint_laminar_tut_wing.json @@ -800,4 +800,4 @@ "writeVolumeSolution": true, "zipperSurfaceFamily": null } -} \ No newline at end of file +} diff --git a/tests/reg_tests/refs/adjoint_rans_rotating.json b/tests/reg_tests/refs/adjoint_rans_rotating.json index a08aafa9d..59459a776 100644 --- a/tests/reg_tests/refs/adjoint_rans_rotating.json +++ b/tests/reg_tests/refs/adjoint_rans_rotating.json @@ -466,4 +466,4 @@ "writeVolumeSolution": true, "zipperSurfaceFamily": null } -} \ No newline at end of file +} diff --git a/tests/reg_tests/refs/adjoint_rans_tut_wing.json b/tests/reg_tests/refs/adjoint_rans_tut_wing.json index 5e02659b5..634497d32 100644 --- a/tests/reg_tests/refs/adjoint_rans_tut_wing.json +++ b/tests/reg_tests/refs/adjoint_rans_tut_wing.json @@ -1476,4 +1476,4 @@ "writeVolumeSolution": true, "zipperSurfaceFamily": null } -} \ No newline at end of file +} diff --git a/tests/reg_tests/refs/cavitation_tests.json b/tests/reg_tests/refs/cavitation_tests.json index 277372dfd..d13ecc07e 100644 --- a/tests/reg_tests/refs/cavitation_tests.json +++ b/tests/reg_tests/refs/cavitation_tests.json @@ -254,4 +254,4 @@ }, "total cavitation derivative wrt random volume perturbation": -2.967092089231871, "total cpmin derivative wrt random volume perturbation": -89.34385491930246 -} \ No newline at end of file +} diff --git a/tests/reg_tests/refs/error_euler_wing_full.json b/tests/reg_tests/refs/error_euler_wing_full.json index 5e817751a..484f728c7 100644 --- a/tests/reg_tests/refs/error_euler_wing_full.json +++ b/tests/reg_tests/refs/error_euler_wing_full.json @@ -232,4 +232,4 @@ "writeVolumeSolution": true, "zipperSurfaceFamily": null } -} \ No newline at end of file +} diff --git a/tests/reg_tests/refs/error_euler_wing_partial.json b/tests/reg_tests/refs/error_euler_wing_partial.json index 4bd5269bd..fdf272d7c 100644 --- a/tests/reg_tests/refs/error_euler_wing_partial.json +++ b/tests/reg_tests/refs/error_euler_wing_partial.json @@ -242,4 +242,4 @@ "writeVolumeSolution": true, "zipperSurfaceFamily": null } -} \ No newline at end of file +} diff --git a/tests/reg_tests/refs/flow_restart_correction_disabled.json b/tests/reg_tests/refs/flow_restart_correction_disabled.json index 060aeacb0..e62b33bdf 100644 --- a/tests/reg_tests/refs/flow_restart_correction_disabled.json +++ b/tests/reg_tests/refs/flow_restart_correction_disabled.json @@ -243,4 +243,4 @@ "writeVolumeSolution": false, "zipperSurfaceFamily": null } -} \ No newline at end of file +} diff --git a/tests/reg_tests/refs/flow_restart_correction_offset.json b/tests/reg_tests/refs/flow_restart_correction_offset.json index 2506152ed..7c4517d25 100644 --- a/tests/reg_tests/refs/flow_restart_correction_offset.json +++ b/tests/reg_tests/refs/flow_restart_correction_offset.json @@ -243,4 +243,4 @@ "writeVolumeSolution": false, "zipperSurfaceFamily": null } -} \ No newline at end of file +} diff --git a/tests/reg_tests/refs/flow_restart_correction_rotate.json b/tests/reg_tests/refs/flow_restart_correction_rotate.json index 0ce24dbbc..9afd9f23e 100644 --- a/tests/reg_tests/refs/flow_restart_correction_rotate.json +++ b/tests/reg_tests/refs/flow_restart_correction_rotate.json @@ -243,4 +243,4 @@ "writeVolumeSolution": false, "zipperSurfaceFamily": null } -} \ No newline at end of file +} diff --git a/tests/reg_tests/refs/funcs_euler_matrix_jst_tut_wing.json b/tests/reg_tests/refs/funcs_euler_matrix_jst_tut_wing.json index f56e1d88e..572e3e9d1 100644 --- a/tests/reg_tests/refs/funcs_euler_matrix_jst_tut_wing.json +++ b/tests/reg_tests/refs/funcs_euler_matrix_jst_tut_wing.json @@ -1082,4 +1082,4 @@ "yRef_mdo_tutorial": 0.0, "zRef_mdo_tutorial": 0.0 } -} \ No newline at end of file +} diff --git a/tests/reg_tests/refs/funcs_euler_scalar_jst_CRM_WBT.json b/tests/reg_tests/refs/funcs_euler_scalar_jst_CRM_WBT.json index 77f9370a2..4ea0e7925 100644 --- a/tests/reg_tests/refs/funcs_euler_scalar_jst_CRM_WBT.json +++ b/tests/reg_tests/refs/funcs_euler_scalar_jst_CRM_WBT.json @@ -1083,4 +1083,4 @@ "yRef_CRM": 0.0, "zRef_CRM": 0.0 } -} \ No newline at end of file +} diff --git a/tests/reg_tests/refs/funcs_euler_scalar_jst_rand_tut_wing.json b/tests/reg_tests/refs/funcs_euler_scalar_jst_rand_tut_wing.json index 4723d025e..6dfe00575 100644 --- a/tests/reg_tests/refs/funcs_euler_scalar_jst_rand_tut_wing.json +++ b/tests/reg_tests/refs/funcs_euler_scalar_jst_rand_tut_wing.json @@ -1082,4 +1082,4 @@ "yRef_mdo_tutorial": 0.0, "zRef_mdo_tutorial": 0.0 } -} \ No newline at end of file +} diff --git a/tests/reg_tests/refs/funcs_euler_scalar_jst_tut_wing.json b/tests/reg_tests/refs/funcs_euler_scalar_jst_tut_wing.json index da6fa5f6d..f8962fcfa 100644 --- a/tests/reg_tests/refs/funcs_euler_scalar_jst_tut_wing.json +++ b/tests/reg_tests/refs/funcs_euler_scalar_jst_tut_wing.json @@ -1082,4 +1082,4 @@ "yRef_mdo_tutorial": 0.0, "zRef_mdo_tutorial": 0.0 } -} \ No newline at end of file +} diff --git a/tests/reg_tests/refs/funcs_euler_upwind_tut_wing.json b/tests/reg_tests/refs/funcs_euler_upwind_tut_wing.json index c033519a5..ee94b92af 100644 --- a/tests/reg_tests/refs/funcs_euler_upwind_tut_wing.json +++ b/tests/reg_tests/refs/funcs_euler_upwind_tut_wing.json @@ -1082,4 +1082,4 @@ "yRef_mdo_tutorial": 0.0, "zRef_mdo_tutorial": 0.0 } -} \ No newline at end of file +} diff --git a/tests/reg_tests/refs/funcs_laminar_tut_wing.json b/tests/reg_tests/refs/funcs_laminar_tut_wing.json index f21e44d10..40b0a62a2 100644 --- a/tests/reg_tests/refs/funcs_laminar_tut_wing.json +++ b/tests/reg_tests/refs/funcs_laminar_tut_wing.json @@ -1082,4 +1082,4 @@ "yRef_mdo_tutorial": 0.0, "zRef_mdo_tutorial": 0.0 } -} \ No newline at end of file +} diff --git a/tests/reg_tests/refs/funcs_rans_rand_tut_wing.json b/tests/reg_tests/refs/funcs_rans_rand_tut_wing.json index 05dde8e59..fe1a91286 100644 --- a/tests/reg_tests/refs/funcs_rans_rand_tut_wing.json +++ b/tests/reg_tests/refs/funcs_rans_rand_tut_wing.json @@ -1085,4 +1085,4 @@ "yRef_mdo_tutorial": 0.0, "zRef_mdo_tutorial": 0.0 } -} \ No newline at end of file +} diff --git a/tests/reg_tests/refs/funcs_rans_tut_wing.json b/tests/reg_tests/refs/funcs_rans_tut_wing.json index 74013204f..4bd8bb37b 100644 --- a/tests/reg_tests/refs/funcs_rans_tut_wing.json +++ b/tests/reg_tests/refs/funcs_rans_tut_wing.json @@ -1085,4 +1085,4 @@ "yRef_mdo_tutorial": 0.0, "zRef_mdo_tutorial": 0.0 } -} \ No newline at end of file +} diff --git a/tests/reg_tests/refs/multi_bc_tests.json b/tests/reg_tests/refs/multi_bc_tests.json index 3b3df4fbf..7cb7c4b48 100644 --- a/tests/reg_tests/refs/multi_bc_tests.json +++ b/tests/reg_tests/refs/multi_bc_tests.json @@ -487,4 +487,4 @@ "tt1": 0.641730682691145, "tt2": 0.6703313238370421 } -} \ No newline at end of file +} diff --git a/tests/reg_tests/refs/separation_tests_sepsensor.json b/tests/reg_tests/refs/separation_tests_sepsensor.json index af43e096b..d7c39f8ad 100644 --- a/tests/reg_tests/refs/separation_tests_sepsensor.json +++ b/tests/reg_tests/refs/separation_tests_sepsensor.json @@ -281,4 +281,4 @@ } }, "total sepsensor_wingup derivative wrt random volume perturbation": -0.17081860114602293 -} \ No newline at end of file +} diff --git a/tests/reg_tests/refs/separation_tests_sepsensorks.json b/tests/reg_tests/refs/separation_tests_sepsensorks.json index 425a9454d..ee001012b 100644 --- a/tests/reg_tests/refs/separation_tests_sepsensorks.json +++ b/tests/reg_tests/refs/separation_tests_sepsensorks.json @@ -288,4 +288,4 @@ }, "total sepsensor_wingup derivative wrt random volume perturbation": -0.17081860114602293, "total sepsensorks_wingup derivative wrt random volume perturbation": 0.16370255961346358 -} \ No newline at end of file +} diff --git a/tests/reg_tests/refs/separation_tests_sepsensorksarea.json b/tests/reg_tests/refs/separation_tests_sepsensorksarea.json index 9c3ebf399..9c20951fe 100644 --- a/tests/reg_tests/refs/separation_tests_sepsensorksarea.json +++ b/tests/reg_tests/refs/separation_tests_sepsensorksarea.json @@ -295,4 +295,4 @@ "total sepsensor_wingup derivative wrt random volume perturbation": -0.17081860114602293, "total sepsensorks_wingup derivative wrt random volume perturbation": 0.16370255961346358, "total sepsensorksarea_wingup derivative wrt random volume perturbation": -0.17081501916514247 -} \ No newline at end of file +} diff --git a/tests/reg_tests/refs/separation_tests_wing_phi_120_sepsensors.json b/tests/reg_tests/refs/separation_tests_wing_phi_120_sepsensors.json index b30bbe034..14965c602 100644 --- a/tests/reg_tests/refs/separation_tests_wing_phi_120_sepsensors.json +++ b/tests/reg_tests/refs/separation_tests_wing_phi_120_sepsensors.json @@ -295,4 +295,4 @@ "total sepsensor_wingup derivative wrt random volume perturbation": -8686.222268515028, "total sepsensorks_wingup derivative wrt random volume perturbation": -3.7490444325351717, "total sepsensorksarea_wingup derivative wrt random volume perturbation": 6341.576389103453 -} \ No newline at end of file +} diff --git a/tests/reg_tests/refs/separation_tests_wing_phi_90_sepsensors.json b/tests/reg_tests/refs/separation_tests_wing_phi_90_sepsensors.json index d2637dde9..e2e59e648 100644 --- a/tests/reg_tests/refs/separation_tests_wing_phi_90_sepsensors.json +++ b/tests/reg_tests/refs/separation_tests_wing_phi_90_sepsensors.json @@ -295,4 +295,4 @@ "total sepsensor_wingup derivative wrt random volume perturbation": -8686.222268515028, "total sepsensorks_wingup derivative wrt random volume perturbation": -5.6022265301217296, "total sepsensorksarea_wingup derivative wrt random volume perturbation": -12737.153586037944 -} \ No newline at end of file +} diff --git a/tests/reg_tests/refs/small_change_no_correction.json b/tests/reg_tests/refs/small_change_no_correction.json index 1a3e0f662..49380c3f2 100644 --- a/tests/reg_tests/refs/small_change_no_correction.json +++ b/tests/reg_tests/refs/small_change_no_correction.json @@ -243,4 +243,4 @@ "writeVolumeSolution": false, "zipperSurfaceFamily": null } -} \ No newline at end of file +} diff --git a/tests/reg_tests/refs/solve_2D_conv_nozzle.json b/tests/reg_tests/refs/solve_2D_conv_nozzle.json index 633928481..737ee0352 100644 --- a/tests/reg_tests/refs/solve_2D_conv_nozzle.json +++ b/tests/reg_tests/refs/solve_2D_conv_nozzle.json @@ -237,4 +237,4 @@ "writeVolumeSolution": true, "zipperSurfaceFamily": null } -} \ No newline at end of file +} diff --git a/tests/reg_tests/refs/solve_cl.json b/tests/reg_tests/refs/solve_cl.json index e46e6524f..48bfcbb03 100644 --- a/tests/reg_tests/refs/solve_cl.json +++ b/tests/reg_tests/refs/solve_cl.json @@ -217,4 +217,4 @@ "writeVolumeSolution": true, "zipperSurfaceFamily": null } -} \ No newline at end of file +} diff --git a/tests/reg_tests/refs/solve_conic_mb.json b/tests/reg_tests/refs/solve_conic_mb.json index 6ae3f87bb..ffe13d581 100644 --- a/tests/reg_tests/refs/solve_conic_mb.json +++ b/tests/reg_tests/refs/solve_conic_mb.json @@ -237,4 +237,4 @@ "writeVolumeSolution": true, "zipperSurfaceFamily": "output_fam" } -} \ No newline at end of file +} diff --git a/tests/reg_tests/refs/solve_conic_overset.json b/tests/reg_tests/refs/solve_conic_overset.json index c348c6cd5..f0761b330 100644 --- a/tests/reg_tests/refs/solve_conic_overset.json +++ b/tests/reg_tests/refs/solve_conic_overset.json @@ -230,4 +230,4 @@ "writeVolumeSolution": true, "zipperSurfaceFamily": "output_fam" } -} \ No newline at end of file +} diff --git a/tests/reg_tests/refs/solve_euler_matrix_jst_tut_wing.json b/tests/reg_tests/refs/solve_euler_matrix_jst_tut_wing.json index 98125ae24..d17285e54 100644 --- a/tests/reg_tests/refs/solve_euler_matrix_jst_tut_wing.json +++ b/tests/reg_tests/refs/solve_euler_matrix_jst_tut_wing.json @@ -288,4 +288,4 @@ "writeVolumeSolution": true, "zipperSurfaceFamily": null } -} \ No newline at end of file +} diff --git a/tests/reg_tests/refs/solve_euler_scalar_jst_tut_wing.json b/tests/reg_tests/refs/solve_euler_scalar_jst_tut_wing.json index 144a69567..e9fb4cb6d 100644 --- a/tests/reg_tests/refs/solve_euler_scalar_jst_tut_wing.json +++ b/tests/reg_tests/refs/solve_euler_scalar_jst_tut_wing.json @@ -288,4 +288,4 @@ "writeVolumeSolution": true, "zipperSurfaceFamily": null } -} \ No newline at end of file +} diff --git a/tests/reg_tests/refs/solve_euler_time_spectral_naca64A010.json b/tests/reg_tests/refs/solve_euler_time_spectral_naca64A010.json index 0cc34127d..e89f229eb 100644 --- a/tests/reg_tests/refs/solve_euler_time_spectral_naca64A010.json +++ b/tests/reg_tests/refs/solve_euler_time_spectral_naca64A010.json @@ -219,4 +219,4 @@ "writeVolumeSolution": false, "zipperSurfaceFamily": null } -} \ No newline at end of file +} diff --git a/tests/reg_tests/refs/solve_rans_time_acc_naca0012.json b/tests/reg_tests/refs/solve_rans_time_acc_naca0012.json index 5b59ae49d..a8ede89ef 100644 --- a/tests/reg_tests/refs/solve_rans_time_acc_naca0012.json +++ b/tests/reg_tests/refs/solve_rans_time_acc_naca0012.json @@ -220,4 +220,4 @@ "writeVolumeSolution": false, "zipperSurfaceFamily": null } -} \ No newline at end of file +} diff --git a/tests/reg_tests/refs/solve_rans_tut_wing.json b/tests/reg_tests/refs/solve_rans_tut_wing.json index 52ae94934..6f71f9d08 100644 --- a/tests/reg_tests/refs/solve_rans_tut_wing.json +++ b/tests/reg_tests/refs/solve_rans_tut_wing.json @@ -291,4 +291,4 @@ "writeVolumeSolution": true, "zipperSurfaceFamily": null } -} \ No newline at end of file +} diff --git a/tests/reg_tests/refs/test_solver_combos.json b/tests/reg_tests/refs/test_solver_combos.json index 81ec0fc1a..84cc51038 100644 --- a/tests/reg_tests/refs/test_solver_combos.json +++ b/tests/reg_tests/refs/test_solver_combos.json @@ -214,4 +214,4 @@ "writeVolumeSolution": false, "zipperSurfaceFamily": null } -} \ No newline at end of file +} diff --git a/tests/reg_tests/test_actuator.py b/tests/reg_tests/test_actuator.py index 25364fa90..f2e620a5b 100644 --- a/tests/reg_tests/test_actuator.py +++ b/tests/reg_tests/test_actuator.py @@ -114,7 +114,7 @@ def setUp(self): CFDSolver.addFunction("flowpower", "actuator_region", name="flowpower_az") def test_actuator_thrust(self): - "Tests if the correct amount of momentum is added to the flow by the actuator" + """Tests if the correct amount of momentum is added to the flow by the actuator""" # set the az force az_force = 600.0 @@ -182,7 +182,7 @@ def test_actuator_thrust(self): np.testing.assert_allclose(my_power, az_power, rtol=1.5e-3) def test_actuator_heat(self): - "Tests if the correct amount of heat is added to the flow by the actuator" + """Tests if the correct amount of heat is added to the flow by the actuator""" # set the az heat az_heat = 1e5 @@ -247,7 +247,7 @@ def test_actuator_heat(self): np.testing.assert_allclose(cfd_heat, az_heat, rtol=1.5e-3) def test_actuator_thrust_and_heat(self): - "Tests if the correct amount of momentum and heat is added to the flow by the actuator" + """Tests if the correct amount of momentum and heat is added to the flow by the actuator""" # set the az force az_force = 600.0 @@ -326,7 +326,7 @@ def test_actuator_thrust_and_heat(self): self.handler.root_add_dict("all functionals", funcs, rtol=1e-12, atol=1e-12) def test_actuator_adjoint(self): - "Tests if the adjoint sensitivities are correct for the AZ DVs" + """Tests if the adjoint sensitivities are correct for the AZ DVs""" # define user functions my_force_functions = [ @@ -453,7 +453,7 @@ def f_my_power(funcs): self.handler.root_add_dict("mavgvi sens", funcsSens["actuator_pipe_mavgvi_out"], rtol=1e-12, atol=1e-12) def test_actuator_flowpower_adjoint(self): - "we test this adjoint separately because we need to have a finite thrust for this to actually test" + """We test this adjoint separately because we need to have a finite thrust for this to actually test""" # set the az force az_force = 600.0 @@ -701,7 +701,7 @@ def setUp(self): CFDSolver.addFunction("flowpower", "actuator_region", name="flowpower_az") def cmplx_test_actuator_adjoint(self): - "Tests if the adjoint sensitivities are correct for the AZ DVs" + """Tests if the adjoint sensitivities are correct for the AZ DVs""" # define user functions my_force_functions = [ @@ -864,7 +864,7 @@ def f_my_power(funcs): np.testing.assert_allclose(funcsSensCS["heat"]["mavgvi_out"], ref_val, atol=1e-10, rtol=1e-10) def cmplx_test_actuator_flowpower_adjoint(self): - "we test this adjoint separately because we need to have a finite thrust for this to actually test" + """We test this adjoint separately because we need to have a finite thrust for this to actually test""" # set the az force az_force = 600.0 diff --git a/tests/reg_tests/test_flow_restart.py b/tests/reg_tests/test_flow_restart.py index 400cf111f..d811e8cfe 100644 --- a/tests/reg_tests/test_flow_restart.py +++ b/tests/reg_tests/test_flow_restart.py @@ -96,7 +96,6 @@ def setUp(self): "cflcoarse": 1.25, "solutionprecision": "double", "gridprecision": "double", - "mgcycle": "sg", "anksecondordswitchtol": 1e-2, "ankcoupledswitchtol": 1e-4, "l2convergence": 1e-13,