Flow123d  jenkins-Flow123d-windows32-release-multijob-51
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes | List of all members
FieldElementwise< spacedim, Value > Class Template Reference

#include <field_elementwise.hh>

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

Public Types

typedef FieldAlgorithmBase
< spacedim, Value >::Point 
Point
 
- Public Types inherited from FieldAlgorithmBase< spacedim, Value >
typedef Space< spacedim >::Point Point
 
typedef Value ValueType
 

Public Member Functions

 FieldElementwise (unsigned int n_comp=0)
 
 FieldElementwise (double *data_ptr, unsigned int n_components, unsigned int size)
 
 FieldElementwise (vector< double > &data, unsigned int n_components)
 
virtual void init_from_input (const Input::Record &rec)
 
void set_data_row (unsigned int boundary_idx, typename Value::return_type &value)
 
virtual bool set_time (double time)
 
virtual void set_mesh (const Mesh *mesh, bool boundary_domain)
 
virtual Value::return_type const & value (const Point &p, const ElementAccessor< spacedim > &elm)
 
virtual void value_list (const std::vector< Point > &point_list, const ElementAccessor< spacedim > &elm, std::vector< typename Value::return_type > &value_list)
 
virtual ~FieldElementwise ()
 
- Public Member Functions inherited from FieldAlgorithmBase< spacedim, Value >
 FieldAlgorithmBase (unsigned int n_comp=0)
 
unsigned int n_comp () const
 
FieldResult field_result () const
 
virtual double next_change_time ()
 
virtual ~FieldAlgorithmBase ()
 

Static Public Member Functions

static Input::Type::Record get_input_type (Input::Type::AbstractRecord &a_type, const typename Value::ElementInputType *eit)
 
- Static Public Member Functions inherited from FieldAlgorithmBase< spacedim, Value >
static std::string template_name ()
 
static Input::Type::AbstractRecord get_input_type (const typename Value::ElementInputType *element_input_type=nullptr)
 
static std::shared_ptr
< FieldAlgorithmBase< spacedim,
Value > > 
function_factory (const Input::AbstractRecord &rec, unsigned int n_comp=0)
 

Static Public Attributes

static Input::Type::Record input_type = FieldElementwise<spacedim, Value>::get_input_type(FieldAlgorithmBase<spacedim, Value>::input_type, NULL)
 Implementation. More...
 
- Static Public Attributes inherited from FieldAlgorithmBase< spacedim, Value >
static const unsigned int spacedim_ =spacedim
 
static Input::Type::AbstractRecord input_type
 

Private Attributes

bool internal_raw_data
 
bool boundary_domain_
 
unsigned int data_size_
 Allocated size of data_ buffer. More...
 
double * data_
 Raw buffer of n_entities rows each containing Value::size() doubles. More...
 
unsigned int n_entities_
 Number of rows in data_ buffer. More...
 
unsigned int n_components_
 Size of Value. More...
 
GmshMeshReaderreader_
 
const Meshmesh_
 
std::string field_name_
 

Additional Inherited Members

- Protected Attributes inherited from FieldAlgorithmBase< spacedim, Value >
double time_
 Actual time level; initial value is -infinity. More...
 
Value value_
 Last value, prevents passing large values (vectors) by value. More...
 
Value::return_type r_value_
 
FieldResult field_result_
 Indicator of particular values (zero, one) constant over space. More...
 

Detailed Description

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

Definition at line 37 of file field_elementwise.hh.

Member Typedef Documentation

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

Definition at line 40 of file field_elementwise.hh.

Constructor & Destructor Documentation

template<int spacedim, class Value >
FieldElementwise< spacedim, Value >::FieldElementwise ( unsigned int  n_comp = 0)

Definition at line 46 of file field_elementwise.impl.hh.

template<int spacedim, class Value >
FieldElementwise< spacedim, Value >::FieldElementwise ( double *  data_ptr,
unsigned int  n_components,
unsigned int  size 
)

Temporary solution (as well as the whole this class before we use DofHandlers) how to build FiledElementwise on an existing array of values on elements.

Definition at line 57 of file field_elementwise.impl.hh.

template<int spacedim, class Value >
FieldElementwise< spacedim, Value >::FieldElementwise ( vector< double > &  data,
unsigned int  n_components 
)
inline

Alternative to previous constructor.

Definition at line 53 of file field_elementwise.hh.

template<int spacedim, class Value >
FieldElementwise< spacedim, Value >::~FieldElementwise ( )
virtual

Definition at line 184 of file field_elementwise.impl.hh.

Member Function Documentation

template<int spacedim, class Value >
Input::Type::Record FieldElementwise< spacedim, Value >::get_input_type ( Input::Type::AbstractRecord a_type,
const typename Value::ElementInputType *  eit 
)
static

Definition at line 27 of file field_elementwise.impl.hh.

Here is the caller graph for this function:

template<int spacedim, class Value >
void FieldElementwise< spacedim, Value >::init_from_input ( const Input::Record rec)
virtual

Function can provide way to initialize itself from the input data.

TODO: make protected, should be called through function factory

Reimplemented from FieldAlgorithmBase< spacedim, Value >.

Definition at line 67 of file field_elementwise.impl.hh.

template<int spacedim, class Value >
void FieldElementwise< spacedim, Value >::set_data_row ( unsigned int  boundary_idx,
typename Value::return_type &  value 
)

Set row of boundary data. Used to implement old BC input.

Definition at line 79 of file field_elementwise.impl.hh.

template<int spacedim, class Value >
void FieldElementwise< spacedim, Value >::set_mesh ( const Mesh mesh,
bool  boundary_domain 
)
virtual

Has to be set before calling init_from_input. This also allocate and initialize internal buffer. Do nothing if mesh is already set.

See also description of the FieldBase<...>::set_mesh.

Reimplemented from FieldAlgorithmBase< spacedim, Value >.

Definition at line 116 of file field_elementwise.impl.hh.

template<int spacedim, class Value >
bool FieldElementwise< spacedim, Value >::set_time ( double  time)
virtual

Update time and possibly update data from GMSH file.

Reimplemented from FieldAlgorithmBase< spacedim, Value >.

Definition at line 92 of file field_elementwise.impl.hh.

template<int spacedim, class Value >
Value::return_type const & FieldElementwise< spacedim, Value >::value ( const Point p,
const ElementAccessor< spacedim > &  elm 
)
virtual

Returns one value in one given point. ResultType can be used to avoid some costly calculation if the result is trivial.

Implements FieldAlgorithmBase< spacedim, Value >.

Definition at line 143 of file field_elementwise.impl.hh.

template<int spacedim, class Value >
void FieldElementwise< spacedim, Value >::value_list ( const std::vector< Point > &  point_list,
const ElementAccessor< spacedim > &  elm,
std::vector< typename Value::return_type > &  value_list 
)
virtual

Returns std::vector of scalar values in several points at once.

Implements FieldAlgorithmBase< spacedim, Value >.

Definition at line 159 of file field_elementwise.impl.hh.

Member Data Documentation

template<int spacedim, class Value >
bool FieldElementwise< spacedim, Value >::boundary_domain_
private

Is set in set_mesh method. Value true means, that we accept only boundary element accessors in the value method. TODO: temporary solution until we have separate mesh for the boundary part

Definition at line 104 of file field_elementwise.hh.

template<int spacedim, class Value >
double* FieldElementwise< spacedim, Value >::data_
private

Raw buffer of n_entities rows each containing Value::size() doubles.

Definition at line 108 of file field_elementwise.hh.

template<int spacedim, class Value >
unsigned int FieldElementwise< spacedim, Value >::data_size_
private

Allocated size of data_ buffer.

Definition at line 106 of file field_elementwise.hh.

template<int spacedim, class Value >
std::string FieldElementwise< spacedim, Value >::field_name_
private

Definition at line 116 of file field_elementwise.hh.

template<int spacedim, class Value >
it::Record FieldElementwise< spacedim, Value >::input_type = FieldElementwise<spacedim, Value>::get_input_type(FieldAlgorithmBase<spacedim, Value>::input_type, NULL)
static

Implementation.

Definition at line 57 of file field_elementwise.hh.

template<int spacedim, class Value >
bool FieldElementwise< spacedim, Value >::internal_raw_data
private

Is flase whne the data vector is provided at construction. Then, we disallow initialization form input and do not delete data pointer in destructor.

Definition at line 99 of file field_elementwise.hh.

template<int spacedim, class Value >
const Mesh* FieldElementwise< spacedim, Value >::mesh_
private

Definition at line 115 of file field_elementwise.hh.

template<int spacedim, class Value >
unsigned int FieldElementwise< spacedim, Value >::n_components_
private

Size of Value.

Definition at line 112 of file field_elementwise.hh.

template<int spacedim, class Value >
unsigned int FieldElementwise< spacedim, Value >::n_entities_
private

Number of rows in data_ buffer.

Definition at line 110 of file field_elementwise.hh.

template<int spacedim, class Value >
GmshMeshReader* FieldElementwise< spacedim, Value >::reader_
private

Definition at line 114 of file field_elementwise.hh.


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