Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
waves
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Aerospace and Mechanical Engineering
waves
Commits
327edc7b
Commit
327edc7b
authored
5 years ago
by
Adrien Crovato
Browse files
Options
Downloads
Patches
Plain Diff
Add build type print. Correct matrix transpose in Adjoint and add dummy regression test to adjoint.
parent
2a7a1dc8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!53
Update flow and windows libs
Pipeline
#1123
passed
5 years ago
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+1
-0
1 addition, 0 deletions
CMakeLists.txt
flow/src/wAdjoint.cpp
+4
-4
4 additions, 4 deletions
flow/src/wAdjoint.cpp
flow/tests/adjoint.py
+8
-1
8 additions, 1 deletion
flow/tests/adjoint.py
with
13 additions
and
5 deletions
CMakeLists.txt
+
1
−
0
View file @
327edc7b
...
...
@@ -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"
)
...
...
This diff is collapsed.
Click to expand it.
flow/src/wAdjoint.cpp
+
4
−
4
View file @
327edc7b
...
...
@@ -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() */
...
...
This diff is collapsed.
Click to expand it.
flow/tests/adjoint.py
+
8
−
1
View file @
327edc7b
...
...
@@ -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
(
''
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment