DOLFIN
DOLFIN C++ interface
|
#include <AdaptiveNonlinearVariationalSolver.h>
Public Member Functions | |
AdaptiveNonlinearVariationalSolver (std::shared_ptr< NonlinearVariationalProblem > problem, std::shared_ptr< GoalFunctional > goal) | |
AdaptiveNonlinearVariationalSolver (std::shared_ptr< NonlinearVariationalProblem > problem, std::shared_ptr< Form > goal, std::shared_ptr< ErrorControl > control) | |
~AdaptiveNonlinearVariationalSolver () | |
Destructor. | |
virtual std::shared_ptr< const Function > | solve_primal () |
virtual std::vector< std::shared_ptr< const DirichletBC > > | extract_bcs () const |
virtual double | evaluate_goal (Form &M, std::shared_ptr< const Function > u) const |
virtual void | adapt_problem (std::shared_ptr< const Mesh > mesh) |
Public Member Functions inherited from dolfin::GenericAdaptiveVariationalSolver | |
void | solve (const double tol) |
std::vector< std::shared_ptr< Parameters > > | adaptive_data () const |
void | summary () |
Present summary of all adaptive data and parameters. | |
Public Member Functions inherited from dolfin::Variable | |
Variable () | |
Create unnamed variable. | |
Variable (const std::string name, const std::string label) | |
Create variable with given name and label. | |
Variable (const Variable &variable) | |
Copy constructor. | |
virtual | ~Variable () |
Destructor. | |
const Variable & | operator= (const Variable &variable) |
Assignment operator. | |
void | rename (const std::string name, const std::string label) |
Rename variable. | |
std::string | name () const |
Return name. | |
std::string | label () const |
Return label (description) | |
std::size_t | id () const |
virtual std::string | str (bool verbose) const |
Return informal string representation (pretty-print) | |
Protected Member Functions | |
virtual std::size_t | num_dofs_primal () |
Additional Inherited Members | |
Static Public Member Functions inherited from dolfin::GenericAdaptiveVariationalSolver | |
static Parameters | default_parameters () |
Public Attributes inherited from dolfin::Variable | |
Parameters | parameters |
Parameters. | |
Protected Attributes inherited from dolfin::GenericAdaptiveVariationalSolver | |
std::shared_ptr< Form > | goal |
The goal functional. | |
std::shared_ptr< ErrorControl > | control |
Error control object. | |
std::vector< std::shared_ptr< Parameters > > | _adaptive_data |
A class for goal-oriented adaptive solution of nonlinear variational problems.
For a nonlinear variational problem of the form: find u in V satisfying
F(u; v) = 0 for all v in :math:`\hat V`
and a corresponding conforming discrete problem: find u_h in V_h satisfying (at least approximately)
F(u_h; v) = 0 for all v in :math:`\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)\| < tol
This strategy is based on dual-weighted residual error estimators designed and automatically generated for the primal problem and subsequent h-adaptivity.
AdaptiveNonlinearVariationalSolver::AdaptiveNonlinearVariationalSolver | ( | std::shared_ptr< NonlinearVariationalProblem > | problem, |
std::shared_ptr< GoalFunctional > | goal | ||
) |
Create AdaptiveNonlinearVariationalSolver (shared ptr version)
Arguments problem (NonlinearVariationalProblem) The primal problem goal (GoalFunctional) The goal functional
AdaptiveNonlinearVariationalSolver::AdaptiveNonlinearVariationalSolver | ( | std::shared_ptr< NonlinearVariationalProblem > | problem, |
std::shared_ptr< Form > | goal, | ||
std::shared_ptr< ErrorControl > | control | ||
) |
Create AdaptiveLinearVariationalSolver from variational problem, goal form and error control instance
Arguments problem (NonlinearVariationalProblem) The primal problem goal (Form) The goal functional control (ErrorControl) An error controller object
|
virtual |
Adapt the problem to other mesh.
Arguments mesh (Mesh) The other mesh
Implements dolfin::GenericAdaptiveVariationalSolver.
|
virtual |
Evaluate the goal functional.
Arguments M (Form) The functional to be evaluated u (Function) The function at which to evaluate the functional
Returns double The value of M evaluated at u
Implements dolfin::GenericAdaptiveVariationalSolver.
|
virtual |
Extract the boundary conditions for the primal problem.
Returns std::vector<DirichletBC> The primal boundary conditions
Implements dolfin::GenericAdaptiveVariationalSolver.
|
protectedvirtual |
Return the number of degrees of freedom for primal problem
Returns std::size_t The number of degrees of freedom
Implements dolfin::GenericAdaptiveVariationalSolver.
|
virtual |
Solve the primal problem.
Returns Function The solution to the primal problem
Implements dolfin::GenericAdaptiveVariationalSolver.