Euler Boundary Functional
This page consists of all the functions necessary for computing a boundary functional along the geometric edges of a mesh for Euler equations. A boundary functional should ALWAYS be evaluated by calling evalFunctional
which is the highest level function.
EulerEquationMod.eval_dJdaoa
— Method.EulerEquationMod.eval_dJdaoa
Compute the complete derivative of a functional w.r.t angle of attack
Inputs
mesh
: Abstract mesh objectsbp
: Summation-By-Parts operatoreqn
: Euler equation objectopts
: Options dictionaryfunctionalData
: Object of type AbstractFunctional. This is type is associated with the functional being computed and holds all the relevant data.functionalName
: Name of the functional being evaluatedadjoint_vec
: Local portion of the adjoint vector owned by an MPI rank
Output
dJdaoa
: Complete derivative of the functional w.r.t angle of attack This is a scalar value that is the same across all MPI ranks
EulerEquationMod.calcBndryFunctional
— Method.EulerEquationMod.calcBndryFunctional
This function calculates a functional on a geometric boundary of a the computational space. This is a mid level function that should not be called from outside the module. Depending on the functional being computed, it may be necessary to define another method for this function based on a different boundary functional type or parameters.
Inputs
mesh
: Abstract mesh objectsbp
: Summation-By-Parts operatoreqn
: Euler equation objectopts
: Options dictionaryfunctionalData
: Object which is a subtype of Abstract OptimizationData. This is type is associated with the functional being computed and holds all the relevant data.
EulerEquationMod.calcBoundaryFunctionalIntegrand
Computes the integrand for boundary functional at a surface SBP node. Every functional of a different type may need a corresponding method to compute the integrand. The type of the functional object, which is a subtype of AbstractFunctional
.
Arguments
params
: eqn.params objectq
: Nodal solutionaux_vars
: Auxiliary variablesnrm
: Face normal vector in the physical spacenode_info
: Information about the SBP nodeobjective
: Functional data typeval
: Function output value
EulerEquationMod. calcBoundaryFunctionalIntegrand_revm
Reverse mode for boundary functional integrand w.r.t. nrm. Takes in input val_bar and return nrm_bar for further reverse propagation.
Arguments
params
: eqn.params objectq
: Nodal solutionaux_vars
: Auxiliary variablesnrm
: Face normal vector in the physical spacenode_info
: Information about the SBP nodeobjective
: Functional data typenrm_bar
: Resulting vectorval_bar
: Nodal portion of the seeding vector
EulerEquationMod.evalFunctional_revm
— Method.EulerEquationMod.evalFunctional_revm
Reverse mode of EulerEquationMod.evalFunctional, It takes in functional value and return mesh.nrm_bndry_bar
. Different functionals will need to be added to the if statement to further extend this function.
Arguments
mesh
: Abstract mesh objectsbp
: Summation-By-Parts operatoreqn
: Euler equation objectopts
: Options dictionaryfunctionalData
: Object of type AbstractFunctional. This is type is associated with the functional being computed and holds all the relevant data.functionalName
: Name of the functional being evaluated.
PDESolver.evalFunctional
— Method.EulerEquationMod.evalFunctional
High level function that evaluates all the functionals specified over various edges. This function is agnostic to the type of the functional being computed and calls a mid level functional-type specific function for the actual evaluation.
Arguments
mesh
: Abstract mesh objectsbp
: Summation-By-Parts operatoreqn
: Euler equation objectopts
: Options dictionaryfunctionalData
: Object of type AbstractFunctional. This is type is associated with the functional being computed and holds all the relevant data.
Outputs
val: functional value