Flow123d  JS_before_hm-2208-gb971e62bf
Public Types | Public Member Functions | Private Attributes | List of all members
FieldCoords Class Reference

#include <field_coords.hh>

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

Public Types

typedef Space< 3 >::Point Point
 

Public Member Functions

 FieldCoords ()
 Constructor. More...
 
IT::Instance get_input_type () override
 
IT::Array get_multifield_input_type () override
 
void set_mesh (const Mesh &mesh) override
 
bool is_constant (FMT_UNUSED Region reg) override
 
bool set_time (FMT_UNUSED const TimeStep &time, FMT_UNUSED LimitSide limit_side) override
 
void copy_from (FMT_UNUSED const FieldCommon &other) override
 
void field_output (FMT_UNUSED std::shared_ptr< OutputTime > stream, FMT_UNUSED OutputTime::DiscreteSpace type) override
 
void observe_output (FMT_UNUSED std::shared_ptr< Observe > observe) override
 
FieldResult field_result (FMT_UNUSED RegionSet region_set) const override
 
std::string get_value_attribute () const override
 
void set_input_list (FMT_UNUSED const Input::Array &list, FMT_UNUSED const TimeGovernor &tg) override
 
void cache_reallocate (FMT_UNUSED const ElementCacheMap &cache_map, FMT_UNUSED 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 (FMT_UNUSED FieldSet &field_set, FMT_UNUSED unsigned int i_reg) const override
 Implements FieldCommon::set_dependency(). More...
 
const arma::vec3value (const Point &p, FMT_UNUSED const ElementAccessor< 3 > &elm) const
 Returns one value of coordinates in one given point . More...
 
void value_list (const Armor::array &point_list, const ElementAccessor< 3 > &elm, std::vector< arma::vec3 > &value_list) const
 
arma::vec3 operator[] (unsigned int i_cache_point) const
 Return item of value_cache_ given by i_cache_point. More...
 
- 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)
 
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...
 
bool changed () const
 
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 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 ~FieldCommon ()
 
void set_time_result_changed ()
 Manually mark flag that the field has been changed. More...
 

Private Attributes

FieldValueCache< double > value_cache_
 

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_
 
- Protected Types inherited from FieldCommon
enum  TimeStatus { TimeStatus::changed, TimeStatus::constant, TimeStatus::changed_forced, TimeStatus::unknown }
 
- 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 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...
 
- 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

Specialized field represents coordinate variables ('x', 'y', 'z') of FieldFormula.

Definition at line 36 of file field_coords.hh.

Member Typedef Documentation

◆ Point

Definition at line 38 of file field_coords.hh.

Constructor & Destructor Documentation

◆ FieldCoords()

FieldCoords::FieldCoords ( )
inline

Constructor.

Definition at line 41 of file field_coords.hh.

Member Function Documentation

◆ cache_reallocate()

void FieldCoords::cache_reallocate ( FMT_UNUSED const ElementCacheMap cache_map,
FMT_UNUSED unsigned int  region_idx 
) const
inlineoverride

Implements FieldCommon::cache_allocate.

Definition at line 103 of file field_coords.hh.

◆ cache_update()

void FieldCoords::cache_update ( ElementCacheMap cache_map,
unsigned int  region_patch_idx 
) const
inlineoverridevirtual

Implements FieldCommon::cache_update.

Implements FieldCommon.

Definition at line 107 of file field_coords.hh.

◆ copy_from()

void FieldCoords::copy_from ( FMT_UNUSED const FieldCommon other)
inlineoverride

Definition at line 78 of file field_coords.hh.

◆ field_output()

void FieldCoords::field_output ( FMT_UNUSED std::shared_ptr< OutputTime stream,
FMT_UNUSED OutputTime::DiscreteSpace  type 
)
inlineoverride

Definition at line 82 of file field_coords.hh.

◆ field_result()

FieldResult FieldCoords::field_result ( FMT_UNUSED RegionSet  region_set) const
inlineoverride

Definition at line 90 of file field_coords.hh.

◆ get_input_type()

IT::Instance FieldCoords::get_input_type ( )
inlineoverridevirtual

Returns input type for particular field instance, this is reference to a static member input_type of the corresponding FieldBase class (i.e. with the same template parameters). This is used in FieldSet::make_field_descriptor_type.

Implements FieldCommon.

Definition at line 51 of file field_coords.hh.

◆ get_multifield_input_type()

IT::Array FieldCoords::get_multifield_input_type ( )
inlineoverridevirtual

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

Implements FieldCommon.

Definition at line 59 of file field_coords.hh.

◆ get_value_attribute()

std::string FieldCoords::get_value_attribute ( ) const
inlineoverridevirtual

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.

Implements FieldCommon.

Definition at line 94 of file field_coords.hh.

◆ is_constant()

bool FieldCoords::is_constant ( FMT_UNUSED Region  reg)
inlineoverride

Definition at line 70 of file field_coords.hh.

◆ observe_output()

void FieldCoords::observe_output ( FMT_UNUSED std::shared_ptr< Observe observe)
inlineoverride

Definition at line 86 of file field_coords.hh.

◆ operator[]()

arma::vec3 FieldCoords::operator[] ( unsigned int  i_cache_point) const
inline

Return item of value_cache_ given by i_cache_point.

Definition at line 185 of file field_coords.hh.

◆ set_dependency()

std::vector<const FieldCommon *> FieldCoords::set_dependency ( FMT_UNUSED FieldSet field_set,
FMT_UNUSED unsigned int  i_reg 
) const
inlineoverride

Implements FieldCommon::set_dependency().

Definition at line 164 of file field_coords.hh.

◆ set_input_list()

void FieldCoords::set_input_list ( FMT_UNUSED const Input::Array list,
FMT_UNUSED const TimeGovernor tg 
)
inlineoverride

Definition at line 99 of file field_coords.hh.

◆ set_mesh()

void FieldCoords::set_mesh ( const Mesh mesh)
inlineoverridevirtual

Set internal mesh pointer.

Implements FieldCommon.

Definition at line 66 of file field_coords.hh.

Here is the caller graph for this function:

◆ set_time()

bool FieldCoords::set_time ( FMT_UNUSED const TimeStep time,
FMT_UNUSED LimitSide  limit_side 
)
inlineoverride

Definition at line 74 of file field_coords.hh.

◆ value()

const arma::vec3& FieldCoords::value ( const Point p,
FMT_UNUSED const ElementAccessor< 3 > &  elm 
) const
inline

Returns one value of coordinates in one given point .

Definition at line 169 of file field_coords.hh.

Here is the caller graph for this function:

◆ value_cache() [1/2]

const FieldValueCache<double>* FieldCoords::value_cache ( ) const
inlineoverridevirtual

Implements FieldCommon::value_cache.

Implements FieldCommon.

Definition at line 159 of file field_coords.hh.

◆ value_cache() [2/2]

FieldValueCache<double>* FieldCoords::value_cache ( )
inlineoverridevirtual

Implements FieldCommon::value_cache.

Implements FieldCommon.

Definition at line 154 of file field_coords.hh.

Here is the caller graph for this function:

◆ value_list()

void FieldCoords::value_list ( const Armor::array point_list,
const ElementAccessor< 3 > &  elm,
std::vector< arma::vec3 > &  value_list 
) const
inline

Definition at line 174 of file field_coords.hh.

Member Data Documentation

◆ value_cache_

FieldValueCache<double> FieldCoords::value_cache_
mutableprivate

Field value data cache

See implementation of Field<spacedim, Value>::value_cache_

Definition at line 196 of file field_coords.hh.


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