34 #include "libmesh/auto_ptr.h"
35 #include "libmesh/dof_map.h"
36 #include "libmesh/getpot.h"
37 #include "libmesh/steady_solver.h"
38 #include "libmesh/linear_solver.h"
56 libMesh::SteadySolver* time_solver =
new libMesh::SteadySolver( *(system) );
58 system->time_solver = libMesh::UniquePtr<libMesh::TimeSolver>(time_solver);
64 libmesh_assert( context.
system );
80 libMesh::LinearSolver<libMesh::Number> *linear_solver = context.
system->get_linear_solver();
83 linear_solver->reuse_preconditioner(
true);
89 linear_solver->reuse_preconditioner(
false);
108 const libMesh::QoISet& qoi_indices,
109 const libMesh::ParameterVector& parameters_in,
110 libMesh::SensitivityData& sensitivities)
const
113 libMesh::LinearSolver<libMesh::Number> *linear_solver = context.
system->get_linear_solver();
116 linear_solver->reuse_preconditioner(
true);
118 context.
system->adjoint_qoi_parameter_sensitivity
119 (qoi_indices, parameters_in, sensitivities);
122 linear_solver->reuse_preconditioner(
false);
127 const libMesh::QoISet& qoi_indices,
128 const libMesh::ParameterVector& parameters_in,
129 libMesh::SensitivityData& sensitivities)
const
131 context.
system->forward_qoi_parameter_sensitivity
132 (qoi_indices, parameters_in, sensitivities);
135 context.
vis->output_residual_sensitivities
139 context.
vis->output_solution_sensitivities
virtual void init_time_solver(GRINS::MultiphysicsSystem *system)
SharedPtr< libMesh::EquationSystems > equation_system
virtual void solve(SolverContext &context)
SharedPtr< PostProcessedQuantities< libMesh::Real > > postprocessing
void steady_adjoint_solve(SolverContext &context)
Do steady version of adjoint solve.
bool output_residual_sensitivities
SteadySolver(const GetPot &input)
virtual void forward_qoi_parameter_sensitivity(SolverContext &context, const libMesh::QoISet &qoi_indices, const libMesh::ParameterVector ¶meters_in, libMesh::SensitivityData &sensitivities) const
GRINS::MultiphysicsSystem * system
SharedPtr< GRINS::Visualization > vis
void print_scalar_vars(SolverContext &context)
Interface with libMesh for solving Multiphysics problems.
virtual void adjoint_qoi_parameter_sensitivity(SolverContext &context, const libMesh::QoISet &qoi_indices, const libMesh::ParameterVector ¶meters_in, libMesh::SensitivityData &sensitivities) const
Simple class to hold objects passed to Solver::solve.
bool output_solution_sensitivities