AdaptiveLinearVariationalSolver.h¶
Note
The documentation on this page was automatically extracted from the DOLFIN C++ code and may need to be edited or expanded.
-
class
AdaptiveLinearVariationalSolver
¶ A class for goal-oriented adaptive solution of linear variational problems.
For a linear variational problem of the form: find u in V satisfying
a(u, v) = L(v) for all v in \(\hat V\)and a corresponding conforming discrete problem: find u_h in V_h satisfying
a(u_h, v) = L(v) for all v in \(\hat V_h\)and a given goal functional M and tolerance tol, the aim is to find a V_H and a u_H in V_H satisfying the discrete problem such that
|M(u) - M(u_H)| < tolThis strategy is based on dual-weighted residual error estimators designed and automatically generated for the primal problem and subsequent h-adaptivity.
-
AdaptiveLinearVariationalSolver
(LinearVariationalProblem &problem, GoalFunctional &goal)¶ Create AdaptiveLinearVariationalSolver
- Arguments
- problem (
LinearVariationalProblem
) - The primal problem
- goal (
GoalFunctional
) - The goal functional
- problem (
Create AdaptiveLinearVariationalSolver (shared ptr version)
- Arguments
- problem (
LinearVariationalProblem
) - The primal problem
- goal (
GoalFunctional
) - The goal functional
- problem (
Create AdaptiveLinearVariationalSolver from variational problem, goal form and error control instance
- Arguments
- problem (
LinearVariationalProblem
) - The primal problem
- goal (
Form
) - The goal functional
- control (
ErrorControl
) - An error controller object
- problem (
-
boost::shared_ptr<const Function>
solve_primal
()¶ Solve the primal problem.
- Returns
Function
- The solution to the primal problem
-
std::vector<boost::shared_ptr<const DirichletBC>>
extract_bcs
() const¶ Extract the boundary conditions for the primal problem.
- Returns
- std::vector<
DirichletBC
> - The primal boundary conditions
- std::vector<
Evaluate the goal functional.
Adapt the problem to other mesh.
- Arguments
- mesh (
Mesh
) - The other mesh
- mesh (
-
std::size_t
num_dofs_primal
()¶ Return the number of degrees of freedom for primal problem
- Returns
- _std::size_t_
- The number of degrees of freedom
Helper function for instance initialization
- Arguments
- problem (
LinearVariationalProblem
) - The primal problem
- u (
GoalFunctional
) - The goal functional
- problem (
-