|
Flow123d
|
Class for representation of a vector of fields of the same physical quantity. More...
#include <field.hh>


Public Types | |
| typedef Field< spacedim, Value > | SubFieldType |
| typedef Field< spacedim, typename FieldValue< spacedim > ::Vector > | TransposedField |
Public Member Functions | |
| MultiField () | |
| IT::AbstractRecord & | get_input_type () override |
| void | set_limit_side (LimitSide side) override |
| bool | set_time (const TimeGovernor &time) override |
| void | set_mesh (const Mesh &mesh) override |
| void | copy_from (const FieldCommonBase &other) override |
| void | output (OutputTime *stream) override |
| bool | is_constant (Region reg) override |
| virtual | ~MultiField () |
| unsigned int | size () const |
| Number of subfields that compose the multi-field. More... | |
| void | init (const vector< string > &names) |
| void | set_complemented_vector_field (TransposedField &complemented) |
| SubFieldType & | operator[] (unsigned int idx) |
Public Member Functions inherited from FieldCommonBase | |
| TYPEDEF_ERR_INFO (EI_Time, double) | |
| TYPEDEF_ERR_INFO (EI_Field, std::string) | |
| DECLARE_INPUT_EXCEPTION (ExcNonascendingTime,<< "Non-ascending time: "<< EI_Time::val<< " for field "<< EI_Field::qval<< ".\n") | |
| DECLARE_INPUT_EXCEPTION (ExcMissingDomain,<< "Missing domain specification (region, r_id, or r_set) in fields descriptor:") | |
| DECLARE_EXCEPTION (ExcFieldMeshDifference,<< "Two copies of the field "<< EI_Field::qval<< "call set_mesh with different arguments.\n") | |
| FieldCommonBase & | name (const string &name) |
| FieldCommonBase & | just_copy () |
| FieldCommonBase & | desc (const string &desc) |
| FieldCommonBase & | input_default (const string &dflt) |
| FieldCommonBase & | units (const string &units) |
| Set basic units of the field. More... | |
| FieldCommonBase & | input_selection (const Input::Type::Selection *element_selection) |
| FieldCommonBase & | output_type (OutputTime::DiscreteSpace rt) |
| void | n_comp (unsigned int n_comp) |
| void | set_input_list (const Input::Array &list) |
| const std::string & | name () const |
| const std::string | desc () const |
| const std::string & | input_default () const |
| const std::string & | units () const |
| OutputTime::DiscreteSpace | output_type () const |
| bool | is_bc () const |
| unsigned int | n_comp () const |
| const Mesh * | mesh () const |
| bool | is_just_copy () const |
| double | time () const |
| void | mark_input_times (TimeMark::Type mark_type) |
| bool | changed () const |
| virtual | ~FieldCommonBase () |
Private Attributes | |
| std::vector< SubFieldType > | sub_fields_ |
| std::vector< std::string > | sub_names_ |
Additional Inherited Members | |
Static Public Member Functions inherited from FieldCommonBase | |
| static IT::Record | field_descriptor_record (const string &record_name) |
Protected Types inherited from FieldCommonBase | |
| enum | TimeStatus { TimeStatus::changed, TimeStatus::constant, TimeStatus::unknown } |
Protected Member Functions inherited from FieldCommonBase | |
| FieldCommonBase () | |
| FieldCommonBase (const FieldCommonBase &other) | |
| void | set_history_changed () |
Protected Attributes inherited from FieldCommonBase | |
| std::shared_ptr< SharedData > | shared_ |
| LimitSide | limit_side_ |
| TimeStatus | set_time_result_ |
Status of history. More... | |
| double | last_time_ = -numeric_limits<double>::infinity() |
| OutputTime::DiscreteSpace | type_of_output_data_ = OutputTime::ELEM_DATA |
| bool | is_copy_ =false |
| Flag field that has to be set as a copy of other field using copy_from method. More... | |
Static Protected Attributes inherited from FieldCommonBase | |
| static const unsigned int | history_length_limit_ =3 |
Class for representation of a vector of fields of the same physical quantity.
When solving a system of same equations with the number of components given at runtime (as in the case of transport equation for runtime given number of substances) we need means how to work with the whole vector of fields at once. This is the aim of this class. It provides the interface given by the parent class FieldCommonBase, but principally it is just a vector of Field<Value,dim> objects. The sub-fields or components of a MultiField are independent objects, how ever the setters propagates the values from the MultiFields to the individual fields. The only exception is the set_name method which in conjunction with MultiField::set_subfield_names can set unique name to each component.
Template parameters are used for every subfield.
TODO:
| typedef Field<spacedim, Value> MultiField< spacedim, Value >::SubFieldType |
| typedef Field<spacedim, typename FieldValue<spacedim>::Vector > MultiField< spacedim, Value >::TransposedField |
| MultiField< spacedim, Value >::MultiField | ( | ) |
Default constructor.
Definition at line 475 of file field_impl.hh.
|
inlinevirtual |
|
overridevirtual |
Polymorphic copy. Check correct type, allows copy of MultiField or Field.
Implements FieldCommonBase.
Definition at line 534 of file field_impl.hh.
|
overridevirtual |
Returns input type of particular field instance, this is usually static member input_type of the corresponding FieldBase class ( with same template parameters), however, for fields returning "Enum" we have to create whole unique Input::Type hierarchy for every instance since every such field use different Selection for initialization, even if all returns just unsigned int.
Implements FieldCommonBase.
Definition at line 499 of file field_impl.hh.
| void MultiField< spacedim, Value >::init | ( | const vector< string > & | names) |
Initialize MultiField to the number of components given by the size of names and use this vector to name individual components. Should be called after the setters derived from FieldCommonBase.
Definition at line 482 of file field_impl.hh.

|
overridevirtual |
Implementation of FieldCommonBase::is_constant().
Implements FieldCommonBase.
Definition at line 560 of file field_impl.hh.
|
inline |
|
overridevirtual |
Implementation of FieldCommonBase::output().
Implements FieldCommonBase.
Definition at line 548 of file field_impl.hh.
| void MultiField< spacedim, Value >::set_complemented_vector_field | ( | TransposedField & | complemented) |
Allows set Field<dim, Vector> that can be used for alternative initialization in "transposed" form.
|
overridevirtual |
Set side of limit when calling set_time with jump time. This method invalidate result of changed() so it should be called just before set_time. Can be different for different field copies.
Implements FieldCommonBase.
Definition at line 504 of file field_impl.hh.
|
overridevirtual |
We have to override the set_mesh method in order to call set_mesh method for subfields.
Reimplemented from FieldCommonBase.
Definition at line 526 of file field_impl.hh.

|
overridevirtual |
Abstract method to update field to the new time level. Implemented by in class template Field<...>.
Return true if the value of the field was changed on some region. The returned value is also stored in changed_during_set_time data member.
Implements FieldCommonBase.
Definition at line 512 of file field_impl.hh.
|
inline |
|
private |
|
private |
1.8.4