Flow123d  JS_before_hm-984-g3a19f2f
Classes | Public Types | Public Member Functions | Private Attributes | List of all members
FieldAddPotential< spacedim, Value > Class Template Reference

#include <field_add_potential.hh>

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

Classes

class  FieldFactory
 

Public Types

typedef Field< spacedim, Value >::FactoryBase FactoryBaseType
 
typedef Space< spacedim >::Point Point
 
- Public Types inherited from FieldAlgorithmBase< spacedim, Value >
typedef Space< spacedim >::Point Point
 

Public Member Functions

 FieldAddPotential (const arma::vec::fixed< spacedim+1 > &potential_grad, const Input::AbstractRecord &rec, unsigned int n_comp=0)
 
 FieldAddPotential (const arma::vec::fixed< spacedim+1 > &potential_grad, std::shared_ptr< FieldAlgorithmBase< spacedim, Value > > inner_field, unsigned int n_comp=0)
 
virtual Value::return_type const & value (const Point &p, const ElementAccessor< spacedim > &elm)
 
virtual void value_list (const Armor::array &point_list, const ElementAccessor< spacedim > &elm, std::vector< typename Value::return_type > &value_list)
 
bool set_time (const TimeStep &time) override
 
void set_mesh (const Mesh *mesh, bool boundary_domain) override
 Implements FieldAlgirithmBase::set_mesh. More...
 
virtual ~FieldAddPotential ()
 
- Public Member Functions inherited from FieldAlgorithmBase< spacedim, Value >
 FieldAlgorithmBase (unsigned int n_comp=0)
 
virtual void init_from_input (const Input::Record &rec, const struct FieldAlgoBaseInitData &init_data)
 
void set_component_idx (unsigned int idx)
 
unsigned int n_comp () const
 
FieldResult field_result () const
 
virtual double next_change_time ()
 
virtual void cache_update (FieldValueCache< typename Value::element_type > &data_cache, ElementCacheMap &cache_map, unsigned int region_idx)
 
virtual void set_native_dh (std::shared_ptr< DOFHandlerMultiDim >)
 
bool is_constant_in_space () const
 
virtual ~FieldAlgorithmBase ()
 

Private Attributes

std::shared_ptr< FieldAlgorithmBase< spacedim, Value > > inner_field_
 Field to which we add linear potential. More...
 
arma::vec::fixed< spacedim > grad_
 Potential gradient. More...
 
double zero_level_
 Potential constant term. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from FieldAlgorithmBase< spacedim, Value >
static std::string template_name ()
 
static Input::Type::Abstractget_input_type ()
 
static const Input::Type::Instanceget_input_type_instance (Input::Type::Selection value_selection=Input::Type::Selection())
 
static const Input::Type::Recordget_field_algo_common_keys ()
 
static std::shared_ptr< FieldAlgorithmBase< spacedim, Value > > function_factory (const Input::AbstractRecord &rec, const struct FieldAlgoBaseInitData &init_data)
 
- Static Public Attributes inherited from FieldAlgorithmBase< spacedim, Value >
static const unsigned int spacedim_ =spacedim
 
static constexpr bool is_enum_valued = std::is_same<typename Value::element_type, FieldEnum>::value
 
- Protected Member Functions inherited from FieldAlgorithmBase< spacedim, Value >
void init_unit_conversion_coefficient (const Input::Record &rec, const struct FieldAlgoBaseInitData &init_data)
 Init value of unit_conversion_coefficient_ from input. More...
 
- Protected Attributes inherited from FieldAlgorithmBase< spacedim, Value >
TimeStep 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...
 
unsigned int component_idx_
 Specify if the field is part of a MultiField and which component it is. More...
 
double unit_conversion_coefficient_
 Coeficient of conversion of user-defined unit. More...
 
bool is_constant_in_space_
 Flag detects that field is only dependent on time. More...
 

Detailed Description

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

This field is meant to be used to implement two possibilities for initialization of pressure fields in Darcy flows. You can either use pressure of piezo-metric head which are related by adding gravity potential. For various reasons we use pressure as the primary variable, so if the user enters piezo-head we need to add the potential to the field he/she has provided. This is done by this class. Unfortunately it introduce one more level of indirection, namely one more virtual call for getting the field value.

Definition at line 38 of file field_add_potential.hh.

Member Typedef Documentation

template<int spacedim, class Value >
typedef Field<spacedim, Value>::FactoryBase FieldAddPotential< spacedim, Value >::FactoryBaseType

Definition at line 40 of file field_add_potential.hh.

template<int spacedim, class Value >
typedef Space<spacedim>::Point FieldAddPotential< spacedim, Value >::Point

Definition at line 41 of file field_add_potential.hh.

Constructor & Destructor Documentation

template<int spacedim, class Value >
FieldAddPotential< spacedim, Value >::FieldAddPotential ( const arma::vec::fixed< spacedim+1 > &  potential_grad,
const Input::AbstractRecord rec,
unsigned int  n_comp = 0 
)

Definition at line 25 of file field_add_potential.impl.hh.

template<int spacedim, class Value >
FieldAddPotential< spacedim, Value >::FieldAddPotential ( const arma::vec::fixed< spacedim+1 > &  potential_grad,
std::shared_ptr< FieldAlgorithmBase< spacedim, Value > >  inner_field,
unsigned int  n_comp = 0 
)

Constructor allows to set existing Field as inner_field_

Definition at line 36 of file field_add_potential.impl.hh.

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

Definition at line 102 of file field_add_potential.impl.hh.

Member Function Documentation

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

Implements FieldAlgirithmBase::set_mesh.

Reimplemented from FieldAlgorithmBase< spacedim, Value >.

Definition at line 94 of file field_add_potential.impl.hh.

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

Update time and possibly update data.

Reimplemented from FieldAlgorithmBase< spacedim, Value >.

Definition at line 86 of file field_add_potential.impl.hh.

template<int spacedim, class Value >
Value::return_type const & FieldAddPotential< 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 51 of file field_add_potential.impl.hh.

template<int spacedim, class Value >
void FieldAddPotential< spacedim, Value >::value_list ( const Armor::array 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 69 of file field_add_potential.impl.hh.

Member Data Documentation

template<int spacedim, class Value >
arma::vec::fixed<spacedim> FieldAddPotential< spacedim, Value >::grad_
private

Potential gradient.

Definition at line 110 of file field_add_potential.hh.

template<int spacedim, class Value >
std::shared_ptr< FieldAlgorithmBase<spacedim, Value> > FieldAddPotential< spacedim, Value >::inner_field_
private

Field to which we add linear potential.

Definition at line 108 of file field_add_potential.hh.

template<int spacedim, class Value >
double FieldAddPotential< spacedim, Value >::zero_level_
private

Potential constant term.

Definition at line 112 of file field_add_potential.hh.


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