Skip to content
Snippets Groups Projects
Commit 327edc7b authored by Adrien Crovato's avatar Adrien Crovato
Browse files

Add build type print. Correct matrix transpose in Adjoint and add dummy regression test to adjoint.

parent 2a7a1dc8
No related branches found
No related tags found
1 merge request!53Update flow and windows libs
Pipeline #1123 passed
......@@ -28,6 +28,7 @@ IF(NOT CMAKE_BUILD_TYPE)
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
FORCE)
ENDIF(NOT CMAKE_BUILD_TYPE)
MESSAGE(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/CMake")
......
......@@ -388,10 +388,10 @@ void Adjoint::buildWake(WakeElement *&we, Eigen::MatrixXd &Kupup, Eigen::MatrixX
Eigen::VectorXd nJdNLw(we->nColLw);
Eigen::VectorXd VJdNUp(we->nColUp);
Eigen::VectorXd VJdNLw(we->nColLw);
nJdNUp = volUpDff * volUpJ.transpose() * nUp;
nJdNLw = volLwDff * volLwJ.transpose() * nLw;
VJdNUp = volUpDff * volUpJ.transpose() * we->volUpE->computeGrad(sol->phi, 0);
VJdNLw = volLwDff * volLwJ.transpose() * we->volLwE->computeGrad(sol->phi, 0);
nJdNUp = volUpDff.transpose() * volUpJ.transpose() * nUp;
nJdNLw = volLwDff.transpose() * volLwJ.transpose() * nLw;
VJdNUp = volUpDff.transpose() * volUpJ.transpose() * we->volUpE->computeGrad(sol->phi, 0);
VJdNLw = volLwDff.transpose() * volLwJ.transpose() * we->volLwE->computeGrad(sol->phi, 0);
// Build
/* @todo assemble on contributing nodes for lower surfaces => nRow <- we->surE->nodes.size() */
......
......@@ -90,7 +90,14 @@ def main():
# check results
print(ccolors.ANSI_BLUE + 'PyTesting...' + ccolors.ANSI_RESET)
print('No test defined for adjoint solver yet.')
tests = CTests()
if M_inf == 0.6 and alpha == 3*math.pi/180: # TODO dummy anti-regression tests
from numpy import linalg as nla
tests.add(CTest('Sens[lambdaL]', nla.norm(adjoint.lambdaL), 136.5, 1e-1))
tests.add(CTest('Sens[lambdaD]', nla.norm(adjoint.lambdaD), 15.9, 1e-1))
else:
raise Exception('Test not defined for this flow')
tests.run()
# eof
print('')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment