Flow123d  master-f44eb46
Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Friends | List of all members
Field< spacedim, Value > Class Template Reference

Class template representing a field with values dependent on: point, element, and region. More...

#include <field.hh>

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

Classes

class  FactoryBase
 
struct  SharedData
 

Public Types

typedef FieldAlgorithmBase< spacedim, ValueFieldBaseType
 
typedef std::shared_ptr< FieldBaseTypeFieldBasePtr
 
typedef FieldAlgorithmBase< spacedim, Value >::Point Point
 
typedef Value ValueType
 

Public Member Functions

 Field ()
 
 Field (const string &name)
 
 Field (unsigned int component_index, string input_name, string name="")
 
 Field (const Field &other)
 
Fieldoperator= (const Field &other)
 
Value::return_type operator() (BulkPoint &p)
 Return appropriate value to BulkPoint in FieldValueCache. More...
 
Value::return_type operator() (SidePoint &p)
 Return appropriate value to EdgePoint in FieldValueCache. More...
 
IT::Instance get_input_type () override
 
IT::Array get_multifield_input_type () override
 
auto disable_where (const Field< spacedim, typename FieldValue< spacedim >::Enum > &control_field, const vector< FieldEnum > &value_list) -> Field &
 
void set_mesh (const Mesh &mesh) override
 
bool is_constant (Region reg) override
 
void set (FieldBasePtr field, double time, std::vector< std::string > region_set_names={"ALL"})
 
void set (const Input::AbstractRecord &a_rec, double time, std::vector< std::string > region_set_names={"ALL"})
 
bool set_time (const TimeStep &time, LimitSide limit_side) override
 
void copy_from (const FieldCommon &other) override
 
void field_output (std::shared_ptr< OutputTime > stream, OutputTime::DiscreteSpace type) override
 
std::shared_ptr< FieldFE< spacedim, Value > > get_field_fe ()
 
FieldResult field_result (RegionSet region_set) const override
 Indicates special field states. More...
 
std::string get_value_attribute () const override
 
void add_factory (std::shared_ptr< FactoryBase > factory)
 
void set_input_list (const Input::Array &list, const TimeGovernor &tg) override
 
void set_output_data_cache (OutputTime::DiscreteSpace space_type, std::shared_ptr< OutputTime > stream) override
 
void compute_field_data (OutputTime::DiscreteSpace space_type, std::shared_ptr< OutputTime > stream)
 
void cache_reallocate (const ElementCacheMap &cache_map, unsigned int region_idx) const override
 Implements FieldCommon::cache_allocate. More...
 
void cache_update (ElementCacheMap &cache_map, unsigned int region_patch_idx) const override
 Implements FieldCommon::cache_update. More...
 
FieldValueCache< double > * value_cache () override
 Implements FieldCommon::value_cache. More...
 
const FieldValueCache< double > * value_cache () const override
 Implements FieldCommon::value_cache. More...
 
std::vector< const FieldCommon * > set_dependency (unsigned int i_reg) const override
 
void fill_data_value (const std::vector< int > &offsets) override
 Implements FieldCommon::fill_data_value. More...
 
void fill_observe_value (std::shared_ptr< ElementDataCacheBase > output_cache_base, const std::vector< int > &offsets) override
 Implements FieldCommon::fill_observe_value. More...
 
FieldValueCache< double > * value_cache ()
 
FieldValueCache< double > * value_cache ()
 
const FieldValueCache< double > * value_cache () const
 
const FieldValueCache< double > * value_cache () const
 
- Public Member Functions inherited from FieldCommon
 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)
 
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
 
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
 
bool changed () const
 
void mark_input_times (const TimeGovernor &tg)
 
void set_component_index (unsigned int idx)
 
bool is_multifield () const
 
virtual FieldCommonget_component (FMT_UNUSED unsigned int idx)
 
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 void fill_observe_value (FMT_UNUSED std::shared_ptr< ElementDataCacheBase > output_cache_base, FMT_UNUSED const std::vector< int > &offsets)
 Fill data to ElementDataCache on given patch. More...
 
void set_default_fieldset (FieldSet &default_fs)
 
virtual ~FieldCommon ()
 
uint n_shape () const
 Return number of shape components. More...
 
void set_time_result_changed ()
 Manually mark flag that the field has been changed. More...
 

Static Public Attributes

static const unsigned int space_dim = spacedim
 

Protected Types

typedef pair< double, FieldBasePtrHistoryPoint
 Pair: time, pointer to FieldBase instance. More...
 
typedef boost::circular_buffer< HistoryPointRegionHistory
 Nearest history of one region. More...
 
typedef Field< spacedim, typename FieldValue< spacedim >::Enum > ControlField
 
- Protected Types inherited from FieldCommon
enum class  TimeStatus { changed , constant , changed_forced , unknown }
 

Protected Member Functions

Value::return_type operator[] (unsigned int i_cache_point) const
 Return item of value_cache_ given by i_cache_point. More...
 
void update_history (const TimeStep &time)
 
void check_initialized_region_fields_ ()
 
- Protected Member Functions inherited from FieldCommon
 FieldCommon ()
 
 FieldCommon (const FieldCommon &other)
 
void set_history_changed ()
 
void set_shape (uint n_rows, uint n_cols)
 

Protected Attributes

std::shared_ptr< SharedDatadata_
 
std::shared_ptr< ControlFieldno_check_control_field_
 
std::vector< FieldBasePtrregion_fields_
 
std::vector< std::shared_ptr< FactoryBase > > factories_
 
FieldValueCache< typename Value::element_type > value_cache_
 
std::shared_ptr< ElementDataCache< typename Value::element_type > > output_data_cache_
 ElementDataCache used during field output, object is shared with OutputTime. More...
 
- Protected Attributes inherited from FieldCommon
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...
 

Friends

template<int dim, class Val >
class MultiField
 
template<typename CALLABLE , typename TUPLE , int INDEX>
struct detail::model_cache_item
 

Additional Inherited Members

- Static Public Member Functions inherited from FieldCommon
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 inherited from FieldCommon
std::vector< uintshape_
 
- Static Protected Attributes inherited from FieldCommon
static const unsigned int history_length_limit_ =3
 
static std::vector< MessageDatamessages_data_ = std::vector<FieldCommon::MessageData>()
 Vector of data of initialization messages. More...
 

Detailed Description

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

Class template representing a field with values dependent on: point, element, and region.

By "field" we mean a mapping of a a pair (Point, Time) to a Value, where Point is from spacedim dimensional ambient space, Time is real number (set by set_time method), and Value type representing range of the field, which can be: real scalar, integer scalar (a discrete value), real vector of fixed (compile time) size, real vector of runtime size, or a matrix of fixed dimensions. Extensions to vectors or matrices of integers, or to variable tensors are possible. For vector and matrix values we use classes provided by Armadillo library for linear algebra. The Value template parameter should FieldValue<> template, usual choices are: FieldValue<spacedim>::Scalar, FieldValue<spacedim>::Integer, FieldValue<spacedim>::Enum, FieldValue<spacedim>::VectorFixed, FieldValue<spacedim>::TensorFixed.

This class assign particular fields (instances of descendants of FiledBase) to the regions. It keeps a table of pointers to fields for every possible bulk region index (very same functionality, but for boundary regions is provided by BCField class). This class has interface very similar to FiledBase, however key methods value, and value_list are not virtual in this class by contrast these methods are inlined to minimize overhead for simplest fields like FieldConstant.

TODO: currently it works only for spacedim==3 since we have only mesh in 3D ambient space.

Definition at line 92 of file field.hh.

Member Typedef Documentation

◆ ControlField

template<int spacedim, class Value >
typedef Field<spacedim, typename FieldValue<spacedim>::Enum > Field< spacedim, Value >::ControlField
protected

If this pointer is set, turn off check of initialization in the set_time method on the regions where the method get_constant_enum_value of the control field returns value from no_check_values_. This field is private copy, its set_time method is called from the set_Time method of actual object.

Definition at line 387 of file field.hh.

◆ FieldBasePtr

template<int spacedim, class Value >
typedef std::shared_ptr< FieldBaseType > Field< spacedim, Value >::FieldBasePtr

Definition at line 96 of file field.hh.

◆ FieldBaseType

template<int spacedim, class Value >
typedef FieldAlgorithmBase<spacedim, Value> Field< spacedim, Value >::FieldBaseType

Definition at line 95 of file field.hh.

◆ HistoryPoint

template<int spacedim, class Value >
typedef pair<double, FieldBasePtr> Field< spacedim, Value >::HistoryPoint
protected

Pair: time, pointer to FieldBase instance.

Definition at line 364 of file field.hh.

◆ Point

template<int spacedim, class Value >
typedef FieldAlgorithmBase<spacedim, Value>::Point Field< spacedim, Value >::Point

Definition at line 97 of file field.hh.

◆ RegionHistory

template<int spacedim, class Value >
typedef boost::circular_buffer<HistoryPoint> Field< spacedim, Value >::RegionHistory
protected

Nearest history of one region.

Definition at line 366 of file field.hh.

◆ ValueType

template<int spacedim, class Value >
typedef Value Field< spacedim, Value >::ValueType

Definition at line 98 of file field.hh.

Constructor & Destructor Documentation

◆ Field() [1/4]

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

Default constructor.

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

◆ Field() [2/4]

template<int spacedim, class Value >
Field< spacedim, Value >::Field ( const string &  name)

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

◆ Field() [3/4]

template<int spacedim, class Value >
Field< spacedim, Value >::Field ( unsigned int  component_index,
string  input_name,
string  name = "" 
)

Constructor that must be used for create of MultiField components.

Set parameters component_index_, shared_->input_name_ and name_. Parameter name_ of Field is consisted of component name and MultiField name.

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

◆ Field() [4/4]

template<int spacedim, class Value >
Field< spacedim, Value >::Field ( const Field< spacedim, Value > &  other)

Copy constructor. Keeps shared history, declaration data, mesh.

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

Member Function Documentation

◆ add_factory()

template<int spacedim, class Value >
void Field< spacedim, Value >::add_factory ( std::shared_ptr< FactoryBase factory)

Add a new factory for creating Field algorithms on individual regions. The last factory is tried first, the last one is always the default implementation Field<...>::FactoryBase.

The Field<...> object keeps a list of such factories. When the instance of a new field algorithm has to be created from the input field descriptor, we pass through the list of factories backward and let factories to create the field algorithm instance from the actual input field descriptor. The first instance (non-null pointer) is used.

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

Here is the caller graph for this function:

◆ cache_reallocate()

template<int spacedim, class Value >
void Field< spacedim, Value >::cache_reallocate ( const ElementCacheMap cache_map,
unsigned int  region_idx 
) const
overridevirtual

Implements FieldCommon::cache_allocate.

Implements FieldCommon.

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

◆ cache_update()

template<int spacedim, class Value >
void Field< spacedim, Value >::cache_update ( ElementCacheMap cache_map,
unsigned int  region_patch_idx 
) const
overridevirtual

Implements FieldCommon::cache_update.

Implements FieldCommon.

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

◆ check_initialized_region_fields_()

template<int spacedim, class Value >
void Field< spacedim, Value >::check_initialized_region_fields_
protected

Check that whole field list (region_fields_) is set, possibly use default values for unset regions.

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

◆ compute_field_data()

template<int spacedim, class Value >
void Field< spacedim, Value >::compute_field_data ( OutputTime::DiscreteSpace  space_type,
std::shared_ptr< OutputTime stream 
)

Interpolate given field into output discrete space_type and store the values into storage of output time stream for postponed output.

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

◆ copy_from()

template<int spacedim, class Value >
void Field< spacedim, Value >::copy_from ( const FieldCommon other)
overridevirtual

Check that other has same type and assign from it.

Implements FieldCommon.

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

◆ disable_where()

template<int spacedim, class Value >
auto Field< spacedim, Value >::disable_where ( const Field< spacedim, typename FieldValue< spacedim >::Enum > &  control_field,
const vector< FieldEnum > &  value_list 
) -> Field &

By this method you can allow that the field need not to be set on regions (and times) where the given control_field is FieldConstant and has value in given value_list. We check this in the set_time method. Through this mechanism we can switch of e.g. boundary data fields according to the type of the boundary condition.

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

Here is the caller graph for this function:

◆ field_output()

template<int spacedim, class Value >
void Field< spacedim, Value >::field_output ( std::shared_ptr< OutputTime stream,
OutputTime::DiscreteSpace  type 
)
overridevirtual

Implementation of FieldCommonBase::output().

Implements FieldCommon.

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

◆ field_result()

template<int spacedim, class Value >
FieldResult Field< spacedim, Value >::field_result ( RegionSet  region_set) const
overridevirtual

Indicates special field states.

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

  • 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.

Implements FieldCommon.

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

Here is the caller graph for this function:

◆ fill_data_value()

template<int spacedim, class Value >
void Field< spacedim, Value >::fill_data_value ( const std::vector< int > &  offsets)
override

Implements FieldCommon::fill_data_value.

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

◆ fill_observe_value()

template<int spacedim, class Value >
void Field< spacedim, Value >::fill_observe_value ( std::shared_ptr< ElementDataCacheBase output_cache_base,
const std::vector< int > &  offsets 
)
override

Implements FieldCommon::fill_observe_value.

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

◆ get_field_fe()

template<int spacedim, class Value >
std::shared_ptr< FieldFE< spacedim, Value > > Field< spacedim, Value >::get_field_fe

Returns true, if field is currently set to a time in which it is discontinuous. Check that the field is in fact FieldFE set on all bulk regions, return shared pointer to that FieldFE or NULL if the Field is not FieldFE.

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

Here is the caller graph for this function:

◆ get_input_type()

template<int spacedim, class Value >
it::Instance Field< spacedim, Value >::get_input_type
overridevirtual

Returns reference to input type of particular field instance, this is static member input_type of the corresponding FieldBase class (i.e. with same template parameters). However, for fields returning "Enum" we have to create whole unique Input::Type hierarchy using following method make_input_tree. every instance since every such field use different Selection for initialization, even if all returns just unsigned int.

Implements FieldCommon.

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

Here is the caller graph for this function:

◆ get_multifield_input_type()

template<int spacedim, class Value >
it::Array Field< spacedim, Value >::get_multifield_input_type ( )
overridevirtual

Returns input type for MultiField instance. TODO: temporary solution, see multifield_

Implements FieldCommon.

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

◆ get_value_attribute()

template<int spacedim, class Value >
std::string Field< spacedim, Value >::get_value_attribute
overridevirtual

Return value of input type attribute 'field_value_shape' that is appended to the input type of this field in FieldSet::make_field_descriptor_type and also to the output field selection created in EquationOutput::make_output_type. This attribute is used by GeoMop to have semantics of the input and output field data.

Attribute value is a valid JSON (and/or flow style YAML) with keys: 'subfields' - value True for multifields, False or not presented for single value fields 'shape' - [ NRows, Ncols] ... given by FieldValue 'type' - <element type> (Double or Integer) ... given by FieldValue 'limit' - bounds of the field values.

Implements FieldCommon.

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

◆ is_constant()

template<int spacedim, class Value >
bool Field< spacedim, Value >::is_constant ( Region  reg)
overridevirtual

Direct read access to the table of Field pointers on regions. Implementation of FieldCommonBase::is_constant(). See also Field<>::field_result which provide better information about special field values.

Implements FieldCommon.

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

◆ operator()() [1/2]

template<int spacedim, class Value >
Value::return_type Field< spacedim, Value >::operator() ( BulkPoint p)

Return appropriate value to BulkPoint in FieldValueCache.

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

◆ operator()() [2/2]

template<int spacedim, class Value >
Value::return_type Field< spacedim, Value >::operator() ( SidePoint p)

Return appropriate value to EdgePoint in FieldValueCache.

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

◆ operator=()

template<int spacedim, class Value >
Field< spacedim, Value > & Field< spacedim, Value >::operator= ( const Field< spacedim, Value > &  other)

Assignment operator. Same properties as copy constructor, but class member name_ is not copied.

Question: do we really need this, isn't copy constructor enough? Answer: It is necessary in (usual) case when Field instance is created as the class member but is filled later by assignment possibly from other class. TODO: operator can be merged with copy constructor, but we must provide to set correct value of name in method copy_from

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

◆ operator[]()

template<int spacedim, class Value >
Value::return_type Field< spacedim, Value >::operator[] ( unsigned int  i_cache_point) const
protected

Return item of value_cache_ given by i_cache_point.

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

◆ set() [1/2]

template<int spacedim, class Value >
void Field< spacedim, Value >::set ( const Input::AbstractRecord a_rec,
double  time,
std::vector< std::string >  region_set_names = {"ALL"} 
)

Same as before but the field is first created using FieldBase::function_factory(), from given abstract record accessor a_rec.

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

◆ set() [2/2]

template<int spacedim, class Value >
void Field< spacedim, Value >::set ( FieldBasePtr  field,
double  time,
std::vector< std::string >  region_set_names = {"ALL"} 
)

Assigns given field to all regions in region set given by region_set_names. Field is added to the history with given time and possibly used in the next call of the set_time method. Caller is responsible for correct construction of given field.

Use this method only if necessary.

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

Here is the caller graph for this function:

◆ set_dependency()

template<int spacedim, class Value >
std::vector< const FieldCommon * > Field< spacedim, Value >::set_dependency ( unsigned int  i_reg) const
overridevirtual

Implementation of FieldCommon::set_dependency().

Implements FieldCommon.

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

◆ set_input_list()

template<int spacedim, class Value >
void Field< spacedim, Value >::set_input_list ( const Input::Array list,
const TimeGovernor tg 
)
overridevirtual

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.

Implements FieldCommon.

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

◆ set_mesh()

template<int spacedim, class Value >
void Field< spacedim, Value >::set_mesh ( const Mesh mesh)
overridevirtual

Set mesh pointer and resize region arrays.

Implements abstract method.

Implements FieldCommon.

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

Here is the caller graph for this function:

◆ set_output_data_cache()

template<int spacedim, class Value >
void Field< spacedim, Value >::set_output_data_cache ( OutputTime::DiscreteSpace  space_type,
std::shared_ptr< OutputTime stream 
)
override

Create and return shared_ptr to ElementDataCache appropriate to Field. Data cache is given by discrete space_type and is stored into data structures of output time stream for postponed output too.

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

◆ set_time()

template<int spacedim, class Value >
bool Field< spacedim, Value >::set_time ( const TimeStep time,
LimitSide  limit_side 
)
overridevirtual

Check that whole field list is set, possibly use default values for unset regions and call set_time for every field in the field list.

Returns true if the field has been changed.

Implements FieldCommon.

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

◆ update_history()

template<int spacedim, class Value >
void Field< spacedim, Value >::update_history ( const TimeStep time)
protected

Read input into regions_history_ possibly pop some old values from the history queue to keep its size less then history_length_limit_.

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

◆ value_cache() [1/6]

FieldValueCache< double > * Field< 3, FieldValue< 0 >::Enum >::value_cache ( )
virtual

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

Implements FieldCommon.

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

◆ value_cache() [2/6]

FieldValueCache< double > * Field< 3, FieldValue< 0 >::Integer >::value_cache ( )
virtual

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

Implements FieldCommon.

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

◆ value_cache() [3/6]

const FieldValueCache< double > * Field< 3, FieldValue< 0 >::Enum >::value_cache ( ) const
virtual

Same as previous but return const pointer

Implements FieldCommon.

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

◆ value_cache() [4/6]

const FieldValueCache< double > * Field< 3, FieldValue< 0 >::Integer >::value_cache ( ) const
virtual

Same as previous but return const pointer

Implements FieldCommon.

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

◆ value_cache() [5/6]

template<int spacedim, class Value >
const FieldValueCache< double > * Field< spacedim, Value >::value_cache
overridevirtual

Implements FieldCommon::value_cache.

Implements FieldCommon.

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

◆ value_cache() [6/6]

template<int spacedim, class Value >
FieldValueCache< double > * Field< spacedim, Value >::value_cache
overridevirtual

Implements FieldCommon::value_cache.

Implements FieldCommon.

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

Friends And Related Function Documentation

◆ detail::model_cache_item

template<int spacedim, class Value >
template<typename CALLABLE , typename TUPLE , int INDEX>
friend struct detail::model_cache_item
friend

Definition at line 417 of file field.hh.

◆ MultiField

template<int spacedim, class Value >
template<int dim, class Val >
friend class MultiField
friend

Definition at line 414 of file field.hh.

Member Data Documentation

◆ data_

template<int spacedim, class Value >
std::shared_ptr<SharedData> Field< spacedim, Value >::data_
protected

Definition at line 378 of file field.hh.

◆ factories_

template<int spacedim, class Value >
std::vector<std::shared_ptr<FactoryBase> > Field< spacedim, Value >::factories_
protected

Definition at line 395 of file field.hh.

◆ no_check_control_field_

template<int spacedim, class Value >
std::shared_ptr<ControlField> Field< spacedim, Value >::no_check_control_field_
protected

Definition at line 388 of file field.hh.

◆ output_data_cache_

template<int spacedim, class Value >
std::shared_ptr<ElementDataCache<typename Value::element_type> > Field< spacedim, Value >::output_data_cache_
protected

ElementDataCache used during field output, object is shared with OutputTime.

Definition at line 409 of file field.hh.

◆ region_fields_

template<int spacedim, class Value >
std::vector< FieldBasePtr > Field< spacedim, Value >::region_fields_
protected

Table with pointers to fields on individual regions.

Definition at line 393 of file field.hh.

◆ space_dim

template<int spacedim, class Value >
const unsigned int Field< spacedim, Value >::space_dim = spacedim
static

Definition at line 100 of file field.hh.

◆ value_cache_

template<int spacedim, class Value >
FieldValueCache<typename Value::element_type> Field< spacedim, Value >::value_cache_
mutableprotected

Field value data cache

Data is ordered like three dimensional table. The highest level is determinated by subsets, those data ranges are holds in subset_starts. Data block size of each subset is determined by number of eval_points (of subset) and maximal number of stored elements. The table is allocated to hold all subsets, but only those marked in used_subsets are updated. Order of subsets is same as in eval_points.

Definition at line 406 of file field.hh.


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