20 #ifndef _FUEL_CELL_APPLICATION_CORE_APPLICATION_BASE_H_
21 #define _FUEL_CELL_APPLICATION_CORE_APPLICATION_BASE_H_
30 #include <base/parameter_handler.h>
33 #include <boost/shared_ptr.hpp>
35 using namespace dealii;
47 namespace ApplicationCore
126 ApplicationBase(boost::shared_ptr<ApplicationData> data = boost::shared_ptr<ApplicationData>());
147 print_caller_name(__FUNCTION__);
162 void print_parameters_to_file(ParameterHandler& param,
163 const std::string& file_name,
164 const ParameterHandler::OutputStyle& style);
177 virtual void initialize(ParameterHandler& param) = 0;
186 print_caller_name(__FUNCTION__);
196 print_caller_name(__FUNCTION__);
204 print_caller_name(__FUNCTION__);
219 bool apply_boundaries =
true)
221 print_caller_name(__FUNCTION__);
242 print_caller_name(__FUNCTION__);
252 print_caller_name(__FUNCTION__);
262 print_caller_name(__FUNCTION__);
273 print_caller_name(__FUNCTION__);
285 print_caller_name(__FUNCTION__);
291 boost::shared_ptr<ApplicationData> get_data();
296 const boost::shared_ptr<ApplicationData> get_data()
const;
313 virtual std::string id()
const;
319 virtual void notify(
const Event& reason);
324 virtual void clear();
329 virtual void clear_events();
336 void print_caller_name(
const std::string& caller_name)
const;
342 boost::shared_ptr<ApplicationData>
data;
358 #ifdef OPENFCST_WITH_PETSC
362 const unsigned int n_mpi_processes;
363 const unsigned int this_mpi_process;
364 MPI_Comm mpi_communicator;
virtual double residual(FEVector &dst, const FEVectors &src, bool apply_boundaries=true)
Compute residual of src and store it into dst.
Definition: application_base.h:217
virtual void start_vector(FEVector &dst, std::string caller) const
Initialize vector to problem size.
Definition: application_base.h:202
virtual void init_vector(FEVector &dst) const
Initialize vector to problem size.
Definition: application_base.h:194
virtual void Tsolve(FEVector &dst, const FEVectors &src)
Solve the dual system assembled with right hand side rhs and return the result in start...
Definition: application_base.h:239
virtual double evaluate(const FEVectors &src)
Evaluate a functional.
Definition: application_base.h:260
virtual void declare_parameters(ParameterHandler ¶m)
Declare parameters for a parameter file.
Definition: application_base.h:145
virtual void data_out(const std::string &filename, const FEVectors &src)
Write data in the format specified by the ParameterHandler.
Definition: application_base.h:282
virtual void remesh()
Generate the next mesh depending on the mesh generation parameters.
Definition: application_base.h:184
virtual void grid_out(const std::string &filename)
Write the mesh in the format specified by the ParameterHandler.
Definition: application_base.h:271
virtual double estimate(const FEVectors &src)
Estimate cell-wise errors.
Definition: application_base.h:250
Base class for applications.
Definition: application_base.h:114
Objects of this kind are used to notify interior applications of changes provoked by an outer loop...
Definition: event.h:57
BlockVector< double > FEVector
The vector class used by applications.
Definition: application_data.h:39
The data type used in function calls of Application.
Definition: fe_vectors.h:59
Event notifications
Accumulate reasons for assembling here.
Definition: application_base.h:352
boost::shared_ptr< ApplicationData > data
Object for auxiliary data.
Definition: application_base.h:342