23 #ifndef __GENERIC_ADAPTIVE_VARIATIONAL_SOLVER_H 24 #define __GENERIC_ADAPTIVE_VARIATIONAL_SOLVER_H 28 #include <dolfin/common/Variable.h> 29 #include <dolfin/adaptivity/ErrorControl.h> 58 void solve(
const double tol);
65 virtual std::shared_ptr<const Function>
solve_primal() = 0;
73 virtual std::vector<std::shared_ptr<const DirichletBC> >
88 std::shared_ptr<const Function> u)
const = 0;
95 virtual void adapt_problem(std::shared_ptr<const Mesh> mesh) = 0;
102 std::vector<std::shared_ptr<Parameters> >
adaptive_data()
const;
118 p.
add(
"max_iterations", 50);
119 p.
add(
"max_dimension", 0);
120 p.
add(
"save_data",
false);
121 p.
add(
"data_label",
"default/adaptivity");
122 p.
add(
"reference", 0.0);
123 p.
add(
"marking_strategy",
"dorfler");
124 p.
add(
"marking_fraction", 0.5, 0.0, 1.0);
145 std::vector<std::shared_ptr<Parameters> > _adaptive_data;
std::shared_ptr< ErrorControl > control
Error control object.
Definition: GenericAdaptiveVariationalSolver.h:142
virtual std::size_t num_dofs_primal()=0
Common base class for DOLFIN variables.
Definition: Variable.h:35
std::vector< std::shared_ptr< Parameters > > adaptive_data() const
Definition: GenericAdaptiveVariationalSolver.cpp:198
Definition: GenericAdaptiveVariationalSolver.h:45
void add(std::string key)
Definition: Parameters.h:128
void summary()
Present summary of all adaptive data and parameters.
Definition: GenericAdaptiveVariationalSolver.cpp:203
std::shared_ptr< Form > goal
The goal functional.
Definition: GenericAdaptiveVariationalSolver.h:139
virtual std::vector< std::shared_ptr< const DirichletBC > > extract_bcs() const =0
static Parameters default_parameters()
Definition: GenericAdaptiveVariationalSolver.h:113
static Parameters default_parameters()
Default parameter values.
Definition: ErrorControl.h:88
Definition: Parameters.h:94
virtual std::shared_ptr< const Function > solve_primal()=0
virtual void adapt_problem(std::shared_ptr< const Mesh > mesh)=0
virtual double evaluate_goal(Form &M, std::shared_ptr< const Function > u) const =0
void solve(const double tol)
Definition: GenericAdaptiveVariationalSolver.cpp:52