21 #ifndef _FUEL_CELL_APPLICATION_CORE_APPLICATION_DATA_H_
22 #define _FUEL_CELL_APPLICATION_CORE_APPLICATION_DATA_H_
24 #include <deal.II/lac/vector_memory.h>
25 #include <deal.II/lac/block_vector.h>
26 #include <deal.II/base/parameter_handler.h>
36 using namespace dealii;
40 namespace ApplicationCore
105 void declare_parameters(ParameterHandler& param)
const;
110 void initialize(ParameterHandler& param);
116 void enter_flag(std::string name,
122 void enter(std::string name,
128 void enter(std::string name,
134 void enter(std::string name,
135 const std::vector<double>& v);
140 void enter(std::string name,
141 const std::vector< std::vector<double> >& v);
146 void erase_flag(std::string name);
151 void erase_scalar(std::string name);
156 void erase_vector(std::string name);
161 void erase_std_vector(std::string name);
166 void erase_std_vector_of_std_vectors(std::string name);
173 bool flag_exists(
const std::string& name)
const;
178 bool flag(std::string name)
const;
184 const double* scalar(std::string name)
const;
190 const FEVector* vector(std::string name)
const;
196 const std::vector<double>* std_vector(std::string name)
const;
202 const std::vector< std::vector<double> >* std_vector_std_vector(std::string name)
const;
228 return this->lin_solver;
236 return this->nonlin_solver;
244 return this->refinement_solver;
252 if (name.compare(
"UMFPACK") == 0)
254 else if ( name.compare(
"CG") == 0 )
256 else if ( name.compare(
"ILU-GMRES") == 0 )
258 else if ( name.compare(
"MUMPS") == 0 )
260 else if ( name.compare(
"Bicgstab") == 0)
263 throw(ExcNotFound(
"linear_solver", name));
271 if (name.compare(
"None") == 0)
273 else if ( name.compare(
"NewtonBasic") == 0 )
275 else if ( name.compare(
"Newton3pp") == 0 )
277 else if( name.compare(
"NewtonLineSearch") == 0)
279 else if ( name.compare(
"Picard") == 0 )
282 throw(ExcNotFound(
"nonlinear_solver", name));
290 if (name.compare(
"AdaptiveRefinement") == 0)
293 throw(ExcNotFound(
"refinement_solver", name));
302 return "Newton iterate";
313 return "Newton residual";
356 <<
"A " << arg1 <<
" with name " << arg2 <<
" was not stored in this data object");
scalar_map named_scalars
A map linking names of data to actual scalars.
Definition: application_data.h:368
std::string get_solution_vector_name(FuelCell::ApplicationCore::NonLinearSolver in)
Function to return solution vector name in the FEVectors object.
Definition: application_data.h:299
GrowingVectorMemory< Vector< double > > vector_pool
VectorMemory object for simple vectors.
Definition: application_data.h:214
Here we handle general data of applications.
Definition: application_data.h:88
vector_map named_vectors
A map linking names of data to actual vectors.
Definition: application_data.h:373
Definition: system_management.h:150
std::map< std::string, const double * > scalar_map
The typedef for the map of scalars.
Definition: application_data.h:326
Definition: simulator_builder.h:58
std::string get_residual_vector_name(FuelCell::ApplicationCore::NonLinearSolver in)
Function to return the residual vector name in the FEVectors object.
Definition: application_data.h:310
FuelCell::ApplicationCore::LinearSolver get_linear_solver()
Function to return the linear solver type.
Definition: application_data.h:226
RefinementSolver
Enumeration class for refinement types.
Definition: application_data.h:61
std_vector_map named_std_vectors
A map linking names of data to actual std vectors.
Definition: application_data.h:378
void set_nonlinear_solver(const std::string name)
Function to set the type of non-linear solver.
Definition: application_data.h:269
std::map< std::string, std::map< int, double > > field_data
Map of field data with names corresponding to the physical meaning of data, which can be read from VT...
Definition: application_data.h:348
FuelCell::ApplicationCore::LinearSolver lin_solver
Definition: application_data.h:389
std::map< std::string, const std::vector< double > * > std_vector_map
The typedef for the map of std vectors.
Definition: application_data.h:337
FCSTLogStream log
Object used to output data to file and, if file attached recorded to a file as well.
DeclException2(VariableShouldExistForEquation, std::string, std::string,<< "The user-defined variable with name \""<< arg1<< "\" should be one of the solution variables for equation with name \""<< arg2<< "\"")
Exception thrown when a particular variable required by the equation class, does not exist in the use...
FuelCell::ApplicationCore::RefinementSolver refinement_solver
Definition: application_data.h:393
void set_linear_solver(const std::string name)
Function to set the type of linear solver.
Definition: application_data.h:250
std::map< std::string, const FEVector * > vector_map
The typedef for the map of vectors.
Definition: application_data.h:332
LinearSolver
Enumeration class for Linear solvers.
Definition: application_data.h:51
void set_refinement_solver(const std::string name)
Function to set the type of refinement.
Definition: application_data.h:288
FuelCell::ApplicationCore::RefinementSolver get_refinement_solver()
Function to return refinement type.
Definition: application_data.h:242
FuelCell::ApplicationCore::NonLinearSolver nonlin_solver
Definition: application_data.h:391
NonLinearSolver
Enumeration class for Non-linear solvers.
Definition: application_data.h:56
std::map< std::string, const std::vector< std::vector< double > > * > std_vector_std_vector_map
The typedef for the map of std vectors of std vectors.
Definition: application_data.h:342
GrowingVectorMemory< FEVector > block_vector_pool
VectorMemory object for block vectors.
Definition: application_data.h:221
FuelCell::ApplicationCore::NonLinearSolver get_nonlinear_solver()
Function to return the non-linear solver type.
Definition: application_data.h:234
std::map< std::string, bool > flag_map
The typedef for the map of boolean flags.
Definition: application_data.h:321
BlockVector< double > FEVector
The vector class used by applications.
Definition: application_data.h:46
std_vector_std_vector_map named_std_vectors_of_std_vectors
A map linking names of data to actual std vectors of std vectors.
Definition: application_data.h:383
flag_map named_flags
A map linking names of data to actual boolean flags.
Definition: application_data.h:363