17 #ifndef _FUELCELLSHOP__LAYER__MICROSCALE_BASE_H
18 #define _FUELCELLSHOP__LAYER__MICROSCALE_BASE_H
25 namespace FuelCellShop
48 #include <deal.II/base/utilities.h>
49 #include <deal.II/base/parameter_handler.h>
59 #include <boost/shared_ptr.hpp>
63 namespace FuelCellShop
188 param.enter_subsection(
"MicroScale");
189 std::string micro_type_list;
194 iterator->second->declare_parameters(param);
195 micro_type_list += iterator->first +
"|";
198 micro_type_list = micro_type_list.substr(0, micro_type_list.size()-1);
199 param.declare_entry(
"Microscale type",
"IonomerAgglomerateAnalytical", Patterns::Selection(micro_type_list));
200 param.leave_subsection();
222 boost::shared_ptr<FuelCellShop::MicroScale::MicroScaleBase > pointer;
224 param.enter_subsection(
"MicroScale");
225 std::string concrete_name = param.get(
"Microscale type");
232 if (iterator->second)
234 pointer = iterator->second->create_replica();
244 FcstUtilities::log<<
"Concrete name in FuelCellShop::MicroScale::MicroScaleBase::create_MicroStructure does not exist"<<std::endl;
248 pointer->set_layer(layer);
249 pointer->initialize(param);
250 pointer->set_structure();
251 param.leave_subsection();
293 Assert(
false, ExcPureFunctionCalled());
294 return std::vector<double>(3, 0.0);
329 virtual void make_thread_safe(ParameterHandler ¶m,
unsigned int thread_index) = 0;
345 std::string msg =
"MultiScaleCl pointer passed to MicroScaleBase is NULL!";
346 throw std::runtime_error(msg);
369 virtual void initialize (ParameterHandler ¶m) =0;
virtual void print_properties()=0
Print out key micro-structural dimensions, defined by child.
virtual void declare_parameters(ParameterHandler ¶m) const =0
virtual void make_thread_safe(ParameterHandler ¶m, unsigned int thread_index)=0
std::map< std::string, MicroScaleBase * > _mapFactory
This object is used to store all objects of type MicroScaleBase.
Definition: micro_scale_base.h:394
VariableNames
The enumeration containing the names of some of the available FCST solution variables and their deriv...
Definition: system_management.h:63
Convenient storage object for SolutionVariables.
Definition: fcst_variables.h:457
static _mapFactory * get_mapFactory()
This member function is used to create an object of type MicroScaleBase.
Definition: micro_scale_base.h:405
virtual void set_solution(const std::map< VariableNames, SolutionVariable > &, const VariableNames &, const int &)=0
Function for setting the solution map(reactant concentration, phi_s, phi_m, etc.).
MicroScaleBase()
Definition: micro_scale_base.h:375
FuelCellShop::Layer::MultiScaleCL< deal_II_dimension > * layer
Definition: micro_scale_base.h:354
virtual bool has_derivatives()=0
Returns true if the class instance can calculate current density derivatives.
FCSTLogStream log
Object used to output data to file and, if file attached recorded to a file as well.
virtual boost::shared_ptr< MicroScaleBase > create_replica()=0
This member function is used to create an object of MicroScaleBase.
virtual void initialize(ParameterHandler ¶m)=0
void set_layer(FuelCellShop::Layer::MultiScaleCL< deal_II_dimension > *_layer)
Definition: micro_scale_base.h:338
virtual ~MicroScaleBase()
Destructor.
Definition: micro_scale_base.h:140
static boost::shared_ptr< FuelCellShop::MicroScale::MicroScaleBase > create_MicroStructure(ParameterHandler ¶m, FuelCellShop::Layer::MultiScaleCL< deal_II_dimension > *layer)
Function used to select the appropriate MicroScale type as specified in the ParameterHandler under li...
Definition: micro_scale_base.h:219
The base class for micro scale objects in OpenFCST.
Definition: micro_scale_base.h:134
virtual std::string get_name()=0
Return name of class instance, i.e.
virtual double aux_volume_fraction()=0
MicroScale object may have extra contribution to volume of layer, e.g.
virtual std::vector< double > compute_derivative_current()
Function to compute the derivative of the current density at the local operating conditions.
Definition: micro_scale_base.h:291
virtual SolutionMap compute_current()=0
Function used to compute the current density produced by the micro structure.
virtual void set_structure()=0
static void declare_MicroScale_parameters(ParameterHandler ¶m)
Function used to declare all the data necessary in the parameter files for all MicroScale children...
Definition: micro_scale_base.h:186