DOLFIN
DOLFIN C++ interface
Public Member Functions | Protected Member Functions | List of all members
dolfin::AdaptiveLinearVariationalSolver Class Reference

#include <AdaptiveLinearVariationalSolver.h>

Inheritance diagram for dolfin::AdaptiveLinearVariationalSolver:
Inheritance graph
[legend]
Collaboration diagram for dolfin::AdaptiveLinearVariationalSolver:
Collaboration graph
[legend]

Public Member Functions

 AdaptiveLinearVariationalSolver (std::shared_ptr< LinearVariationalProblem > problem, std::shared_ptr< GoalFunctional > goal)
 
 AdaptiveLinearVariationalSolver (std::shared_ptr< LinearVariationalProblem > problem, std::shared_ptr< Form > goal, std::shared_ptr< ErrorControl > control)
 
 ~AdaptiveLinearVariationalSolver ()
 Destructor.
 
virtual std::shared_ptr< const Functionsolve_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 Variableoperator= (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< Formgoal
 The goal functional.
 
std::shared_ptr< ErrorControlcontrol
 Error control object.
 
std::vector< std::shared_ptr< Parameters > > _adaptive_data
 

Detailed Description

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 :math:`\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 :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.

Constructor & Destructor Documentation

◆ AdaptiveLinearVariationalSolver() [1/2]

AdaptiveLinearVariationalSolver::AdaptiveLinearVariationalSolver ( std::shared_ptr< LinearVariationalProblem problem,
std::shared_ptr< GoalFunctional goal 
)

Create AdaptiveLinearVariationalSolver (shared ptr version)

Arguments problem (LinearVariationalProblem) The primal problem goal (GoalFunctional) The goal functional

◆ AdaptiveLinearVariationalSolver() [2/2]

AdaptiveLinearVariationalSolver::AdaptiveLinearVariationalSolver ( std::shared_ptr< LinearVariationalProblem problem,
std::shared_ptr< Form goal,
std::shared_ptr< ErrorControl control 
)

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

Member Function Documentation

◆ adapt_problem()

void AdaptiveLinearVariationalSolver::adapt_problem ( std::shared_ptr< const Mesh mesh)
virtual

Adapt the problem to other mesh.

Arguments mesh (Mesh) The other mesh

Implements dolfin::GenericAdaptiveVariationalSolver.

◆ evaluate_goal()

double AdaptiveLinearVariationalSolver::evaluate_goal ( Form M,
std::shared_ptr< const Function u 
) const
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.

◆ extract_bcs()

std::vector< std::shared_ptr< const DirichletBC > > AdaptiveLinearVariationalSolver::extract_bcs ( ) const
virtual

Extract the boundary conditions for the primal problem.

Returns std::vector<DirichletBC> The primal boundary conditions

Implements dolfin::GenericAdaptiveVariationalSolver.

◆ num_dofs_primal()

std::size_t AdaptiveLinearVariationalSolver::num_dofs_primal ( )
protectedvirtual

Return the number of degrees of freedom for primal problem

Returns std::size_t The number of degrees of freedom

Implements dolfin::GenericAdaptiveVariationalSolver.

◆ solve_primal()

std::shared_ptr< const Function > AdaptiveLinearVariationalSolver::solve_primal ( )
virtual

Solve the primal problem.

Returns Function The solution to the primal problem

Implements dolfin::GenericAdaptiveVariationalSolver.


The documentation for this class was generated from the following files: