13 #ifndef _DEALII_APPFRAME_APPLICATION_BASE_H_
14 #define _DEALII_APPFRAME_APPLICATION_BASE_H_
16 #include <base/parameter_handler.h>
18 #include <boost/shared_ptr.hpp>
24 using namespace dealii;
99 ApplicationBase(boost::shared_ptr<ApplicationData> ex_data = boost::shared_ptr<ApplicationData>());
124 virtual void declare_parameters(ParameterHandler& param) = 0;
137 void print_parameters_to_file(ParameterHandler& param,
138 const std::string& file_name,
139 const ParameterHandler::OutputStyle& style);
158 virtual void initialize(ParameterHandler& param) = 0;
165 virtual void remesh();
171 virtual void init_vector(
FEVector& dst)
const;
177 virtual void start_vector(
FEVector& dst,
178 std::string caller)
const;
187 virtual double residual(
FEVector& dst,
189 bool apply_boundaries =
true);
206 virtual void Tsolve(
FEVector& start,
212 virtual double estimate(
const FEVectors& src);
218 virtual double evaluate(
const FEVectors& src);
224 virtual void grid_out(
const std::string& filename)
const;
230 virtual void data_out(
const std::string& filename,
233 virtual void data_out(
const std::string& filename,
235 const std::vector<std::string> );
240 boost::shared_ptr<ApplicationData>
get_data() {
return data; }
245 const boost::shared_ptr<ApplicationData>
get_data()
const {
return data; }
259 virtual std::string
id()
const {
return std::string(
typeid(*this).name() ); }
267 virtual void notify(
const Event& reason) { notifications += reason; }
277 virtual void clear() { notifications.all(); }
289 void print_caller_name(
const std::string& caller_name)
const;
299 boost::shared_ptr<ApplicationData>
data;
315 ApplicationBase::ApplicationBase(boost::shared_ptr<ApplicationData> ex_data)
320 deallog <<
" Application";
340 const std::string& file_name,
341 const ParameterHandler::OutputStyle& style)
343 std::ofstream file_out;
344 file_out.open(file_name.c_str());
345 deallog <<
"Printing parameter handler" << std::endl;
346 param.print_parameters(file_out, style);
434 const std::vector<std::string> )
443 const std::type_info& info =
typeid(*this);
444 deallog <<
"Pure function " << caller_name <<
" called in Class " << info.name() << std::endl;