|
template<typename INTEGRATORDATACONT > |
| StatReducedProblem (PROBLEM *OP, DOpEtypes::VectorStorageType state_behavior, ParameterReader ¶m_reader, INTEGRATORDATACONT &idc, int base_priority=0) |
|
template<typename STATEINTEGRATORDATACONT , typename CONTROLINTEGRATORCONT > |
| StatReducedProblem (PROBLEM *OP, DOpEtypes::VectorStorageType state_behavior, ParameterReader ¶m_reader, CONTROLINTEGRATORCONT &c_idc, STATEINTEGRATORDATACONT &s_idc, int base_priority=0) |
|
| ~StatReducedProblem () |
|
void | ReInit () |
|
bool | ComputeReducedConstraints (const ControlVector< VECTOR > &q, ConstraintVector< VECTOR > &g) |
|
void | GetControlBoxConstraints (ControlVector< VECTOR > &lb, ControlVector< VECTOR > &ub) |
|
void | ComputeReducedGradient (const ControlVector< VECTOR > &q, ControlVector< VECTOR > &gradient, ControlVector< VECTOR > &gradient_transposed) |
|
double | ComputeReducedCostFunctional (const ControlVector< VECTOR > &q) |
|
void | ComputeReducedFunctionals (const ControlVector< VECTOR > &q) |
|
template<class DWRC , class PDE > |
void | ComputeRefinementIndicators (const ControlVector< VECTOR > &q, DWRC &dwrc, PDE &pde) |
|
void | ComputeReducedHessianVector (const ControlVector< VECTOR > &q, const ControlVector< VECTOR > &direction, ControlVector< VECTOR > &hessian_direction, ControlVector< VECTOR > &hessian_direction_transposed) |
|
void | ComputeReducedGradientOfGlobalConstraints (unsigned int num, const ControlVector< VECTOR > &q, const ConstraintVector< VECTOR > &g, ControlVector< VECTOR > &gradient, ControlVector< VECTOR > &gradient_transposed) |
|
void | StateSizeInfo (std::stringstream &out) |
|
void | WriteToFile (const VECTOR &v, std::string name, std::string outfile, std::string dof_type, std::string filetype) |
|
void | WriteToFile (const ControlVector< VECTOR > &v, std::string name, std::string dof_type) |
|
void | WriteToFile (const std::vector< double > &, std::string) |
|
| ReducedProblemInterface (PROBLEM *OP, int base_priority=0) |
|
| ~ReducedProblemInterface () |
|
virtual void | ComputeReducedHessianInverseVector (const ControlVector< VECTOR > &, const ControlVector< VECTOR > &, ControlVector< VECTOR > &) |
|
void | SetProblemType (std::string type, unsigned int num=0) |
|
PROBLEM * | GetProblem () |
|
const PROBLEM * | GetProblem () const |
|
template<class DWRC > |
void | InitializeDWRC (DWRC &dwrc) |
|
| ReducedProblemInterface_Base () |
|
virtual | ~ReducedProblemInterface_Base () |
|
virtual void | WriteToFileElementwise (const Vector< double > &, std::string, std::string, std::string, std::string) |
|
void | RegisterOutputHandler (DOpEOutputHandler< VECTOR > *OH) |
|
void | RegisterExceptionHandler (DOpEExceptionHandler< VECTOR > *OH) |
|
DOpEExceptionHandler< VECTOR > * | GetExceptionHandler () |
|
DOpEOutputHandler< VECTOR > * | GetOutputHandler () |
|
double | GetFunctionalValue (std::string name) const |
|
const std::vector< double > & | GetTimeFunctionalValue (std::string name) const |
|
void | AddUserDomainData (std::string name, const VECTOR *new_data) |
|
void | DeleteUserDomainData (std::string name) |
|
template<typename CONTROLNONLINEARSOLVER, typename NONLINEARSOLVER, typename CONTROLINTEGRATOR, typename INTEGRATOR, typename PROBLEM, typename VECTOR, int dopedim, int dealdim>
class DOpE::StatReducedProblem< CONTROLNONLINEARSOLVER, NONLINEARSOLVER, CONTROLINTEGRATOR, INTEGRATOR, PROBLEM, VECTOR, dopedim, dealdim >
Basic class to solve stationary PDE- and optimization problems.
- Template Parameters
-
<CONTROLNONLINEARSOLVER> | Newton solver for the control variables. |
<NONLINEARSOLVER> | Newton solver for the state variables. |
<CONTROLINTEGRATOR> | An integrator for the control variables, e.g, Integrator or IntegratorMixedDimensions. |
<INTEGRATOR> | An integrator for the state variables, e.g, Integrator or IntegratorMixedDimensions. |
<PROBLEM> | PDE- or optimization problem under consideration. |
<VECTOR> | Class in which we want to store the spatial vector (i.e. dealii::Vector<double> or dealii::BlockVector<double>) |
<dopedim> | The dimension for the control variable. |
<dealdim> | The dimension for the state variable. |
template<typename CONTROLNONLINEARSOLVER , typename NONLINEARSOLVER , typename CONTROLINTEGRATOR , typename INTEGRATOR , typename PROBLEM , typename VECTOR , int dopedim, int dealdim>
template<typename INTEGRATORDATACONT >
DOpE::StatReducedProblem< CONTROLNONLINEARSOLVER, NONLINEARSOLVER, CONTROLINTEGRATOR, INTEGRATOR, PROBLEM, VECTOR, dopedim, dealdim >::StatReducedProblem |
( |
PROBLEM * |
OP, |
|
|
DOpEtypes::VectorStorageType |
state_behavior, |
|
|
ParameterReader & |
param_reader, |
|
|
INTEGRATORDATACONT & |
idc, |
|
|
int |
base_priority = 0 |
|
) |
| |
Constructor for the StatReducedProblem.
- Template Parameters
-
- Parameters
-
OP | Problem is given to the stationary solver. |
state_behavior | Indicates the behavior of the StateVector. |
param_reader | An object which has run time data. |
idc | The InegratorDataContainer for state and control integration |
base_priority | An offset for the priority of the output written to the OutputHandler |
template<typename CONTROLNONLINEARSOLVER , typename NONLINEARSOLVER , typename CONTROLINTEGRATOR , typename INTEGRATOR , typename PROBLEM , typename VECTOR , int dopedim, int dealdim>
template<typename STATEINTEGRATORDATACONT , typename CONTROLINTEGRATORCONT >
DOpE::StatReducedProblem< CONTROLNONLINEARSOLVER, NONLINEARSOLVER, CONTROLINTEGRATOR, INTEGRATOR, PROBLEM, VECTOR, dopedim, dealdim >::StatReducedProblem |
( |
PROBLEM * |
OP, |
|
|
DOpEtypes::VectorStorageType |
state_behavior, |
|
|
ParameterReader & |
param_reader, |
|
|
CONTROLINTEGRATORCONT & |
c_idc, |
|
|
STATEINTEGRATORDATACONT & |
s_idc, |
|
|
int |
base_priority = 0 |
|
) |
| |
Constructor for the StatReducedProblem.
- Template Parameters
-
- Parameters
-
OP | Problem is given to the stationary solver. |
state_behavior | Indicates the behavior of the StateVector. |
param_reader | An object which has run time data. |
c_idc | The InegratorDataContainer for control integration |
s_idc | The InegratorDataContainer for state integration |
base_priority | An offset for the priority of the output written to the OutputHandler |
template<typename CONTROLNONLINEARSOLVER , typename NONLINEARSOLVER , typename CONTROLINTEGRATOR , typename INTEGRATOR , typename PROBLEM , typename VECTOR , int dopedim, int dealdim>
This function computes the solution for the dual variable for error estimation.
I is assumed that the state u(q) corresponding to the argument q is already calculated.
- Parameters
-
q | The ControlVector<VECTOR> is given to this function. |
weight_comp | A flag deciding how the weights should be calculated |
template<typename CONTROLNONLINEARSOLVER , typename NONLINEARSOLVER , typename CONTROLINTEGRATOR , typename INTEGRATOR , typename PROBLEM , typename VECTOR , int dopedim, int dealdim>
void DOpE::StatReducedProblem< CONTROLNONLINEARSOLVER, NONLINEARSOLVER, CONTROLINTEGRATOR, INTEGRATOR, PROBLEM, VECTOR, dopedim, dealdim >::ComputeReducedAdjoint |
( |
const ControlVector< VECTOR > & |
q | ) |
|
|
protected |
This function computes the adjoint, i.e., the Lagrange multiplier to constraint given by the state equation. It is assumed that the state u(q) corresponding to the argument q is already calculated.
- Parameters
-
q | The ControlVector<VECTOR> is given to this function. |
template<typename CONTROLNONLINEARSOLVER , typename NONLINEARSOLVER , typename CONTROLINTEGRATOR , typename INTEGRATOR , typename PROBLEM , typename VECTOR , int dopedim, int dealdim>
template<typename CONTROLNONLINEARSOLVER , typename NONLINEARSOLVER , typename CONTROLINTEGRATOR , typename INTEGRATOR , typename PROBLEM , typename VECTOR , int dopedim, int dealdim>
double DOpE::StatReducedProblem< CONTROLNONLINEARSOLVER, NONLINEARSOLVER, CONTROLINTEGRATOR, INTEGRATOR, PROBLEM, VECTOR, dopedim, dealdim >::ComputeReducedCostFunctional |
( |
const ControlVector< VECTOR > & |
q | ) |
|
|
virtual |
template<typename CONTROLNONLINEARSOLVER , typename NONLINEARSOLVER , typename CONTROLINTEGRATOR , typename INTEGRATOR , typename PROBLEM , typename VECTOR , int dopedim, int dealdim>
void DOpE::StatReducedProblem< CONTROLNONLINEARSOLVER, NONLINEARSOLVER, CONTROLINTEGRATOR, INTEGRATOR, PROBLEM, VECTOR, dopedim, dealdim >::ComputeReducedFunctionals |
( |
const ControlVector< VECTOR > & |
q | ) |
|
|
virtual |
template<typename CONTROLNONLINEARSOLVER , typename NONLINEARSOLVER , typename CONTROLINTEGRATOR , typename INTEGRATOR , typename PROBLEM , typename VECTOR , int dopedim, int dealdim>
template<typename CONTROLNONLINEARSOLVER , typename NONLINEARSOLVER , typename CONTROLINTEGRATOR , typename INTEGRATOR , typename PROBLEM , typename VECTOR , int dopedim, int dealdim>
void DOpE::StatReducedProblem< CONTROLNONLINEARSOLVER, NONLINEARSOLVER, CONTROLINTEGRATOR, INTEGRATOR, PROBLEM, VECTOR, dopedim, dealdim >::ComputeReducedGradientOfGlobalConstraints |
( |
unsigned int |
num, |
|
|
const ControlVector< VECTOR > & |
q, |
|
|
const ConstraintVector< VECTOR > & |
g, |
|
|
ControlVector< VECTOR > & |
gradient, |
|
|
ControlVector< VECTOR > & |
gradient_transposed |
|
) |
| |
|
virtual |
template<typename CONTROLNONLINEARSOLVER , typename NONLINEARSOLVER , typename CONTROLINTEGRATOR , typename INTEGRATOR , typename PROBLEM , typename VECTOR , int dopedim, int dealdim>
void DOpE::StatReducedProblem< CONTROLNONLINEARSOLVER, NONLINEARSOLVER, CONTROLINTEGRATOR, INTEGRATOR, PROBLEM, VECTOR, dopedim, dealdim >::ComputeReducedHessianVector |
( |
const ControlVector< VECTOR > & |
q, |
|
|
const ControlVector< VECTOR > & |
direction, |
|
|
ControlVector< VECTOR > & |
hessian_direction, |
|
|
ControlVector< VECTOR > & |
hessian_direction_transposed |
|
) |
| |
|
virtual |
template<typename CONTROLNONLINEARSOLVER , typename NONLINEARSOLVER , typename CONTROLINTEGRATOR , typename INTEGRATOR , typename PROBLEM , typename VECTOR , int dopedim, int dealdim>
void DOpE::StatReducedProblem< CONTROLNONLINEARSOLVER, NONLINEARSOLVER, CONTROLINTEGRATOR, INTEGRATOR, PROBLEM, VECTOR, dopedim, dealdim >::ComputeReducedState |
( |
const ControlVector< VECTOR > & |
q | ) |
|
|
protected |
This function computes the solution for the state variable. The nonlinear solver is called, even for linear problems where the solution is computed within one iteration step.
- Parameters
-
q | The ControlVector<VECTOR> is given to this function. |
template<typename CONTROLNONLINEARSOLVER , typename NONLINEARSOLVER , typename CONTROLINTEGRATOR , typename INTEGRATOR , typename PROBLEM , typename VECTOR , int dopedim, int dealdim>
template<class DWRC , class PDE >
void DOpE::StatReducedProblem< CONTROLNONLINEARSOLVER, NONLINEARSOLVER, CONTROLINTEGRATOR, INTEGRATOR, PROBLEM, VECTOR, dopedim, dealdim >::ComputeRefinementIndicators |
( |
const ControlVector< VECTOR > & |
q, |
|
|
DWRC & |
dwrc, |
|
|
PDE & |
pde |
|
) |
| |
Computes the error indicators for the error of a previosly specified functional. Assumes that the primal state solution is already computed and the functional is specified (see problem::SetFunctionalForErrorEstimation).
Everything else is determined by the DWRDataContainer you use (represented by the template parameter DWRC).
- Template Parameters
-
<DWRC> | A container for the refinement indicators See, e.g., DWRDataContainer |
<PDE> | The problem contrainer |
- Parameters
-
q | The ControlVector at which the indicators are to be evaluated. |
dwrc | The data container |
pde | The problem |
template<typename CONTROLNONLINEARSOLVER , typename NONLINEARSOLVER , typename CONTROLINTEGRATOR , typename INTEGRATOR , typename PROBLEM , typename VECTOR , int dopedim, int dealdim>
Static member function for run time parameters.
- Parameters
-
param_reader | An object which has run time data. |
template<typename CONTROLNONLINEARSOLVER , typename NONLINEARSOLVER , typename CONTROLINTEGRATOR , typename INTEGRATOR , typename PROBLEM , typename VECTOR , int dopedim, int dealdim>
template<typename CONTROLNONLINEARSOLVER , typename NONLINEARSOLVER , typename CONTROLINTEGRATOR , typename INTEGRATOR , typename PROBLEM , typename VECTOR , int dopedim, int dealdim>
const StateVector<VECTOR>& DOpE::StatReducedProblem< CONTROLNONLINEARSOLVER, NONLINEARSOLVER, CONTROLINTEGRATOR, INTEGRATOR, PROBLEM, VECTOR, dopedim, dealdim >::GetZForEE |
( |
| ) |
const |
|
inlineprotected |
Returns the solution of the dual equation for error estimation.
template<typename CONTROLNONLINEARSOLVER , typename NONLINEARSOLVER , typename CONTROLINTEGRATOR , typename INTEGRATOR , typename PROBLEM , typename VECTOR , int dopedim, int dealdim>
void DOpE::StatReducedProblem< CONTROLNONLINEARSOLVER, NONLINEARSOLVER, CONTROLINTEGRATOR, INTEGRATOR, PROBLEM, VECTOR, dopedim, dealdim >::ReInit |
( |
| ) |
|
|
virtual |
template<typename CONTROLNONLINEARSOLVER , typename NONLINEARSOLVER , typename CONTROLINTEGRATOR , typename INTEGRATOR , typename PROBLEM , typename VECTOR , int dopedim, int dealdim>
void DOpE::StatReducedProblem< CONTROLNONLINEARSOLVER, NONLINEARSOLVER, CONTROLINTEGRATOR, INTEGRATOR, PROBLEM, VECTOR, dopedim, dealdim >::StateSizeInfo |
( |
std::stringstream & |
out | ) |
|
|
inlinevirtual |
template<typename CONTROLNONLINEARSOLVER , typename NONLINEARSOLVER , typename CONTROLINTEGRATOR , typename INTEGRATOR , typename PROBLEM , typename VECTOR , int dopedim, int dealdim>
void DOpE::StatReducedProblem< CONTROLNONLINEARSOLVER, NONLINEARSOLVER, CONTROLINTEGRATOR, INTEGRATOR, PROBLEM, VECTOR, dopedim, dealdim >::WriteToFile |
( |
const VECTOR & |
v, |
|
|
std::string |
name, |
|
|
std::string |
outfile, |
|
|
std::string |
dof_type, |
|
|
std::string |
filetype |
|
) |
| |
|
virtual |
Here, the given BlockVector<double> v is printed to a file of *.vtk or *.gpl format. However, in later implementations other file formats will be available.
- Parameters
-
v | The BlockVector to write to a file. |
name | The names of the variables, e.g., in a fluid problem: v1, v2, p. |
outfile | The basic name for the output file to print. |
dof_type | Has the DoF type: state or control. |
filetype | The filetype. Actually, *.vtk or *.gpl outputs are possible. |
Implements DOpE::ReducedProblemInterface_Base< VECTOR >.
template<typename CONTROLNONLINEARSOLVER , typename NONLINEARSOLVER , typename CONTROLINTEGRATOR , typename INTEGRATOR , typename PROBLEM , typename VECTOR , int dopedim, int dealdim>
void DOpE::StatReducedProblem< CONTROLNONLINEARSOLVER, NONLINEARSOLVER, CONTROLINTEGRATOR, INTEGRATOR, PROBLEM, VECTOR, dopedim, dealdim >::WriteToFile |
( |
const ControlVector< VECTOR > & |
v, |
|
|
std::string |
name, |
|
|
std::string |
dof_type |
|
) |
| |
|
virtual |
Here, the given ControlVector<VECTOR> v is printed to a file of *.vtk or *.gpl format. However, in later implementations other file formats will be available.
- Parameters
-
v | The ControlVector<VECTOR> to write to a file. |
name | The names of the variables, e.g., in a fluid problem: v1, v2, p. |
dof_type | Has the DoF type: state or control. |
Implements DOpE::ReducedProblemInterface_Base< VECTOR >.
template<typename CONTROLNONLINEARSOLVER , typename NONLINEARSOLVER , typename CONTROLINTEGRATOR , typename INTEGRATOR , typename PROBLEM , typename VECTOR , int dopedim, int dealdim>
void DOpE::StatReducedProblem< CONTROLNONLINEARSOLVER, NONLINEARSOLVER, CONTROLINTEGRATOR, INTEGRATOR, PROBLEM, VECTOR, dopedim, dealdim >::WriteToFile |
( |
const std::vector< double > & |
, |
|
|
std::string |
|
|
) |
| |
|
inlinevirtual |
Basic function to write a std::vector to a file.
- Parameters
-
v | A std::vector to write to a file. |
outfile | The basic name for the output file to print. Doesn't make sense here so aborts if called! |
Implements DOpE::ReducedProblemInterface_Base< VECTOR >.