Skip to content

Commit

Permalink
Enabled new build modes (#723)
Browse files Browse the repository at this point in the history
* Fixed a bug for the distributed flag for functions

* Fixed all the Make files.

* Changed the AD -D name to CODI_NO_AD, CODI_ADR and CODI_ADF.

* Changed the cython lib compilation method.

* Changed the pre and post-processing build.

* Changed the python files to new build.

* Added a new libs folder for the cython libs.

* Changed the github action files.

* Added the ADR build in the github action.

* Fixed a bug in the GH action file.

* Fixed the unit test script.
  • Loading branch information
friedenhe authored Dec 15, 2024
1 parent 50471a5 commit 4d04843
Show file tree
Hide file tree
Showing 86 changed files with 657 additions and 1,250 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/code_cov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ env:
REPO_NAME: 'dafoam'
DOCKER_WORKING_DIR: '/home/dafoamuser/dafoam/$REPO_NAME'
DOCKER_MOUNT_DIR: '/home/dafoamuser/mount/$REPO_NAME'
DOCKER_TAG: 'latest'
DOCKER_TAG: 'v4'
DOCKER_ENV_FILE: '/home/dafoamuser/dafoam/loadDAFoam.sh'

jobs:
Expand All @@ -29,9 +29,9 @@ jobs:
docker run -i -d -u dafoamuser --name regtest -v $GITHUB_WORKSPACE:${{env.DOCKER_MOUNT_DIR}} dafoam/opt-packages:${{env.DOCKER_TAG}} /bin/bash
docker exec -i regtest /bin/bash -c "rm -rf ${{env.DOCKER_WORKING_DIR}} && cp -r ${{env.DOCKER_MOUNT_DIR}} ${{env.DOCKER_WORKING_DIR}}"
docker exec regtest sed -i 's/-std=c++11/-std=c++11 -fprofile-arcs -ftest-coverage/g' ${{env.DOCKER_WORKING_DIR}}/src/adjoint/DAOption/Make/options
docker exec regtest sed -i 's/-lfiniteVolume$(DF_LIB_SUFFIX)/-lfiniteVolume$(DF_LIB_SUFFIX) -lgcov/g' ${{env.DOCKER_WORKING_DIR}}/src/adjoint/DAOption/Make/options
docker exec regtest sed -i 's/-lfiniteVolume$(WM_CODI_AD_LIB_POSTFIX)/-lfiniteVolume$(WM_CODI_AD_LIB_POSTFIX) -lgcov/g' ${{env.DOCKER_WORKING_DIR}}/src/adjoint/DAOption/Make/options
docker exec regtest sed -i 's/-std=c++11/-std=c++11 -fprofile-arcs -ftest-coverage/g' ${{env.DOCKER_WORKING_DIR}}/src/adjoint/DAUtility/Make/options
docker exec regtest sed -i 's/-lfiniteVolume$(DF_LIB_SUFFIX)/-lfiniteVolume$(DF_LIB_SUFFIX) -lgcov/g' ${{env.DOCKER_WORKING_DIR}}/src/adjoint/DAUtility/Make/options
docker exec regtest sed -i 's/-lfiniteVolume$(WM_CODI_AD_LIB_POSTFIX)/-lfiniteVolume$(WM_CODI_AD_LIB_POSTFIX) -lgcov/g' ${{env.DOCKER_WORKING_DIR}}/src/adjoint/DAUtility/Make/options
docker exec -i regtest /bin/bash -c ". ${{env.DOCKER_ENV_FILE}} && cd ${{env.DOCKER_WORKING_DIR}} && ./Allmake"
docker exec -i regtest /bin/bash -c ". ${{env.DOCKER_ENV_FILE}} && cd ${{env.DOCKER_WORKING_DIR}} && pip install ."
docker exec -i regtest /bin/bash -c ". ${{env.DOCKER_ENV_FILE}} && cd ${{env.DOCKER_WORKING_DIR}}/tests && ./Allrun"
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ env:
REPO_NAME: 'dafoam'
DOCKER_WORKING_DIR: '/home/dafoamuser/dafoam/$REPO_NAME'
DOCKER_MOUNT_DIR: '/home/dafoamuser/mount/$REPO_NAME'
DOCKER_TAG: 'latest'
DOCKER_TAG: 'v4'
DOCKER_ENV_FILE: '/home/dafoamuser/dafoam/loadDAFoam.sh'
DOCKER_OF_ADF_BASHRC: '/home/dafoamuser/dafoam/OpenFOAM/OpenFOAM-v1812-ADF/etc/bashrc'
DOCKER_OF_ADR_BASHRC: '/home/dafoamuser/dafoam/OpenFOAM/OpenFOAM-v1812-ADR/etc/bashrc'
Expand All @@ -30,5 +30,6 @@ jobs:
docker pull dafoam/opt-packages:${{env.DOCKER_TAG}}
docker run -i -d -u dafoamuser --name regtest -v $GITHUB_WORKSPACE:${{env.DOCKER_MOUNT_DIR}} dafoam/opt-packages:${{env.DOCKER_TAG}} /bin/bash
docker exec -i regtest /bin/bash -c "rm -rf ${{env.DOCKER_WORKING_DIR}} && cp -r ${{env.DOCKER_MOUNT_DIR}} ${{env.DOCKER_WORKING_DIR}}"
docker exec -i regtest /bin/bash -c ". ${{env.DOCKER_ENV_FILE}} && cd ${{env.DOCKER_WORKING_DIR}} && ./Allmake && pip install ."
docker exec -i regtest /bin/bash -c ". ${{env.DOCKER_ENV_FILE}} && cd ${{env.DOCKER_WORKING_DIR}} && ./Allmake"
docker exec -i regtest /bin/bash -c ". ${{env.DOCKER_ENV_FILE}} && . ${{env.DOCKER_OF_ADR_BASHRC}} && cd ${{env.DOCKER_WORKING_DIR}} && ./Allmake && pip install ."
docker exec -i regtest /bin/bash -c ". ${{env.DOCKER_ENV_FILE}} && cd ${{env.DOCKER_WORKING_DIR}}/tests && ./Allrun"
3 changes: 2 additions & 1 deletion Allmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ wmakeLnInclude src/adjoint
cd src/adjoint && ./Allmake && cd -
cd src/pyUnitTests && ./Allmake && cd -
cd src/pyDASolvers && ./Allmake && cd -
cd src/utilities/coloring && ./Allmake && cd -
cd src/utilities/coloring && ./Allmake && cd -
echo "******* DAFoam $WM_CODI_AD_LIB_POSTFIX compilation finished! *********"
1 change: 0 additions & 1 deletion dafoam/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@

from .pyDAFoam import PYDAFOAM
from . import optFuncs
from . import pyUnitTests
1 change: 1 addition & 0 deletions dafoam/libs/ADF/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# empty_file
1 change: 1 addition & 0 deletions dafoam/libs/ADR/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# empty_file
1 change: 1 addition & 0 deletions dafoam/libs/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# empty_file
4 changes: 2 additions & 2 deletions dafoam/mphys/mphys_dafoam.py
Original file line number Diff line number Diff line change
Expand Up @@ -1456,7 +1456,7 @@ def compute_jacvec_product(self, inputs, d_inputs, d_outputs, mode):
product = np.zeros(localAdjSize)
jacInput = inputs["%s_states" % self.discipline]
DASolver.solverAD.calcJacTVecProduct(
"stateVar", localAdjSize, 1, jacInput, "function", 1, 1, seed, product
"stateVar", localAdjSize, 1, jacInput, "function", 1, 0, seed, product
)
d_inputs["%s_states" % self.discipline] += product

Expand All @@ -1466,7 +1466,7 @@ def compute_jacvec_product(self, inputs, d_inputs, d_outputs, mode):
product = np.zeros(localXvSize)
jacInput = inputs["%s_vol_coords" % self.discipline]
DASolver.solverAD.calcJacTVecProduct(
"volCoord", localXvSize, 1, jacInput, "function", 1, 1, seed, product
"volCoord", localXvSize, 1, jacInput, "function", 1, 0, seed, product
)
d_inputs["%s_vol_coords" % self.discipline] += product

Expand Down
8 changes: 4 additions & 4 deletions dafoam/pyDAFoam.py
Original file line number Diff line number Diff line change
Expand Up @@ -3145,19 +3145,19 @@ def _initSolver(self):
solverName = self.getOption("solverName")
solverArg = solverName + " -python " + self.parallelFlag

from .pyDASolver import pyDASolvers
from .libs.pyDASolvers import pyDASolvers

self.solver = pyDASolvers(solverArg.encode(), self.options)

if self.getOption("useAD")["mode"] == "forward":

from .pyDASolverADF import pyDASolvers as pyDASolversAD
from .libs.ADF.pyDASolvers import pyDASolvers as pyDASolversAD

self.solverAD = pyDASolversAD(solverArg.encode(), self.options)

elif self.getOption("useAD")["mode"] == "reverse":

from .pyDASolverADR import pyDASolvers as pyDASolversAD
from .libs.ADR.pyDASolvers import pyDASolvers as pyDASolversAD

self.solverAD = pyDASolversAD(solverArg.encode(), self.options)

Expand Down Expand Up @@ -3190,7 +3190,7 @@ def runColoring(self):
Info("| Running Coloring Solver |")
Info("+--------------------------------------------------------------------------+")

from .pyColoring import pyColoring
from .libs.pyColoring import pyColoring

solverArg = "Coloring -python " + self.parallelFlag
solver = pyColoring(solverArg.encode(), self.options)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
url="https://github.com/mdolab/dafoam",
license="GPL version 3",
packages=find_packages(include=["dafoam*"]),
package_data={"dafoam": ["*.so"]},
package_data={"dafoam": ["*/*.so", "*/*/*.so"]},
scripts=[
"dafoam/scripts/dafoam_matdiff.py",
"dafoam/scripts/dafoam_vecdiff.py",
Expand Down
8 changes: 0 additions & 8 deletions src/adjoint/Allmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@ if [ -z "$WM_PROJECT" ]; then
exit 1
fi

if [ -z "$WM_CODI_AD_MODE" ]; then
export DF_LIB_SUFFIX=""
elif [ "$WM_CODI_AD_MODE" = "CODI_AD_FORWARD" ]; then
export DF_LIB_SUFFIX="ADF"
elif [ "$WM_CODI_AD_MODE" = "CODI_AD_REVERSE" ]; then
export DF_LIB_SUFFIX="ADR"
fi

for d in ./*/ ; do
cd "$d"
if test -f Make/files ; then
Expand Down
2 changes: 1 addition & 1 deletion src/adjoint/DACheckMesh/Make/files
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ DACheckMesh.C
checkGeometry.C
checkTools.C

LIB = $(DAFOAM_ROOT_PATH)/OpenFOAM/sharedLibs/libDACheckMesh$(DF_LIB_SUFFIX)
LIB = $(DAFOAM_ROOT_PATH)/OpenFOAM/sharedLibs/libDACheckMesh$(WM_CODI_AD_LIB_POSTFIX)
33 changes: 25 additions & 8 deletions src/adjoint/DACheckMesh/Make/options
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
EXE_INC = \
-std=c++11 -w \
-std=c++11 \
-Wno-old-style-cast \
-Wno-conversion-null \
-Wno-deprecated-copy \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/finiteVolume/cfdTools \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fileFormats/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/surfMesh/lnInclude \
-I$(LIB_SRC)/OpenFOAM/lnInclude \
-I../lnInclude \
-I../../include \
-I$(PETSC_DIR)/include \
-I$(PETSC_DIR)/$(PETSC_ARCH)/include \
-I$(MPI_ARCH_PATH)/include \
Expand All @@ -18,12 +27,20 @@ EXE_INC = \


LIB_LIBS = \
-lOpenFOAM$(DF_LIB_SUFFIX) \
-lfiniteVolume$(DF_LIB_SUFFIX) \
-lmeshTools$(DF_LIB_SUFFIX) \
-lsampling$(DF_LIB_SUFFIX) \
-lcompressibleTransportModels$(WM_CODI_AD_LIB_POSTFIX) \
-lincompressibleTransportModels$(WM_CODI_AD_LIB_POSTFIX) \
-lfluidThermophysicalModels$(WM_CODI_AD_LIB_POSTFIX) \
-lspecie$(WM_CODI_AD_LIB_POSTFIX) \
-lturbulenceModels$(WM_CODI_AD_LIB_POSTFIX) \
-lcompressibleTurbulenceModels$(WM_CODI_AD_LIB_POSTFIX) \
-lincompressibleTurbulenceModels$(WM_CODI_AD_LIB_POSTFIX) \
-lradiationModels$(WM_CODI_AD_LIB_POSTFIX) \
-lfiniteVolume$(WM_CODI_AD_LIB_POSTFIX) \
-lsampling$(WM_CODI_AD_LIB_POSTFIX) \
-lmeshTools$(WM_CODI_AD_LIB_POSTFIX) \
-lfvOptions$(WM_CODI_AD_LIB_POSTFIX) \
-L$(PETSC_LIB) -lpetsc \
-L$(MPI_ARCH_PATH)/lib \
-L$(MPI_ARCH_PATH)/lib64 \
$(shell python3-config --ldflags) \
-fno-lto
-fno-lto
2 changes: 1 addition & 1 deletion src/adjoint/DAColoring/Make/files
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
DAColoring.C

LIB = $(DAFOAM_ROOT_PATH)/OpenFOAM/sharedLibs/libDAColoring$(DF_LIB_SUFFIX)
LIB = $(DAFOAM_ROOT_PATH)/OpenFOAM/sharedLibs/libDAColoring$(WM_CODI_AD_LIB_POSTFIX)
27 changes: 13 additions & 14 deletions src/adjoint/DAColoring/Make/options
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
EXE_INC = \
-std=c++11 -w \
-std=c++11 \
-Wno-old-style-cast \
-Wno-conversion-null \
-Wno-deprecated-copy \
-DCompressibleFlow \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
Expand All @@ -28,18 +27,18 @@ EXE_INC = \


LIB_LIBS = \
-lcompressibleTransportModels$(DF_LIB_SUFFIX) \
-lincompressibleTransportModels$(DF_LIB_SUFFIX) \
-lfluidThermophysicalModels$(DF_LIB_SUFFIX) \
-lspecie$(DF_LIB_SUFFIX) \
-lturbulenceModels$(DF_LIB_SUFFIX) \
-lcompressibleTurbulenceModels$(DF_LIB_SUFFIX) \
-lincompressibleTurbulenceModels$(DF_LIB_SUFFIX) \
-lradiationModels$(DF_LIB_SUFFIX) \
-lfiniteVolume$(DF_LIB_SUFFIX) \
-lsampling$(DF_LIB_SUFFIX) \
-lmeshTools$(DF_LIB_SUFFIX) \
-lfvOptions$(DF_LIB_SUFFIX) \
-lcompressibleTransportModels$(WM_CODI_AD_LIB_POSTFIX) \
-lincompressibleTransportModels$(WM_CODI_AD_LIB_POSTFIX) \
-lfluidThermophysicalModels$(WM_CODI_AD_LIB_POSTFIX) \
-lspecie$(WM_CODI_AD_LIB_POSTFIX) \
-lturbulenceModels$(WM_CODI_AD_LIB_POSTFIX) \
-lcompressibleTurbulenceModels$(WM_CODI_AD_LIB_POSTFIX) \
-lincompressibleTurbulenceModels$(WM_CODI_AD_LIB_POSTFIX) \
-lradiationModels$(WM_CODI_AD_LIB_POSTFIX) \
-lfiniteVolume$(WM_CODI_AD_LIB_POSTFIX) \
-lsampling$(WM_CODI_AD_LIB_POSTFIX) \
-lmeshTools$(WM_CODI_AD_LIB_POSTFIX) \
-lfvOptions$(WM_CODI_AD_LIB_POSTFIX) \
-L$(PETSC_LIB) -lpetsc \
-L$(MPI_ARCH_PATH)/lib \
-L$(MPI_ARCH_PATH)/lib64 \
Expand Down
2 changes: 1 addition & 1 deletion src/adjoint/DAField/DAField.C
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void DAField::resetOFSeeds()
OpenFoam field variables's gradients will be reset to zeros
*/

#ifdef CODI_AD_REVERSE
#ifdef CODI_ADR

const objectRegistry& db = mesh_.thisDb();

Expand Down
2 changes: 1 addition & 1 deletion src/adjoint/DAField/Make/files
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
DAField.C

LIB = $(DAFOAM_ROOT_PATH)/OpenFOAM/sharedLibs/libDAField$(DF_LIB_SUFFIX)
LIB = $(DAFOAM_ROOT_PATH)/OpenFOAM/sharedLibs/libDAField$(WM_CODI_AD_LIB_POSTFIX)
27 changes: 13 additions & 14 deletions src/adjoint/DAField/Make/options
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
EXE_INC = \
-std=c++11 -w \
-std=c++11 \
-Wno-old-style-cast \
-Wno-conversion-null \
-Wno-deprecated-copy \
-DCompressibleFlow \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
Expand All @@ -28,18 +27,18 @@ EXE_INC = \


LIB_LIBS = \
-lcompressibleTransportModels$(DF_LIB_SUFFIX) \
-lincompressibleTransportModels$(DF_LIB_SUFFIX) \
-lfluidThermophysicalModels$(DF_LIB_SUFFIX) \
-lspecie$(DF_LIB_SUFFIX) \
-lturbulenceModels$(DF_LIB_SUFFIX) \
-lcompressibleTurbulenceModels$(DF_LIB_SUFFIX) \
-lincompressibleTurbulenceModels$(DF_LIB_SUFFIX) \
-lradiationModels$(DF_LIB_SUFFIX) \
-lfiniteVolume$(DF_LIB_SUFFIX) \
-lsampling$(DF_LIB_SUFFIX) \
-lmeshTools$(DF_LIB_SUFFIX) \
-lfvOptions$(DF_LIB_SUFFIX) \
-lcompressibleTransportModels$(WM_CODI_AD_LIB_POSTFIX) \
-lincompressibleTransportModels$(WM_CODI_AD_LIB_POSTFIX) \
-lfluidThermophysicalModels$(WM_CODI_AD_LIB_POSTFIX) \
-lspecie$(WM_CODI_AD_LIB_POSTFIX) \
-lturbulenceModels$(WM_CODI_AD_LIB_POSTFIX) \
-lcompressibleTurbulenceModels$(WM_CODI_AD_LIB_POSTFIX) \
-lincompressibleTurbulenceModels$(WM_CODI_AD_LIB_POSTFIX) \
-lradiationModels$(WM_CODI_AD_LIB_POSTFIX) \
-lfiniteVolume$(WM_CODI_AD_LIB_POSTFIX) \
-lsampling$(WM_CODI_AD_LIB_POSTFIX) \
-lmeshTools$(WM_CODI_AD_LIB_POSTFIX) \
-lfvOptions$(WM_CODI_AD_LIB_POSTFIX) \
-L$(PETSC_LIB) -lpetsc \
-L$(MPI_ARCH_PATH)/lib \
-L$(MPI_ARCH_PATH)/lib64 \
Expand Down
2 changes: 1 addition & 1 deletion src/adjoint/DAFunction/Make/files
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
DAFunction.C
DAFunctionForce.C

LIB = $(DAFOAM_ROOT_PATH)/OpenFOAM/sharedLibs/libDAFunction$(DF_LIB_SUFFIX)
LIB = $(DAFOAM_ROOT_PATH)/OpenFOAM/sharedLibs/libDAFunction$(WM_CODI_AD_LIB_POSTFIX)
27 changes: 13 additions & 14 deletions src/adjoint/DAFunction/Make/options
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
EXE_INC = \
-std=c++11 -w \
-std=c++11 \
-Wno-old-style-cast \
-Wno-conversion-null \
-Wno-deprecated-copy \
-DCompressibleFlow \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
Expand All @@ -28,18 +27,18 @@ EXE_INC = \


LIB_LIBS = \
-lcompressibleTransportModels$(DF_LIB_SUFFIX) \
-lincompressibleTransportModels$(DF_LIB_SUFFIX) \
-lfluidThermophysicalModels$(DF_LIB_SUFFIX) \
-lspecie$(DF_LIB_SUFFIX) \
-lturbulenceModels$(DF_LIB_SUFFIX) \
-lcompressibleTurbulenceModels$(DF_LIB_SUFFIX) \
-lincompressibleTurbulenceModels$(DF_LIB_SUFFIX) \
-lradiationModels$(DF_LIB_SUFFIX) \
-lfiniteVolume$(DF_LIB_SUFFIX) \
-lsampling$(DF_LIB_SUFFIX) \
-lmeshTools$(DF_LIB_SUFFIX) \
-lfvOptions$(DF_LIB_SUFFIX) \
-lcompressibleTransportModels$(WM_CODI_AD_LIB_POSTFIX) \
-lincompressibleTransportModels$(WM_CODI_AD_LIB_POSTFIX) \
-lfluidThermophysicalModels$(WM_CODI_AD_LIB_POSTFIX) \
-lspecie$(WM_CODI_AD_LIB_POSTFIX) \
-lturbulenceModels$(WM_CODI_AD_LIB_POSTFIX) \
-lcompressibleTurbulenceModels$(WM_CODI_AD_LIB_POSTFIX) \
-lincompressibleTurbulenceModels$(WM_CODI_AD_LIB_POSTFIX) \
-lradiationModels$(WM_CODI_AD_LIB_POSTFIX) \
-lfiniteVolume$(WM_CODI_AD_LIB_POSTFIX) \
-lsampling$(WM_CODI_AD_LIB_POSTFIX) \
-lmeshTools$(WM_CODI_AD_LIB_POSTFIX) \
-lfvOptions$(WM_CODI_AD_LIB_POSTFIX) \
-L$(PETSC_LIB) -lpetsc \
-L$(MPI_ARCH_PATH)/lib \
-L$(MPI_ARCH_PATH)/lib64 \
Expand Down
2 changes: 1 addition & 1 deletion src/adjoint/DAFvSource/DAFvSourceActuatorLine.C
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ void DAFvSourceActuatorLine::calcFvSource(volVectorField& fvSource)
{
scalar twoPi = 2.0 * pi;
Info << "blade " << bb << " theta: "
#if defined(CODI_AD_FORWARD) || defined(CODI_AD_REVERSE)
#if defined(CODI_ADF) || defined(CODI_ADR)
<< fmod(thetaBlade.getValue(), twoPi.getValue()) * 180.0 / pi.getValue()
#else
<< fmod(thetaBlade, twoPi) * 180.0 / pi
Expand Down
2 changes: 1 addition & 1 deletion src/adjoint/DAFvSource/Make/files
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ DAFvSource.C
DAFvSourceActuatorDisk.C


LIB = $(DAFOAM_ROOT_PATH)/OpenFOAM/sharedLibs/libDAFvSource$(DF_LIB_SUFFIX)
LIB = $(DAFOAM_ROOT_PATH)/OpenFOAM/sharedLibs/libDAFvSource$(WM_CODI_AD_LIB_POSTFIX)
Loading

0 comments on commit 4d04843

Please sign in to comment.