|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Qi Wang
Join Date: Oct 2024
Posts: 7
Rep Power: 2 ![]() |
I'm trying to set up adjoint computation for a objective function that is a single-point pressure. Where exactly should I change the code?
I did see hints on custom objective functions in COutput.cpp Code:
void COutput::SetCustomAndComboObjectives(int idxSol, const CConfig *config, CSolver **solver) { if (config->GetKind_ObjFunc() == CUSTOM_OBJFUNC && !config->GetCustomObjFunc().empty()) { if (!customObjFunc.ready) { SetupCustomHistoryOutput(config->GetCustomObjFunc(), customObjFunc); } solver[idxSol]->SetTotal_Custom_ObjFunc(customObjFunc.Eval()); } solver[idxSol]->Evaluate_ObjFunc(config, solver); SetHistoryOutputValue("COMBO", solver[idxSol]->GetTotal_ComboObj()); } Sorry I searched and found similar questions asked around 2013, before the discrete adjoint capabilities were developed, so I'll simply ask again. |
|
![]() |
![]() |
![]() |
![]() |
#2 | |
Senior Member
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 719
Rep Power: 21 ![]() |
use CUSTOM_OBJFUNC. I never tried it together with a probe before. Let us know how that works out.
Quote:
|
||
![]() |
![]() |
![]() |
Tags |
adjoint solver, su2 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] mesh airfoil NACA0012 | anand_30 | OpenFOAM Meshing & Mesh Conversion | 13 | March 7, 2022 18:22 |
[Other] refineWallLayer Error | Yuby | OpenFOAM Meshing & Mesh Conversion | 2 | November 11, 2021 12:04 |
[blockMesh] Errors during blockMesh meshing | Madeleine P. Vincent | OpenFOAM Meshing & Mesh Conversion | 51 | May 30, 2016 11:51 |
Running UDF with Supercomputer | roi247 | FLUENT | 4 | October 15, 2015 14:41 |
OpenFOAM static build on Cray XT5 | asaijo | OpenFOAM Installation | 9 | April 6, 2011 13:21 |