COOLFluiD  Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Attributes | List of all members
Field Class Reference

#include <Field.hpp>

Inherits Table< Real >.

Public Types

typedef ArrayT::array_view< 2 >::type View
 
typedef Eigen::Array< Real, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > ArrayStorage
 
typedef Eigen::Map< ArrayStorage, Eigen::Unaligned, Eigen::Stride< Eigen::Dynamic, Eigen::Dynamic > > Ref
 
typedef Eigen::Block< Ref, Eigen::Dynamic, 1 > RefCol
 
typedef Eigen::Array< Real, 1, Eigen::Dynamic, Eigen::RowMajor > RowArrayStorage
 
typedef Eigen::Map< RowArrayStorage, Eigen::Unaligned > RowArrayRef
 
typedef Eigen::Matrix< Real, 1, Eigen::Dynamic, Eigen::RowMajor > RowVectorStorage
 
typedef Eigen::Map< RowVectorStorage, Eigen::Unaligned > RowVectorRef
 
typedef Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > RowTensorStorage
 
typedef Eigen::Map< RowTensorStorage, Eigen::Unaligned > RowTensorRef
 
- Public Types inherited from Table< Real >
typedef Real value_type
 the value type stored in each entry of the 2-dimensional table More...
 
typedef TableArray< Real >::type ArrayT
 the type of the internal structure of the table More...
 
typedef TableRow< Real >::type Row
 the type of a row in the internal structure of the table More...
 
typedef TableConstRow< Real >::type ConstRow
 the const type of a row in the internal structure of the table More...
 
typedef ArrayBufferT< Real > Buffer
 the type of the buffer used to interact with the table More...
 
- Public Types inherited from Component
typedef ComponentIterator< Componentiterator
 type of the iterator to Component More...
 
typedef ComponentIterator< Component const > const_iterator
 type of the iterator to constant Component More...
 
- Public Types inherited from SignalHandler
typedef std::vector< SignalPtrstorage_t
 storage type for signals More...
 

Public Member Functions

 Field (const std::string &name)
 
virtual ~Field ()
 Virtual destructor. More...
 
std::string var_name (Uint i=0) const
 
Uint nb_vars () const
 
bool has_variable (const std::string &vname) const
 True if the field contains a variable with the given name. More...
 
Uint var_number (const std::string &vname) const
 Find the variable index of the given variable. More...
 
Uint var_offset (const std::string &vname) const
 Return the start index of a given variable. More...
 
Uint var_offset (const Uint var_nb) const
 Return the start index of a given variable number. More...
 
VarType var_length (const std::string &vname) const
 Return the length (in number of Real values occupied in the data row) of the variable of the given name. More...
 
VarType var_length (const Uint i=0) const
 Return the length (in number of Real values occupied in the data row) of the variable of the given var number. More...
 
void set_dict (Dictionary &dict)
 
Dictionarydict () const
 
View view (const Uint start, const Uint size)
 
View view (common::Table< Uint >::ConstRow &indices)
 
common::List< Uint > & glb_idx () const
 
common::List< Uint > & rank () const
 
bool is_ghost (const Uint idx) const
 
bool continuous () const
 
bool discontinuous () const
 
const Handle< Space const > & space (const Handle< Entities const > &entities) const
 
const Spacespace (const Entities &entities) const
 
const std::vector< Handle< Entities > > & entities_range () const
 
const std::vector< Handle< Space > > & spaces () const
 
Fieldcoordinates () const
 
common::PE::CommPatternparallelize_with (common::PE::CommPattern &comm_pattern)
 
common::PE::CommPatternparallelize ()
 
void synchronize ()
 
math::VariablesDescriptordescriptor () const
 
void set_descriptor (math::VariablesDescriptor &descriptor)
 
void create_descriptor (const std::string &description, const Uint dimension=0)
 
Ref ref ()
 
Ref col (const Uint c)
 
RowArrayRef row (const Uint r)
 
Real & scalar (const Uint r)
 
RowVectorRef vector (const Uint r)
 
RowTensorRef tensor (const Uint r)
 
void set_var_type (const VarType var_type)
 
VarType var_type () const
 
Fieldoperator= (const Field &U)
 U = U. More...
 
Fieldoperator= (const Real &c)
 U = c. More...
 
Fieldoperator+= (const Real &c)
 U += c. More...
 
Fieldoperator+= (const Field &U)
 U += U. More...
 
Fieldoperator-= (const Real &c)
 U -= c. More...
 
Fieldoperator-= (const Field &U)
 U -= U. More...
 
Fieldoperator*= (const Real &c)
 U *= c. More...
 
Fieldoperator*= (const Field &U)
 U *= U. More...
 
Fieldoperator/= (const Real &c)
 U /= c. More...
 
Fieldoperator/= (const Field &U)
 U /= U. More...
 
- Public Member Functions inherited from Table< Real >
 Table (const std::string &name)
 
void set_row_size (const Uint nb_cols)
 
virtual void resize (const Uint nb_rows)
 
ArrayTarray ()
 
const ArrayTarray () const
 
Buffer create_buffer (const size_t buffersize=16384)
 
boost::shared_ptr< Buffercreate_buffer_ptr (const size_t buffersize=16384)
 
Row operator[] (const Uint idx)
 
ConstRow operator[] (const Uint idx) const
 
Uint size () const
 
Uint row_size (Uint i=0) const
 
void set_row (const Uint array_idx, const VectorT &row)
 
Table< Real > & seekp (const Uint p)
 Set position for the next input by <<. More...
 
Uint tellp () const
 Get the current seek position as used by <<. More...
 
- Public Member Functions inherited from Component
 Component (const std::string &name)
 
virtual ~Component ()
 Virtual destructor. More...
 
const std::string & name () const
 Access the name of the component. More...
 
void rename (const std::string &name)
 Rename the component. More...
 
URI uri () const
 Construct the full path. More...
 
void complete_path (URI &path) const
 
Handle< Componentaccess_component (const URI &path) const
 
Handle< Componentaccess_component_checked (const URI &path)
 
Handle< Component const > access_component_checked (const URI &path) const
 
Handle< Componenthandle ()
 Get a handle to the component. More...
 
Handle< Component const > handle () const
 
template<typename ComponentT >
Handle< ComponentT > handle ()
 
template<typename ComponentT >
Handle< ComponentT const > handle () const
 
Handle< Componentparent () const
 
Handle< Component const > root () const
 
Handle< Componentroot ()
 
Handle< Componentget_child (const std::string &name)
 
Handle< Component const > get_child (const std::string &name) const
 
Handle< Componentget_child_checked (const std::string &name)
 
Handle< Component const > get_child_checked (const std::string &name) const
 
Handle< Componentcreate_component (const std::string &name, const std::string &builder)
 Build a (sub)component of this component using the extended type_name of the component. More...
 
template<typename T >
Handle< T > create_component (const std::string &name)
 Create a (sub)component of this component automatically cast to the specified type. More...
 
template<typename T >
Handle< T > create_static_component (const std::string &name)
 Create a static "always there" subcomponent. More...
 
Componentadd_component (const boost::shared_ptr< Component > &subcomp)
 Add the passed component as a subcomponent. More...
 
void add_link (Component &linked_component)
 
boost::shared_ptr< Componentremove_component (const std::string &name)
 Remove a (sub)component of this component. More...
 
boost::shared_ptr< Componentremove_component (Component &subcomp)
 Remove a (sub)component of this component. More...
 
void clear ()
 Remove all sub-components of this component, except for the static ones. More...
 
void move_to (Component &to_parent)
 
std::string tree (bool basic_mode=false, Uint depth=0, Uint recursion_level=0) const
 
std::string info (const std::string &what=std::string("cospt")) const
 
size_t count_children () const
 
virtual std::string derived_type_name () const =0
 
PropertyListproperties ()
 
const PropertyListproperties () const
 
OptionListoptions ()
 
const OptionListoptions () const
 
void reset_options ()
 Reset all options to their default value. More...
 
void configure_option_recursively (const std::string &optname, const boost::any &val)
 
Componentmark_basic ()
 marks this component as basic. More...
 
template<typename ComponentT >
void put_components (std::vector< boost::shared_ptr< ComponentT > > &vec, const bool recurse)
 
template<typename ComponentT >
void put_components (std::vector< boost::shared_ptr< ComponentT const > > &vec, const bool recurse) const
 
template<>
void put_components (std::vector< boost::shared_ptr< Component > > &vec, const bool recurse)
 
template<>
void put_components (std::vector< boost::shared_ptr< Component const > > &vec, const bool recurse) const
 
Component::iterator begin ()
 The begin iterator for a range containing Components. More...
 
Component::iterator end ()
 The end iterator for a range containing Components. More...
 
Component::const_iterator begin () const
 The begin iterator for a range containing Components (const version) More...
 
Component::const_iterator end () const
 The end iterator for a range containing Components (const version) More...
 
Component::iterator recursive_begin ()
 The begin iterator for a recursive range containing Components. More...
 
Component::iterator recursive_end ()
 The end iterator for a recursive range containing Components. More...
 
Component::const_iterator recursive_begin () const
 The begin iterator for a recursive range containing Components (const version) More...
 
Component::const_iterator recursive_end () const
 The end iterator for a recursive range containing Components (const version) More...
 
template<typename T >
Handle< T > create_component (const std::string &name, const std::string &builder)
 Create a component using the reduced builder name. More...
 
void signal_configure (SignalArgs &args)
 configures all the options on this class More...
 
void signal_create_component (SignalArgs &args)
 creates a component from this component More...
 
void signal_delete_component (SignalArgs &args)
 delete this component More...
 
void signal_move_component (SignalArgs &args)
 moves a component from this component to another More...
 
void signal_list_tree (SignalArgs &args) const
 lists the sub components and puts them on the xml_tree More...
 
void signal_list_tree_recursive (SignalArgs &args) const
 prints tree recursively More...
 
void signal_list_properties (SignalArgs &args) const
 lists the properties of this component More...
 
void signal_list_options (SignalArgs &args) const
 lists the properties of this component More...
 
void signal_list_options_recursive (SignalArgs &args) const
 prints all options recursive More...
 
void signal_list_signals (SignalArgs &args) const
 lists the signals of this component More...
 
void signal_list_signals_recursive (SignalArgs &args) const
 prints all signals recursive More...
 
void signal_print_info (SignalArgs &args) const
 gets info on this component More...
 
void signal_print_tree (SignalArgs &args) const
 signal to print the tree More...
 
void signature_print_tree (SignalArgs &args) const
 signature to signal_print_tree More...
 
void signal_rename_component (SignalArgs &args)
 renames this component More...
 
void signal_save_tree (SignalArgs &args)
 dumps the tree to a file More...
 
void signal_list_content (SignalArgs &args)
 gives information about this component such as options, signals, ... More...
 
void signal_signature (SignalArgs &args)
 Gives a signal signature, if any. More...
 
void signature_create_component (SignalArgs &args)
 
void signature_rename_component (SignalArgs &args)
 
void signature_move_component (SignalArgs &args)
 
void signal_store_timings (SignalArgs &args)
 Signal to store the timings (if enabled) into properties, i.e. for readout from python or the GUI. More...
 
void signal_clear (SignalArgs &args)
 Signal to remove all sub-components. More...
 
void signal_reset_options (SignalArgs &args)
 Signal to set all options to their default value. More...
 
void signal_add_tag (SignalArgs &args)
 Signal to add a tag. More...
 
void signature_add_tag (SignalArgs &args)
 
- Public Member Functions inherited from SignalHandler
 ~SignalHandler ()
 
const storage_tsignal_list () const
 
SignalPtr signal (const SignalID &sname)
 
SignalCPtr signal (const SignalID &sname) const
 
SignalRet call_signal (const SignalID &sname, SignalArgs &sinput)
 Calls the signal by providing its name and input. More...
 
SignalRet call_signal (const SignalID &sname, std::vector< std::string > &sinput)
 Calls the signal by providing its name and input. More...
 
bool signal_exists (const SignalID &sname) const
 Checks if a signal exists or not. More...
 
Signalregist_signal (const SignalID &sname)
 Regist signal. More...
 
void unregist_signal (const SignalID &sname)
 Unregist signal. More...
 
- Public Member Functions inherited from ConnectionManager
 ~ConnectionManager ()
 destructor closes all connections More...
 
Connectionconnection (const std::string &name)
 
Connectionmanage_connection (const std::string &name)
 manages a connection (creates if necessary) More...
 
- Public Member Functions inherited from TaggedObject
 TaggedObject ()
 Constructor. More...
 
bool has_tag (const std::string &tag) const
 
void add_tag (const std::string &tag)
 
std::vector< std::string > get_tags () const
 
void remove_tag (const std::string &tag)
 

Static Public Member Functions

static std::string type_name ()
 Get the class name. More...
 
- Static Public Member Functions inherited from Table< Real >
static std::string type_name ()
 
- Static Public Member Functions inherited from Component
static std::string type_name ()
 Get the class name. More...
 

Private Types

typedef boost::multi_array_types::index_range range
 

Private Attributes

Handle< Dictionarym_dict
 
Handle< common::PE::CommPatternm_comm_pattern
 
Handle< math::VariablesDescriptorm_descriptor
 
VarType m_var_type
 

Additional Inherited Members

- Public Attributes inherited from SignalHandler
storage_t m_signals
 storage of the signals More...
 
- Protected Member Functions inherited from Component
Componentadd_static_component (const boost::shared_ptr< Component > &subcomp)
 Add a static (sub)component of this component. More...
 
void raise_tree_updated_event ()
 raise event that the path has changed More...
 

Detailed Description

Field component class This class stores fields which can be applied to fields (Field)

Author
Willem Deconinck, Tiago Quintino

Definition at line 34 of file Field.hpp.

Member Typedef Documentation

typedef Eigen::Array<Real,Eigen::Dynamic,Eigen::Dynamic,Eigen::RowMajor> ArrayStorage

Definition at line 41 of file Field.hpp.

typedef boost::multi_array_types::index_range range
private

Definition at line 57 of file Field.hpp.

typedef Eigen::Map< ArrayStorage , Eigen::Unaligned, Eigen::Stride<Eigen::Dynamic,Eigen::Dynamic> > Ref

Definition at line 42 of file Field.hpp.

typedef Eigen::Block<Ref, Eigen::Dynamic, 1> RefCol

Definition at line 44 of file Field.hpp.

typedef Eigen::Map< RowArrayStorage , Eigen::Unaligned > RowArrayRef

Definition at line 47 of file Field.hpp.

typedef Eigen::Array<Real,1,Eigen::Dynamic,Eigen::RowMajor> RowArrayStorage

Definition at line 46 of file Field.hpp.

typedef Eigen::Map< RowTensorStorage , Eigen::Unaligned > RowTensorRef

Definition at line 53 of file Field.hpp.

typedef Eigen::Matrix<Real,Eigen::Dynamic,Eigen::Dynamic,Eigen::RowMajor> RowTensorStorage

Definition at line 52 of file Field.hpp.

typedef Eigen::Map< RowVectorStorage , Eigen::Unaligned > RowVectorRef

Definition at line 50 of file Field.hpp.

typedef Eigen::Matrix<Real,1,Eigen::Dynamic,Eigen::RowMajor> RowVectorStorage

Definition at line 49 of file Field.hpp.

typedef ArrayT::array_view<2>::type View

Definition at line 38 of file Field.hpp.

Constructor & Destructor Documentation

Field ( const std::string &  name)

Contructor

Parameters
nameof the component

Definition at line 40 of file Field.cpp.

~Field ( )
virtual

Virtual destructor.

Definition at line 51 of file Field.cpp.

Member Function Documentation

Field::Ref col ( const Uint  c)

Definition at line 276 of file Field.cpp.

bool continuous ( ) const

Definition at line 235 of file Field.cpp.

Field & coordinates ( ) const

Definition at line 262 of file Field.cpp.

void create_descriptor ( const std::string &  description,
const Uint  dimension = 0 
)

Definition at line 190 of file Field.cpp.

math::VariablesDescriptor& descriptor ( ) const
inline

Definition at line 127 of file Field.hpp.

Dictionary & dict ( ) const

Definition at line 118 of file Field.cpp.

bool discontinuous ( ) const

Definition at line 241 of file Field.cpp.

const std::vector< Handle< Entities > > & entities_range ( ) const

Definition at line 126 of file Field.cpp.

common::List< Uint > & glb_idx ( ) const

Definition at line 214 of file Field.cpp.

bool has_variable ( const std::string &  vname) const

True if the field contains a variable with the given name.

Definition at line 62 of file Field.cpp.

bool is_ghost ( const Uint  idx) const

Definition at line 228 of file Field.cpp.

Uint nb_vars ( ) const

Definition at line 55 of file Field.cpp.

Field& operator*= ( const Real &  c)
inline

U *= c.

Definition at line 240 of file Field.hpp.

Field& operator*= ( const Field U)
inline

U *= U.

Definition at line 249 of file Field.hpp.

Field& operator+= ( const Real &  c)
inline

U += c.

Definition at line 200 of file Field.hpp.

Field& operator+= ( const Field U)
inline

U += U.

Definition at line 209 of file Field.hpp.

Field& operator-= ( const Real &  c)
inline

U -= c.

Definition at line 220 of file Field.hpp.

Field& operator-= ( const Field U)
inline

U -= U.

Definition at line 229 of file Field.hpp.

Field& operator/= ( const Real &  c)
inline

U /= c.

Definition at line 269 of file Field.hpp.

Field& operator/= ( const Field U)
inline

U /= U.

Definition at line 278 of file Field.hpp.

Field& operator= ( const Field U)
inline

U = U.

Definition at line 183 of file Field.hpp.

Field& operator= ( const Real &  c)
inline

U = c.

Definition at line 191 of file Field.hpp.

CommPattern & parallelize ( )

Definition at line 149 of file Field.cpp.

CommPattern & parallelize_with ( common::PE::CommPattern comm_pattern)

Definition at line 140 of file Field.cpp.

common::List< Uint > & rank ( ) const

Definition at line 221 of file Field.cpp.

Field::Ref ref ( )

Definition at line 269 of file Field.cpp.

Field::RowArrayRef row ( const Uint  r)

Definition at line 283 of file Field.cpp.

Real & scalar ( const Uint  r)

Definition at line 290 of file Field.cpp.

void set_descriptor ( math::VariablesDescriptor descriptor)

Definition at line 181 of file Field.cpp.

void set_dict ( Dictionary dict)

Definition at line 111 of file Field.cpp.

void set_var_type ( const VarType  var_type)

Definition at line 311 of file Field.cpp.

const Handle< Space const > & space ( const Handle< Entities const > &  entities) const

Definition at line 248 of file Field.cpp.

const Space & space ( const Entities entities) const

Definition at line 255 of file Field.cpp.

const std::vector< Handle< Space > > & spaces ( ) const

Definition at line 133 of file Field.cpp.

void synchronize ( )

Definition at line 162 of file Field.cpp.

Field::RowTensorRef tensor ( const Uint  r)

Definition at line 304 of file Field.cpp.

static std::string type_name ( )
inlinestatic

Get the class name.

Definition at line 69 of file Field.hpp.

VarType var_length ( const std::string &  vname) const

Return the length (in number of Real values occupied in the data row) of the variable of the given name.

Definition at line 104 of file Field.cpp.

VarType var_length ( const Uint  i = 0) const

Return the length (in number of Real values occupied in the data row) of the variable of the given var number.

Definition at line 97 of file Field.cpp.

std::string var_name ( Uint  i = 0) const

Definition at line 69 of file Field.cpp.

Uint var_number ( const std::string &  vname) const

Find the variable index of the given variable.

Definition at line 76 of file Field.cpp.

Uint var_offset ( const std::string &  vname) const

Return the start index of a given variable.

Definition at line 83 of file Field.cpp.

Uint var_offset ( const Uint  var_nb) const

Return the start index of a given variable number.

Definition at line 90 of file Field.cpp.

VarType var_type ( ) const

Definition at line 318 of file Field.cpp.

Field::RowVectorRef vector ( const Uint  r)

Definition at line 297 of file Field.cpp.

Field::View view ( const Uint  start,
const Uint  size 
)

Definition at line 200 of file Field.cpp.

Field::View view ( common::Table< Uint >::ConstRow indices)

Definition at line 207 of file Field.cpp.

Member Data Documentation

Handle< common::PE::CommPattern > m_comm_pattern
private

Definition at line 324 of file Field.hpp.

Handle< math::VariablesDescriptor > m_descriptor
private

Definition at line 326 of file Field.hpp.

Handle<Dictionary> m_dict
private

Definition at line 322 of file Field.hpp.

VarType m_var_type
private

Definition at line 328 of file Field.hpp.


The documentation for this class was generated from the following files:
Send comments to:
COOLFluiD Web Admin