Flow123d  3.9.0-960b954f9
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
FieldCommon Class Referenceabstract

Common abstract parent of all Field<...> classes. More...

#include <field_common.hh>

Inheritance diagram for FieldCommon:
Inheritance graph
[legend]
Collaboration diagram for FieldCommon:
Collaboration graph
[legend]

Classes

struct  MessageData
 Store data of one initialization message. More...
 
struct  SharedData
 

Public Member Functions

 TYPEDEF_ERR_INFO (EI_Time, double)
 
 TYPEDEF_ERR_INFO (EI_Field, std::string)
 
 TYPEDEF_ERR_INFO (EI_FieldInputName, std::string)
 
 TYPEDEF_ERR_INFO (EI_FieldName, std::string)
 
 TYPEDEF_ERR_INFO (EI_RegId, unsigned int)
 
 TYPEDEF_ERR_INFO (EI_RegLabel, 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 or r_id) in the field descriptor:")
 
 DECLARE_EXCEPTION (ExcFieldMeshDifference,<< "Two copies of the field "<< EI_Field::qval<< "call set_mesh with different arguments.\n")
 
 DECLARE_INPUT_EXCEPTION (ExcMissingFieldValue,<< "Missing value of the input field "<< EI_FieldInputName::qval<< " ("<< EI_FieldName::qval<< ") on region ID: "<< EI_RegId::val<< " label: "<< EI_RegLabel::qval<< ".\n")
 
FieldCommonname (const string &name)
 
FieldCommondescription (const string &description)
 
FieldCommoninput_default (const string &input_default)
 
FieldCommonunits (const UnitSI &units)
 Set basic units of the field. More...
 
FieldCommonset_limits (double min, double max=std::numeric_limits< double >::max())
 
FieldCommoninput_selection (Input::Type::Selection element_selection)
 
FieldCommonoutput_type (OutputTime::DiscreteSpace rt)
 
FieldCommonflags (FieldFlag::Flags::Mask mask)
 
FieldCommonflags_add (FieldFlag::Flags::Mask mask)
 
void set_components (const std::vector< string > &names)
 
virtual void set_mesh (const Mesh &mesh)=0
 
virtual void set_input_list (const Input::Array &list, const TimeGovernor &tg)=0
 
const std::string & input_name () const
 
const std::string & name () const
 
const std::string description () const
 
const std::string & input_default () const
 
const UnitSIunits () const
 
std::pair< double, double > limits () const
 
OutputTime::DiscreteSpace get_output_type () const
 
bool is_bc () const
 
unsigned int n_comp () const
 
std::string full_comp_name (unsigned int i_comp) const
 
const Meshmesh () const
 
FieldFlag::Flagsflags ()
 
FieldFlag::Flags get_flags () const
 
double time () const
 
bool is_jump_time ()
 
unsigned int input_list_size () const
 
virtual bool is_constant (Region reg)=0
 
virtual FieldResult field_result (RegionSet region_set) const =0
 Indicates special field states. More...
 
virtual std::string get_value_attribute () const =0
 
bool changed () const
 
virtual IT::Instance get_input_type ()=0
 
virtual IT::Array get_multifield_input_type ()=0
 
void mark_input_times (const TimeGovernor &tg)
 
virtual bool set_time (const TimeStep &time, LimitSide limit_side)=0
 
virtual void copy_from (const FieldCommon &other)=0
 
virtual void field_output (std::shared_ptr< OutputTime > stream, OutputTime::DiscreteSpace type)=0
 
virtual void observe_output (std::shared_ptr< Observe > observe)=0
 
virtual std::vector< const FieldCommon * > set_dependency (FieldSet &field_set, unsigned int i_reg) const =0
 
void set_component_index (unsigned int idx)
 
bool is_multifield () const
 
virtual void cache_reallocate (const ElementCacheMap &cache_map, unsigned int region_idx) const =0
 
virtual void cache_update (ElementCacheMap &cache_map, unsigned int region_patch_idx) const =0
 
virtual FieldCommonget_component (FMT_UNUSED unsigned int idx)
 
virtual FieldValueCache< double > * value_cache ()=0
 
virtual const FieldValueCache< double > * value_cache () const =0
 
virtual void set_output_data_cache (FMT_UNUSED OutputTime::DiscreteSpace space_type, FMT_UNUSED std::shared_ptr< OutputTime > stream)
 Create and set shared_ptr to ElementDataCache. Used only in descendant Field<>. More...
 
virtual void fill_data_value (FMT_UNUSED const std::vector< int > &offsets)
 Fill data to ElementDataCache on given patch. More...
 
virtual ~FieldCommon ()
 
void set_time_result_changed ()
 Manually mark flag that the field has been changed. More...
 

Static Public Member Functions

static IT::Record field_descriptor_record (const string &record_name)
 
static const std::string field_descriptor_record_description (const string &record_name)
 
static bool print_message_table (ostream &stream, std::string equation_name)
 

Public Attributes

std::vector< uintshape_
 

Protected Types

enum  TimeStatus { TimeStatus::changed, TimeStatus::constant, TimeStatus::changed_forced, TimeStatus::unknown }
 

Protected Member Functions

 FieldCommon ()
 
 FieldCommon (const FieldCommon &other)
 
void set_history_changed ()
 
void set_shape (uint n_rows, uint n_cols)
 

Protected Attributes

std::string name_
 
std::shared_ptr< SharedDatashared_
 
TimeStatus set_time_result_
 
double last_time_ = -numeric_limits<double>::infinity()
 
LimitSide last_limit_side_ = LimitSide::left
 
bool is_jump_time_
 
OutputTime::DiscreteSpace default_output_data_ = OutputTime::ELEM_DATA
 
unsigned int component_index_
 
bool multifield_
 
FieldFlag::Flags flags_ = FieldFlag::declare_input & FieldFlag::equation_input & FieldFlag::allow_output
 Field flags. Default setting is "an equation input field, that can read from user input, and can be written to output". More...
 

Static Protected Attributes

static const unsigned int history_length_limit_ =3
 
static std::vector< MessageDatamessages_data_ = std::vector<FieldCommon::MessageData>()
 Vector of data of initialization messages. More...
 

Friends

std::ostream & operator<< (std::ostream &stream, const FieldCommon &field)
 

Detailed Description

Common abstract parent of all Field<...> classes.

We need common ancestor in order to keep a list of all fields in one EqData object and allow collective operations like set_time or init_from_input.

Definition at line 76 of file field_common.hh.

Member Enumeration Documentation

◆ TimeStatus

enum FieldCommon::TimeStatus
strongprotected

Result of last set time method

Enumerator
changed 
constant 
changed_forced 
unknown 

Definition at line 662 of file field_common.hh.

Constructor & Destructor Documentation

◆ ~FieldCommon()

FieldCommon::~FieldCommon ( )
virtual

Virtual destructor.

Definition at line 119 of file field_common.cc.

◆ FieldCommon() [1/2]

FieldCommon::FieldCommon ( )
protected

Private default constructor. Should be used only through Field<...>

Definition at line 31 of file field_common.cc.

◆ FieldCommon() [2/2]

FieldCommon::FieldCommon ( const FieldCommon other)
protected

Private copy constructor. Should be used only through Field<...>

Definition at line 46 of file field_common.cc.

Member Function Documentation

◆ cache_reallocate()

virtual void FieldCommon::cache_reallocate ( const ElementCacheMap cache_map,
unsigned int  region_idx 
) const
pure virtual

◆ cache_update()

virtual void FieldCommon::cache_update ( ElementCacheMap cache_map,
unsigned int  region_patch_idx 
) const
pure virtual

◆ changed()

bool FieldCommon::changed ( ) const
inline

Returns true if set_time_result_ is not TimeStatus::constant. Returns the same value as last set_time method.

Definition at line 363 of file field_common.hh.

Here is the caller graph for this function:

◆ copy_from()

virtual void FieldCommon::copy_from ( const FieldCommon other)
pure virtual

◆ DECLARE_EXCEPTION()

FieldCommon::DECLARE_EXCEPTION ( ExcFieldMeshDifference  ,
<< "Two copies of the field "<< EI_Field::qval<< "call set_mesh with different arguments.\n"   
)

◆ DECLARE_INPUT_EXCEPTION() [1/3]

FieldCommon::DECLARE_INPUT_EXCEPTION ( ExcMissingDomain  ,
<< "Missing domain specification (region or r_id) in the field descriptor:"   
)

◆ DECLARE_INPUT_EXCEPTION() [2/3]

FieldCommon::DECLARE_INPUT_EXCEPTION ( ExcMissingFieldValue  ,
<< "Missing value of the input field "<< EI_FieldInputName::qval<< " ("<< EI_FieldName::qval<< ") on region ID: "<< EI_RegId::val<< " label: "<< EI_RegLabel::qval<< ".\n"   
)

◆ DECLARE_INPUT_EXCEPTION() [3/3]

FieldCommon::DECLARE_INPUT_EXCEPTION ( ExcNonascendingTime  ,
<< "Non-ascending time: "<< EI_Time::val<< " for field "<< EI_Field::qval<< ".\n"   
)

◆ description() [1/2]

const std::string FieldCommon::description ( ) const
inline

Definition at line 248 of file field_common.hh.

◆ description() [2/2]

FieldCommon& FieldCommon::description ( const string &  description)
inline

Set description of the field, used for description of corresponding key in documentation.

Definition at line 127 of file field_common.hh.

Here is the caller graph for this function:

◆ field_descriptor_record()

IT::Record FieldCommon::field_descriptor_record ( const string &  record_name)
static

Common part of the field descriptor. To get finished record one has to add keys for individual fields. This is done automatically using FieldSet::get_input_type().

Definition at line 60 of file field_common.cc.

Here is the caller graph for this function:

◆ field_descriptor_record_description()

const std::string FieldCommon::field_descriptor_record_description ( const string &  record_name)
static

Create description of field descriptor record.

Definition at line 73 of file field_common.cc.

Here is the caller graph for this function:

◆ field_output()

virtual void FieldCommon::field_output ( std::shared_ptr< OutputTime stream,
OutputTime::DiscreteSpace  type 
)
pure virtual

◆ field_result()

virtual FieldResult FieldCommon::field_result ( RegionSet  region_set) const
pure virtual

Indicates special field states.

Extension of the previous method. Return possible values from the enum FieldResult, see description there. The initial state is field_none, if the field is correctly set on all regions of the region_set given as parameter we return state field_other or even more particular result.

Special field values spatially constant. Could allow optimization of tensor multiplication and tensor or vector addition. field_result_ should be set in constructor and in set_time method of particular Field implementation. We return value result_none, if the field is not initialized on the region of the given element accessor elm. Other possible results are: result_zeros, result_eye, result_ones, result_constant, result_other see FieldResult for explanation.

Multifield return most particular value that holds for all its subfields.

Implemented in Field< spacedim, Value >, Field< spacedim, FieldValue< 3 >::VectorFixed >, Field< 3, FieldValue< 3 >::Scalar >, Field< 3, FieldValue< 3 >::VectorFixed >, Field< spacedim, FieldValue< 3 >::Scalar >, Field< spacedim, FieldValue< 3 >::Enum >, Field< 3, FieldValue< 3 >::TensorFixed >, Field< spacedim, FieldValue< 3 >::TensorFixed >, MultiField< spacedim, Value >, MultiField< 3, FieldValue< 3 >::Scalar >, MultiField< 3, FieldValue< 3 >::VectorFixed >, MultiField< spacedim, FieldValue< 3 >::Enum >, MultiField< spacedim, FieldValue< 3 >::Scalar >, MultiField< 3, FieldValue< 3 >::TensorFixed >, and MultiField< 3, FieldValue< 3 >::Enum >.

Here is the caller graph for this function:

◆ fill_data_value()

virtual void FieldCommon::fill_data_value ( FMT_UNUSED const std::vector< int > &  offsets)
inlinevirtual

Fill data to ElementDataCache on given patch.

Definition at line 509 of file field_common.hh.

◆ flags() [1/2]

FieldFlag::Flags& FieldCommon::flags ( )
inline

Definition at line 289 of file field_common.hh.

Here is the caller graph for this function:

◆ flags() [2/2]

FieldCommon& FieldCommon::flags ( FieldFlag::Flags::Mask  mask)
inline

Set given mask to the field flags, ignoring default setting. Default setting is declare_input & equation_input & allow_output.

Definition at line 191 of file field_common.hh.

Here is the caller graph for this function:

◆ flags_add()

FieldCommon& FieldCommon::flags_add ( FieldFlag::Flags::Mask  mask)
inline

Add given mask to the field flags.

Definition at line 197 of file field_common.hh.

Here is the caller graph for this function:

◆ full_comp_name()

std::string FieldCommon::full_comp_name ( unsigned int  i_comp) const
inline

Returns full name of subfield on i_comp position created from component name and field name.

If component name is empty returns only field name.

Definition at line 279 of file field_common.hh.

Here is the caller graph for this function:

◆ get_component()

virtual FieldCommon* FieldCommon::get_component ( FMT_UNUSED unsigned int  idx)
inlinevirtual

Returns pointer to this (Field) or the sub-field component (MultiField).

Definition at line 486 of file field_common.hh.

◆ get_flags()

FieldFlag::Flags FieldCommon::get_flags ( ) const
inline

Definition at line 292 of file field_common.hh.

Here is the caller graph for this function:

◆ get_input_type()

virtual IT::Instance FieldCommon::get_input_type ( )
pure virtual

◆ get_multifield_input_type()

virtual IT::Array FieldCommon::get_multifield_input_type ( )
pure virtual

◆ get_output_type()

OutputTime::DiscreteSpace FieldCommon::get_output_type ( ) const
inline

Definition at line 265 of file field_common.hh.

Here is the caller graph for this function:

◆ get_value_attribute()

virtual std::string FieldCommon::get_value_attribute ( ) const
pure virtual

Return specification of the field value type in form of the string: [ <element type>, NRows, NCols]

Result is valid JSON (and/or flow style YAML). For multifields not implemented.

Implemented in Field< spacedim, Value >, MultiField< spacedim, Value >, FieldCoords, and FieldDepth.

Here is the caller graph for this function:

◆ input_default() [1/2]

const std::string& FieldCommon::input_default ( ) const
inline

Definition at line 251 of file field_common.hh.

◆ input_default() [2/2]

FieldCommon& FieldCommon::input_default ( const string &  input_default)
inline

Set default value for the field's key from which the default constant valued field will be constructed.

During the first call of the set_time method, we check that the field is defined on all regions. On regions where it is not set yet, we use given dflt string to get particular instance of FieldBase<> (see check_initialized_region_fields_). The default string is interpreted in the same way as if it appears in the input file as the value of the field. In particular it can be whole record with TYPE of the field etc. Most common choice is however mere constant.

Definition at line 139 of file field_common.hh.

Here is the caller graph for this function:

◆ input_list_size()

unsigned int FieldCommon::input_list_size ( ) const
inline

Returns number of field descriptors containing the field.

Definition at line 313 of file field_common.hh.

◆ input_name()

const std::string& FieldCommon::input_name ( ) const
inline

Getters.

Definition at line 242 of file field_common.hh.

Here is the caller graph for this function:

◆ input_selection()

FieldCommon& FieldCommon::input_selection ( Input::Type::Selection  element_selection)
inline

For the fields returning "Enum", we have to pass the Input::Type::Selection object to the field implementations.

We must save raw pointer since selection may not be yet initialized (during static initialization phase).

Definition at line 171 of file field_common.hh.

Here is the caller graph for this function:

◆ is_bc()

bool FieldCommon::is_bc ( ) const
inline

Definition at line 268 of file field_common.hh.

Here is the caller graph for this function:

◆ is_constant()

virtual bool FieldCommon::is_constant ( Region  reg)
pure virtual

If the field on given region reg exists and is of type FieldConstant<...> the method method returns true otherwise it returns false. Then one can call ElementAccessor<spacedim>(mesh(), reg ) to construct an ElementAccessor elm pointing to "virtual" element on which Field::value returns constant value. Unlike the Field<>::field_result method, this one provides no value, so it have common header (arguments, return type) and could be part of FieldCommon and FieldSet which is useful in some applications.

TODO:Current implementation use virtual functions and can be prohibitively slow if called for every element. If this becomes necessary it is possible to incorporate such test into set_time method and in this method just return precomputed result.

Implemented in Field< spacedim, Value >, Field< spacedim, FieldValue< 3 >::VectorFixed >, Field< 3, FieldValue< 3 >::Scalar >, Field< 3, FieldValue< 3 >::VectorFixed >, Field< spacedim, FieldValue< 3 >::Scalar >, Field< spacedim, FieldValue< 3 >::Enum >, Field< 3, FieldValue< 3 >::TensorFixed >, Field< spacedim, FieldValue< 3 >::TensorFixed >, MultiField< spacedim, Value >, MultiField< 3, FieldValue< 3 >::Scalar >, MultiField< 3, FieldValue< 3 >::VectorFixed >, MultiField< spacedim, FieldValue< 3 >::Enum >, MultiField< spacedim, FieldValue< 3 >::Scalar >, MultiField< 3, FieldValue< 3 >::TensorFixed >, and MultiField< 3, FieldValue< 3 >::Enum >.

Here is the caller graph for this function:

◆ is_jump_time()

bool FieldCommon::is_jump_time ( )
inline

Returns true if the field change algorithm for the current time set through the set_time method. This happen for all times in the field descriptors on the input of this particular field.

Definition at line 306 of file field_common.hh.

Here is the caller graph for this function:

◆ is_multifield()

bool FieldCommon::is_multifield ( ) const
inline

Return multifield_ flag. TODO: temporary solution

Definition at line 467 of file field_common.hh.

Here is the caller graph for this function:

◆ limits()

std::pair<double, double> FieldCommon::limits ( ) const
inline

Definition at line 260 of file field_common.hh.

Here is the caller graph for this function:

◆ mark_input_times()

void FieldCommon::mark_input_times ( const TimeGovernor tg)

Pass through the input array input_list_, collect all times where the field could change and put appropriate time marks into global TimeMarks object. Introduced time marks have both given mark_type and type_input() type.

Further development:

  • we have to distinguish "jump" times and "smooth" times

Definition at line 82 of file field_common.cc.

Here is the caller graph for this function:

◆ mesh()

const Mesh* FieldCommon::mesh ( ) const
inline

Definition at line 286 of file field_common.hh.

Here is the caller graph for this function:

◆ n_comp()

unsigned int FieldCommon::n_comp ( ) const
inline

Definition at line 271 of file field_common.hh.

Here is the caller graph for this function:

◆ name() [1/2]

const std::string& FieldCommon::name ( ) const
inline

Definition at line 245 of file field_common.hh.

Here is the caller graph for this function:

◆ name() [2/2]

FieldCommon& FieldCommon::name ( const string &  name)
inline

Set name of the field. In fact there are two attributes set by this method.

The first is name used to identify the field as part of a FieldSet or MultiField objects. This name is permanent and can be set only by this method. Can be accessed by name() method. This name is also used at output.

The second is input_name_ that determines appropriate key name in the input field descriptor. This name is also set by this method, but is stored in the internal shared space which is overwritten during call of copy_from method or assignment operator. Can be accessed by input_name() mathod.

Definition at line 120 of file field_common.hh.

Here is the caller graph for this function:

◆ observe_output()

virtual void FieldCommon::observe_output ( std::shared_ptr< Observe observe)
pure virtual

◆ output_type()

FieldCommon& FieldCommon::output_type ( OutputTime::DiscreteSpace  rt)
inline

Output discrete space used in the output() method. Can be different for different field copies. one can choose between: data constant on elements, linear data given in nodes, and discontinuous linear data.

If not set explicitly by this method, the default value is OutputTime::ELEM_DATA

Definition at line 184 of file field_common.hh.

Here is the caller graph for this function:

◆ print_message_table()

bool FieldCommon::print_message_table ( ostream &  stream,
std::string  equation_name 
)
static

Print stored messages to table.

Return true if messages_data_ vector is nonempty and clear its.

Definition at line 96 of file field_common.cc.

Here is the caller graph for this function:

◆ set_component_index()

void FieldCommon::set_component_index ( unsigned int  idx)
inline

Sets component_index_

Definition at line 458 of file field_common.hh.

Here is the caller graph for this function:

◆ set_components()

void FieldCommon::set_components ( const std::vector< string > &  names)
inline

Set vector of component names. Set number of components for run-time sized vectors. This is used latter when we construct objects derived from FieldBase<...>.

n_comp_ is constant zero for fixed values, this zero is set by Field<...> constructors

Definition at line 207 of file field_common.hh.

Here is the caller graph for this function:

◆ set_dependency()

virtual std::vector<const FieldCommon *> FieldCommon::set_dependency ( FieldSet field_set,
unsigned int  i_reg 
) const
pure virtual

◆ set_history_changed()

void FieldCommon::set_history_changed ( )
inlineprotected

Invalidate last time in order to force set_time method update region_fields_.

Definition at line 552 of file field_common.hh.

◆ set_input_list()

virtual void FieldCommon::set_input_list ( const Input::Array list,
const TimeGovernor tg 
)
pure virtual

Set the data list from which field will read its input. It is list of "field descriptors". When reading from the input list we consider only field descriptors containing key of named by the field name. These field descriptors has to have times forming ascending sequence.

The list is used by set_time method to set field on individual regions to actual FieldBase descendants.

Implemented in Field< spacedim, Value >, Field< spacedim, FieldValue< 3 >::VectorFixed >, Field< 3, FieldValue< 3 >::Scalar >, Field< 3, FieldValue< 3 >::VectorFixed >, Field< spacedim, FieldValue< 3 >::Scalar >, Field< spacedim, FieldValue< 3 >::Enum >, Field< 3, FieldValue< 3 >::TensorFixed >, Field< spacedim, FieldValue< 3 >::TensorFixed >, MultiField< spacedim, Value >, MultiField< 3, FieldValue< 3 >::Scalar >, MultiField< 3, FieldValue< 3 >::VectorFixed >, MultiField< spacedim, FieldValue< 3 >::Enum >, MultiField< spacedim, FieldValue< 3 >::Scalar >, MultiField< 3, FieldValue< 3 >::TensorFixed >, and MultiField< 3, FieldValue< 3 >::Enum >.

Here is the caller graph for this function:

◆ set_limits()

FieldCommon& FieldCommon::set_limits ( double  min,
double  max = std::numeric_limits<double>::max() 
)
inline

Set limits of value of the field.

Definition at line 158 of file field_common.hh.

Here is the caller graph for this function:

◆ set_mesh()

virtual void FieldCommon::set_mesh ( const Mesh mesh)
pure virtual

◆ set_output_data_cache()

virtual void FieldCommon::set_output_data_cache ( FMT_UNUSED OutputTime::DiscreteSpace  space_type,
FMT_UNUSED std::shared_ptr< OutputTime stream 
)
inlinevirtual

Create and set shared_ptr to ElementDataCache. Used only in descendant Field<>.

Definition at line 503 of file field_common.hh.

◆ set_shape()

void FieldCommon::set_shape ( uint  n_rows,
uint  n_cols 
)
inlineprotected

Definition at line 557 of file field_common.hh.

Here is the caller graph for this function:

◆ set_time()

virtual bool FieldCommon::set_time ( const TimeStep time,
LimitSide  limit_side 
)
pure virtual

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.

Default values helps when creating steady field. Note that default TimeGovernor constructor set time to 0.0.

Different field copies can be set to different times.

TODO: update following: Set side of limit when calling set_time with jump time, i.e. time where the field change implementation on some region. Wee assume that implementations prescribe only smooth fields. This method invalidate result of changed() so it should be called just before set_time. Can be different for different field copies.

Implemented in Field< spacedim, Value >, Field< spacedim, FieldValue< 3 >::VectorFixed >, Field< 3, FieldValue< 3 >::Scalar >, Field< 3, FieldValue< 3 >::VectorFixed >, Field< spacedim, FieldValue< 3 >::Scalar >, Field< spacedim, FieldValue< 3 >::Enum >, Field< 3, FieldValue< 3 >::TensorFixed >, Field< spacedim, FieldValue< 3 >::TensorFixed >, MultiField< spacedim, Value >, MultiField< 3, FieldValue< 3 >::Scalar >, MultiField< 3, FieldValue< 3 >::VectorFixed >, MultiField< spacedim, FieldValue< 3 >::Enum >, MultiField< spacedim, FieldValue< 3 >::Scalar >, MultiField< 3, FieldValue< 3 >::TensorFixed >, and MultiField< 3, FieldValue< 3 >::Enum >.

Here is the caller graph for this function:

◆ set_time_result_changed()

void FieldCommon::set_time_result_changed ( )
inline

Manually mark flag that the field has been changed.

Definition at line 734 of file field_common.hh.

Here is the caller graph for this function:

◆ time()

double FieldCommon::time ( ) const
inline

Returns time set by last call of set_time method. Can be different for different field copies.

Definition at line 299 of file field_common.hh.

Here is the caller graph for this function:

◆ TYPEDEF_ERR_INFO() [1/6]

FieldCommon::TYPEDEF_ERR_INFO ( EI_Field  ,
std::string   
)

◆ TYPEDEF_ERR_INFO() [2/6]

FieldCommon::TYPEDEF_ERR_INFO ( EI_FieldInputName  ,
std::string   
)

◆ TYPEDEF_ERR_INFO() [3/6]

FieldCommon::TYPEDEF_ERR_INFO ( EI_FieldName  ,
std::string   
)

◆ TYPEDEF_ERR_INFO() [4/6]

FieldCommon::TYPEDEF_ERR_INFO ( EI_RegId  ,
unsigned int   
)

◆ TYPEDEF_ERR_INFO() [5/6]

FieldCommon::TYPEDEF_ERR_INFO ( EI_RegLabel  ,
std::string   
)

◆ TYPEDEF_ERR_INFO() [6/6]

FieldCommon::TYPEDEF_ERR_INFO ( EI_Time  ,
double   
)

◆ units() [1/2]

const UnitSI& FieldCommon::units ( ) const
inline

Definition at line 254 of file field_common.hh.

◆ units() [2/2]

FieldCommon& FieldCommon::units ( const UnitSI units)
inline

Set basic units of the field.

Currently, we use it only during output and we represents units just by a string.

TODO: Particular class for representing and conversion of various units would be more appropriate. This can allow specification of the units on the inptu, automatic conversion and the same on the output. Possibly this allow using Boost::Units library, however, it seems to introduce lot of boilerplate code. But can increase correctness of the calculations.

Definition at line 152 of file field_common.hh.

Here is the caller graph for this function:

◆ value_cache() [1/2]

virtual const FieldValueCache<double>* FieldCommon::value_cache ( ) const
pure virtual

◆ value_cache() [2/2]

virtual FieldValueCache<double>* FieldCommon::value_cache ( )
pure virtual

Returns FieldValueCache if element_type of field is double or nullptr for other element_types.

Implemented in Field< spacedim, Value >, Field< spacedim, FieldValue< 3 >::VectorFixed >, Field< 3, FieldValue< 3 >::Scalar >, Field< 3, FieldValue< 3 >::VectorFixed >, Field< spacedim, FieldValue< 3 >::Scalar >, Field< spacedim, FieldValue< 3 >::Enum >, Field< 3, FieldValue< 3 >::TensorFixed >, Field< spacedim, FieldValue< 3 >::TensorFixed >, MultiField< spacedim, Value >, MultiField< 3, FieldValue< 3 >::Scalar >, MultiField< 3, FieldValue< 3 >::VectorFixed >, MultiField< spacedim, FieldValue< 3 >::Enum >, MultiField< spacedim, FieldValue< 3 >::Scalar >, MultiField< 3, FieldValue< 3 >::TensorFixed >, MultiField< 3, FieldValue< 3 >::Enum >, FieldCoords, FieldDepth, Field< spacedim, FieldValue< 3 >::VectorFixed >, Field< 3, FieldValue< 3 >::Scalar >, Field< 3, FieldValue< 3 >::VectorFixed >, Field< spacedim, FieldValue< 3 >::Scalar >, Field< spacedim, FieldValue< 3 >::Enum >, Field< 3, FieldValue< 3 >::TensorFixed >, Field< spacedim, FieldValue< 3 >::TensorFixed >, MultiField< 3, FieldValue< 3 >::Scalar >, MultiField< 3, FieldValue< 3 >::VectorFixed >, MultiField< spacedim, FieldValue< 3 >::Enum >, MultiField< spacedim, FieldValue< 3 >::Scalar >, MultiField< 3, FieldValue< 3 >::TensorFixed >, MultiField< 3, FieldValue< 3 >::Enum >, Field< spacedim, FieldValue< 3 >::VectorFixed >, Field< 3, FieldValue< 3 >::Scalar >, Field< 3, FieldValue< 3 >::VectorFixed >, Field< spacedim, FieldValue< 3 >::Scalar >, Field< spacedim, FieldValue< 3 >::Enum >, Field< 3, FieldValue< 3 >::TensorFixed >, Field< spacedim, FieldValue< 3 >::TensorFixed >, Field< spacedim, FieldValue< 3 >::VectorFixed >, Field< 3, FieldValue< 3 >::Scalar >, Field< 3, FieldValue< 3 >::VectorFixed >, Field< spacedim, FieldValue< 3 >::Scalar >, Field< spacedim, FieldValue< 3 >::Enum >, Field< 3, FieldValue< 3 >::TensorFixed >, Field< spacedim, FieldValue< 3 >::TensorFixed >, Field< spacedim, Value >, Field< spacedim, FieldValue< 3 >::VectorFixed >, Field< 3, FieldValue< 3 >::Scalar >, Field< 3, FieldValue< 3 >::VectorFixed >, Field< spacedim, FieldValue< 3 >::Scalar >, Field< spacedim, FieldValue< 3 >::Enum >, Field< 3, FieldValue< 3 >::TensorFixed >, Field< spacedim, FieldValue< 3 >::TensorFixed >, Field< spacedim, Value >, Field< spacedim, FieldValue< 3 >::VectorFixed >, Field< 3, FieldValue< 3 >::Scalar >, Field< 3, FieldValue< 3 >::VectorFixed >, Field< spacedim, FieldValue< 3 >::Scalar >, Field< spacedim, FieldValue< 3 >::Enum >, Field< 3, FieldValue< 3 >::TensorFixed >, and Field< spacedim, FieldValue< 3 >::TensorFixed >.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  stream,
const FieldCommon field 
)
friend

Stream output operator

Definition at line 719 of file field_common.hh.

Member Data Documentation

◆ component_index_

unsigned int FieldCommon::component_index_
protected

Specify if the field is part of a MultiField and which component it is

Definition at line 697 of file field_common.hh.

◆ default_output_data_

OutputTime::DiscreteSpace FieldCommon::default_output_data_ = OutputTime::ELEM_DATA
protected

Default output data type used in the output() method. Can be different for different field copies.

Definition at line 692 of file field_common.hh.

◆ flags_

Field flags. Default setting is "an equation input field, that can read from user input, and can be written to output".

Definition at line 711 of file field_common.hh.

◆ history_length_limit_

const unsigned int FieldCommon::history_length_limit_ =3
staticprotected

Maximum number of FieldBase objects we store per one region.

Definition at line 708 of file field_common.hh.

◆ is_jump_time_

bool FieldCommon::is_jump_time_
protected

Set to true by the set_time method the field algorithm change on any region. Accessible through the is_jump_time method.

Definition at line 687 of file field_common.hh.

◆ last_limit_side_

LimitSide FieldCommon::last_limit_side_ = LimitSide::left
protected

Definition at line 681 of file field_common.hh.

◆ last_time_

double FieldCommon::last_time_ = -numeric_limits<double>::infinity()
protected

Last set time. Can be different for different field copies. Store also time limit, since the field may be discontinuous.

Definition at line 680 of file field_common.hh.

◆ messages_data_

std::vector< FieldCommon::MessageData > FieldCommon::messages_data_ = std::vector<FieldCommon::MessageData>()
staticprotected

Vector of data of initialization messages.

Definition at line 714 of file field_common.hh.

◆ multifield_

bool FieldCommon::multifield_
protected

Flag determining if object is Multifield or Field. TODO: temporary solution, goal is to make these two classes to behave similarly

Definition at line 703 of file field_common.hh.

◆ name_

std::string FieldCommon::name_
protected

Name that identifies the field in the field_set. By default this is same as shared_->input_name_.

Definition at line 652 of file field_common.hh.

◆ set_time_result_

TimeStatus FieldCommon::set_time_result_
protected

Status of history.

Definition at line 674 of file field_common.hh.

◆ shape_

std::vector<uint> FieldCommon::shape_

Hold shape of Field.

Value is set in constructor of descendant class.

Definition at line 532 of file field_common.hh.

◆ shared_

std::shared_ptr<SharedData> FieldCommon::shared_
protected

Data shared among copies of the same input field.

Definition at line 657 of file field_common.hh.


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