Flow123d  release_3.0.0-966-gb002c76
Public Member Functions | List of all members
Field< spacedim, Value >::FactoryBase Class Reference

#include <field.hh>

Inheritance diagram for Field< spacedim, Value >::FactoryBase:
Inheritance graph
[legend]

Public Member Functions

virtual FieldBasePtr create_field (Input::Record rec, const FieldCommon &field)
 
virtual bool is_active_field_descriptor (const Input::Record &in_rec, const std::string &input_name)
 

Detailed Description

template<int spacedim, class Value>
class Field< spacedim, Value >::FactoryBase

Factory class that creates an instance of FieldBase for field with name field_name based on data in field descriptor rec.

Default implementation in method create_field just reads key given by field_name and creates instance using FieldBase<...>::function_factory. Function should return empty SharedField (that is shared_ptr to FieldBase).

Implementation of these descendants is necessary: 1) for backward compatibility with old BCD input files 2) for setting pressure values are piezometric head values Note for future: We pass through parameter field information about field that holds the factory which are necessary for interpreting user input and create particular field instance. It would be clearer to pass these information when the factory is assigned to a field. Moreover some information may not be set to field at all but directly passed to the factory.

Definition at line 113 of file field.hh.

Member Function Documentation

template<int spacedim, class Value >
Field< spacedim, Value >::FieldBasePtr Field< spacedim, Value >::FactoryBase::create_field ( Input::Record  rec,
const FieldCommon field 
)
virtual

Default method that creates an instance of FieldBase for field.

Reads key given by field_name and creates the field instance using FieldBase<...>::function_factory.

Reimplemented in MultiField< spacedim, Value >::MultiFieldFactory, and FieldAddPotential< spacedim, Value >::FieldFactory.

Definition at line 541 of file field.impl.hh.

template<int spacedim, class Value >
bool Field< spacedim, Value >::FactoryBase::is_active_field_descriptor ( const Input::Record in_rec,
const std::string &  input_name 
)
virtual

Check if Input::Record accessor contains data of field given by input_name.

Returns true when ever the method create_field returns non-null pointer, otherwise returns false.

Reimplemented in MultiField< spacedim, Value >::MultiFieldFactory, and FieldAddPotential< spacedim, Value >::FieldFactory.

Definition at line 553 of file field.impl.hh.


The documentation for this class was generated from the following files: