19 #ifndef _FUEL_CELL_APPLICATION_CORE_APPLICATION_BASE_H_
20 #define _FUEL_CELL_APPLICATION_CORE_APPLICATION_BASE_H_
29 #include <deal.II/base/parameter_handler.h>
32 #include <boost/shared_ptr.hpp>
34 using namespace dealii;
46 namespace ApplicationCore
125 ApplicationBase(boost::shared_ptr<ApplicationData> data = boost::shared_ptr<ApplicationData>());
146 print_caller_name(__FUNCTION__);
161 void print_parameters_to_file(ParameterHandler& param,
162 const std::string& file_name,
163 const ParameterHandler::OutputStyle& style);
176 virtual void initialize(ParameterHandler& param) = 0;
185 print_caller_name(__FUNCTION__);
195 print_caller_name(__FUNCTION__);
203 print_caller_name(__FUNCTION__);
218 bool apply_boundaries =
true)
220 print_caller_name(__FUNCTION__);
243 print_caller_name(__FUNCTION__);
253 print_caller_name(__FUNCTION__);
264 print_caller_name(__FUNCTION__);
275 print_caller_name(__FUNCTION__);
286 print_caller_name(__FUNCTION__);
292 boost::shared_ptr<ApplicationData> get_data();
297 const boost::shared_ptr<ApplicationData> get_data()
const;
314 virtual std::string id()
const;
320 virtual void notify(
const Event& reason);
325 virtual void clear();
330 virtual void clear_events();
335 virtual unsigned int get_solution_index();
342 void print_caller_name(
const std::string& caller_name)
const;
348 boost::shared_ptr<ApplicationData>
data;
364 #ifdef OPENFCST_WITH_PETSC
368 const unsigned int n_mpi_processes;
369 const unsigned int this_mpi_process;
370 MPI_Comm mpi_communicator;
virtual void init_vector(FEVector &) const
Initialize vector to problem size.
Definition: application_base.h:193
virtual double residual(FEVector &, const FEVectors &, bool apply_boundaries=true)
Compute residual of src and store it into dst.
Definition: application_base.h:216
virtual void data_out(const std::string &filename, const FEVectors &src)
Write data in the format specified by the ParameterHandler.
Definition: application_base.h:283
virtual void grid_out(const std::string &)
Write the mesh in the format specified by the ParameterHandler.
Definition: application_base.h:273
virtual void remesh()
Generate the next mesh depending on the mesh generation parameters.
Definition: application_base.h:183
virtual double estimate(const FEVectors &)
Estimate cell-wise errors.
Definition: application_base.h:251
Base class for applications.
Definition: application_base.h:113
virtual double evaluate(const FEVectors &)
Evaluate a functional.
Definition: application_base.h:262
Objects of this kind are used to notify interior applications of changes provoked by an outer loop...
Definition: event.h:51
virtual void declare_parameters(ParameterHandler &)
Declare parameters for a parameter file.
Definition: application_base.h:144
BlockVector< double > FEVector
The vector class used by applications.
Definition: application_data.h:46
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:358
virtual void start_vector(FEVector &dst, std::string) const
Initialize vector to problem size.
Definition: application_base.h:201
boost::shared_ptr< ApplicationData > data
Object for auxiliary data.
Definition: application_base.h:348
virtual void Tsolve(FEVector &, const FEVectors &)
Solve the dual system assembled with right hand side rhs and return the result in start...
Definition: application_base.h:240