DOLFIN
DOLFIN C++ interface
|
#include <GenericAdaptiveVariationalSolver.h>
Public Member Functions | |
void | solve (const double tol) |
virtual std::shared_ptr< const Function > | solve_primal ()=0 |
virtual std::vector< std::shared_ptr< const DirichletBC > > | extract_bcs () const =0 |
virtual double | evaluate_goal (Form &M, std::shared_ptr< const Function > u) const =0 |
virtual void | adapt_problem (std::shared_ptr< const Mesh > mesh)=0 |
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) | |
Static Public Member Functions | |
static Parameters | default_parameters () |
Protected Member Functions | |
virtual std::size_t | num_dofs_primal ()=0 |
Protected Attributes | |
std::shared_ptr< Form > | goal |
The goal functional. | |
std::shared_ptr< ErrorControl > | control |
Error control object. | |
std::vector< std::shared_ptr< Parameters > > | _adaptive_data |
Additional Inherited Members | |
Public Attributes inherited from dolfin::Variable | |
Parameters | parameters |
Parameters. | |
An abstract class for goal-oriented adaptive solution of variational problems.
|
pure virtual |
Adapt the problem to other mesh. Must be overloaded in subclass.
Arguments mesh (Mesh) The other mesh
Implemented in dolfin::AdaptiveNonlinearVariationalSolver, and dolfin::AdaptiveLinearVariationalSolver.
std::vector< std::shared_ptr< Parameters > > GenericAdaptiveVariationalSolver::adaptive_data | ( | ) | const |
Return stored adaptive data
Returns std::vector<Parameters> The data stored in the adaptive loop
|
inlinestatic |
Default parameter values:
"max_iterations" (int) "max_dimension" (int) "save_data" (bool) "data_label" (std::string) "reference" (double) "marking_strategy" (std::string) "marking_fraction" (double)
|
pure virtual |
Evaluate the goal functional. Must be overloaded in subclass.
Arguments M (Form) The functional to be evaluated u (Function) The function of which to evaluate the functional
Returns double The value of M evaluated at u
Implemented in dolfin::AdaptiveNonlinearVariationalSolver, and dolfin::AdaptiveLinearVariationalSolver.
|
pure virtual |
Extract the boundary conditions for the primal problem. Must be overloaded in subclass.
Returns std::vector<DirichletBC> The primal boundary conditions
Implemented in dolfin::AdaptiveNonlinearVariationalSolver, and dolfin::AdaptiveLinearVariationalSolver.
|
protectedpure virtual |
Return the number of degrees of freedom for primal problem
Returns std::size_t The number of degrees of freedom
Implemented in dolfin::AdaptiveNonlinearVariationalSolver, and dolfin::AdaptiveLinearVariationalSolver.
void GenericAdaptiveVariationalSolver::solve | ( | const double | tol | ) |
Solve such that the functional error is less than the given tolerance. Note that each call to solve is based on the leaf-node of the variational problem
Arguments tol (double) The error tolerance
|
pure virtual |
Solve the primal problem. Must be overloaded in subclass.
Returns Function The solution to the primal problem
Implemented in dolfin::AdaptiveNonlinearVariationalSolver, and dolfin::AdaptiveLinearVariationalSolver.