17 #ifndef _FUELCELL__APP_THERMAL_TEST__H
18 #define _FUELCELL__APP_THERMAL_TEST__H
21 #include "base/parameter_handler.h"
22 #include "base/function_lib.h"
23 #include "base/function.h"
24 #include "base/quadrature_lib.h"
26 #include "lac/block_vector.h"
27 #include "lac/full_matrix.h"
28 #include "lac/solver_cg.h"
29 #include "lac/solver_gmres.h"
30 #include "lac/precondition.h"
31 #include "lac/precondition_block.h"
32 #include "lac/block_matrix_array.h"
33 #include "lac/sparse_ilu.h"
34 #include "lac/sparse_direct.h"
36 #include "grid/grid_generator.h"
37 #include "grid/tria_accessor.h"
38 #include "grid/tria_iterator.h"
39 #include "grid/tria_boundary_lib.h"
41 #include "fe/fe_values.h"
43 #include "numerics/vector_tools.h"
44 #include "numerics/matrix_tools.h"
45 #include "numerics/error_estimator.h"
47 #include "boost/shared_ptr.hpp"
73 namespace InitialSolution
99 virtual double value (
const Point<dim> &p,
100 const unsigned int component = 0)
const;
109 namespace Application
137 AppThermalTest (boost::shared_ptr<FuelCell::ApplicationCore::ApplicationData>
data = boost::shared_ptr<FuelCell::ApplicationCore::ApplicationData> ());
158 const std::vector<double>& value_dvar,
159 ParameterHandler& param){};
170 virtual void initialize(ParameterHandler& param);
176 std::shared_ptr<Function<dim> > initial_function = std::shared_ptr<Function<dim> >());
232 virtual void data_out(
const std::string& basename,
254 boost::shared_ptr< FuelCellShop::Layer::GasDiffusionLayer<dim> >
test_layer;
273 #endif //_FUELCELL__AppThermalTest_H
virtual void set_parameters(const std::vector< std::string > &name_dvar, const std::vector< double > &value_dvar, ParameterHandler ¶m)
Function called by optimization loop in order to set the values in the ParameterHandler to the new de...
Definition: app_thermal_test.h:157
virtual void bdry_residual(FuelCell::ApplicationCore::FEVector &bdry_vector, const typename DoFApplication< dim >::FaceInfo &bdry_info)
Assemble local boundary residual.
virtual void data_out(const std::string &basename, const FuelCell::ApplicationCore::FEVectors &vectors)
Reimplementation of the routine in the base class BaseApplication in namespace AppFrame so that the r...
boost::shared_ptr< FuelCellShop::Layer::GasDiffusionLayer< dim > > test_layer
Definition: app_thermal_test.h:254
virtual void cell_residual(FuelCell::ApplicationCore::FEVector &cell_vector, const typename DoFApplication< dim >::CellInfo &cell)
Integration of the rhs of the equations.
virtual void initialize_solution(FuelCell::ApplicationCore::FEVector &initial_guess, std::shared_ptr< Function< dim > > initial_function=std::shared_ptr< Function< dim > >())
Initialize nonlinear solution.
This class is used when solving the problem using Newton's method to provide an initial solution...
Definition: app_thermal_test.h:81
virtual void declare_parameters(ParameterHandler ¶m)
Declare all parameters that are needed for:
virtual double estimate(const FuelCell::ApplicationCore::FEVectors &sol)
Estimate error per cell.
This class deals with Thermal Transport Equation.
Definition: thermal_transport_equation.h:190
AppThermalTest(boost::shared_ptr< FuelCell::ApplicationCore::ApplicationData > data=boost::shared_ptr< FuelCell::ApplicationCore::ApplicationData >())
Constructor.
virtual void initialize(ParameterHandler ¶m)
Call the other initialize routines from the inherited classes.
virtual double value(const Point< dim > &p, const unsigned int component=0) const
This is the member function that computes the value of the initial solution for a given point...
This class is created for the objects handed to the mesh loops.
Definition: mesh_loop_info_objects.h:625
std::string case_type
Definition: app_thermal_test.h:104
virtual ~AppThermalTestIC()
Destructor.
Definition: app_thermal_test.h:93
virtual ~AppThermalTest()
Destructor.
Definition: app_thermal_test.h:142
AppThermalTestIC(const std::string &type)
Constructor.
std::vector< MatrixBlock< FullMatrix< double > > > MatrixVector
The matrix vector used in the mesh loops.
Definition: matrix_block.h:102
std::map< unsigned int, double > boundary_values
Variable to store boundary values, so they only need to be computed once per mesh refinement...
Definition: block_matrix_application.h:324
std::string case_type
String to determine the case type.
Definition: app_thermal_test.h:266
This class is used to test thermal transport equation (fourier equation) against analytical solutions...
Definition: app_thermal_test.h:122
virtual void global_responses(std::vector< double > &resp, const FuelCell::ApplicationCore::FEVector &sol)
This class is used to evaluate all responses that do not require looping over cells.
Definition: app_thermal_test.h:245
virtual void bdry_matrix(FuelCell::ApplicationCore::MatrixVector &bdry_matrices, const typename DoFApplication< dim >::FaceInfo &bdry_info)
Assemble local boundary matrix.
virtual void dirichlet_bc(std::map< unsigned int, double > &boundary_values) const
Member function used to set dirichlet boundary conditions.
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
virtual void cell_responses(std::vector< double > &resp, const typename DoFApplication< dim >::CellInfo &info, const FuelCell::ApplicationCore::FEVector &sol)
Compute the value of all objective function and constraints.
Definition: app_thermal_test.h:238
Application handling matrices and assembling the linear system to solve the sensitivity equations...
Definition: optimization_block_matrix_application.h:62
virtual void cell_matrix(FuelCell::ApplicationCore::MatrixVector &cell_matrices, const typename DoFApplication< dim >::CellInfo &cell)
Integration of local bilinear form.
FuelCellShop::Equation::ThermalTransportEquation< dim > thermal_transport
ThermalTransportEquation object.
Definition: app_thermal_test.h:262
boost::shared_ptr< ApplicationData > data
Object for auxiliary data.
Definition: application_base.h:342
void initialize_triangulation(ParameterHandler ¶m)
Initilize and create the grid Determines whether reading from a grid file or creating new...