19 #include "libmesh/diff_solver.h" 20 #include "libmesh/diff_system.h" 21 #include "libmesh/steady_solver.h" 23 #include "libmesh/adjoint_refinement_estimator.h" 24 #include "libmesh/error_vector.h" 70 ResFuncType time_deriv,
71 ResFuncType constraint)
81 bool jacobian_computed =
87 bool jacobian_computed2 =
93 return jacobian_computed2;
105 this->
_system.ImplicitSystem::adjoint_qoi_parameter_sensitivity(qois, parameter_vector, sensitivities);
110 #ifdef LIBMESH_ENABLE_AMR 116 adjoint_refinement_error_estimator.
estimate_error(_system, QoI_elementwise_error);
130 #endif // LIBMESH_ENABLE_AMR virtual bool side_constraint(bool request_jacobian, DiffContext &)
Adds the constraint contribution on side of elem to elem_residual.
QoISet & qoi_set()
Access to the QoISet (default: weight all QoIs equally) to use when computing errors.
Real fixed_solution_derivative
The derivative of elem_fixed_solution with respect to the nonlinear solution, for use by systems cons...
This class provides all data required for a physics package (e.g.
virtual bool element_time_derivative(bool request_jacobian, DiffContext &)
Adds the time derivative contribution on elem to elem_residual.
virtual ~SteadySolver()
Destructor.
Data structure for specifying which Parameters should be independent variables in a parameter sensiti...
const DenseVector< Number > & get_elem_fixed_solution() const
Accessor for element fixed solution.
This class implements a "brute force" goal-oriented error estimator which computes an estimate of err...
virtual void integrate_qoi_timestep() override
A method to integrate the system::QoI functionals.
Data structure for specifying which Quantities of Interest should be calculated in an adjoint or a pa...
The ErrorVector is a specialization of the StatisticsVector for error data computed on a finite eleme...
virtual void integrate_adjoint_refinement_error_estimate(AdjointRefinementEstimator &adjoint_refinement_error_estimator, ErrorVector &QoI_elementwise_error) override
A method to compute the adjoint refinement error estimate at the current timestep.
virtual bool nonlocal_time_derivative(bool request_jacobian, DiffContext &)
Adds any nonlocal time derivative contributions (e.g.
The libMesh namespace provides an interface to certain functionality in the library.
virtual bool nonlocal_constraint(bool request_jacobian, DiffContext &)
Adds any nonlocal constraint contributions (e.g.
bool has_index(std::size_t) const
Return whether or not this index is in the set to be calculated.
sys_type & _system
A reference to the system we are solving.
const DenseVector< Number > & get_elem_solution() const
Accessor for element solution.
Data structure for holding completed parameter sensitivity calculations.
bool use_fixed_solution
A boolean to be set to true by systems using elem_fixed_solution, for optional use by e...
Number & get_global_QoI_error_estimate(unsigned int qoi_index)
This is an accessor function to access the computed global QoI error estimates.
virtual bool _general_residual(bool request_jacobian, DiffContext &, ResFuncType time_deriv, ResFuncType constraint)
This method is the underlying implementation of the public residual methods.
virtual void estimate_error(const System &system, ErrorVector &error_per_cell, const NumericVector< Number > *solution_vector=nullptr, bool estimate_parent_error=false) override
This function does uniform refinements and an adjoint solve to get an adjoint solution on each cell...
const DifferentiablePhysics * get_physics() const
virtual void assemble_qoi(const QoISet &qoi_indices=QoISet()) override
Prepares qoi for quantity of interest assembly, then calls user qoi function.
IntRange< T > make_range(T beg, T end)
The 2-parameter make_range() helper function returns an IntRange<T> when both input parameters are of...
virtual bool nonlocal_residual(bool request_jacobian, DiffContext &) override
This method uses the DifferentiablePhysics' nonlocal_time_derivative() and nonlocal_constraint() to b...
virtual bool element_residual(bool request_jacobian, DiffContext &) override
This method uses the DifferentiablePhysics' element_time_derivative() and element_constraint() to bui...
virtual bool side_residual(bool request_jacobian, DiffContext &) override
This method uses the DifferentiablePhysics' side_time_derivative() and side_constraint() to build a f...
virtual void integrate_adjoint_sensitivity(const QoISet &qois, const ParameterVector ¶meter_vector, SensitivityData &sensitivities) override
A method to integrate the adjoint sensitivity w.r.t a given parameter vector.
virtual bool side_time_derivative(bool request_jacobian, DiffContext &)
Adds the time derivative contribution on side of elem to elem_residual.
virtual bool element_constraint(bool request_jacobian, DiffContext &)
Adds the constraint contribution on elem to elem_residual.