Flow123d  DF_patch_fe_mechanics-5faa023
Public Member Functions | Protected Attributes | Friends | List of all members
PatchOp< spacedim > Class Template Referenceabstract

Class represents element or FE operations. More...

#include <patch_op.hh>

Collaboration diagram for PatchOp< spacedim >:
Collaboration graph
[legend]

Public Member Functions

 PatchOp (uint dim, PatchFEValues< spacedim > &pfev, std::initializer_list< uint > shape, OpSizeType size_type, uint n_dofs=1)
 
virtual ~PatchOp ()
 Destructor. More...
 
std::vector< uintset_shape_vec (std::initializer_list< uint > shape) const
 Aligns shape_vec to 2 items (equal to matrix number of dimensions) More...
 
uint n_comp () const
 
ElemDomain domain () const
 Getter for bulk_side flag. More...
 
OpSizeType size_type () const
 Getter for size_type_. More...
 
uint n_dofs () const
 Getter for n_dofs_. More...
 
PatchOp< spacedim > * input_ops (uint i_op) const
 Return pointer to operation of i_op index in input operation vector. More...
 
const std::vector< uint > & shape () const
 Getter for shape_. More...
 
std::string format_shape () const
 
void allocate_result (size_t data_size, PatchArena &arena)
 
void allocate_const_result (ArenaVec< double > &value_vec)
 
Eigen::Map< Eigen::Matrix< ArenaVec< double >, Eigen::Dynamic, Eigen::Dynamic > > result_matrix ()
 Return map referenced result as Eigen::Vector. More...
 
Eigen::Map< Eigen::Matrix< ArenaVec< double >, Eigen::Dynamic, Eigen::Dynamic > > result_sub_matrix (uint i_dof)
 Return map referenced result of DOF values as Eigen::Matrix. More...
 
Eigen::Vector< ArenaVec< double >, Eigen::Dynamic > & raw_result ()
 Return map referenced result as Eigen::Vector. More...
 
const Eigen::Vector< ArenaVec< double >, Eigen::Dynamic > & raw_result () const
 Same as previous but return const reference. More...
 
PatchPointValues< spacedim > & ppv () const
 Return reference of PatchPointValues. More...
 
virtual void eval ()=0
 Reinit function of operation. Implementation in descendants. More...
 
template<class ValueType >
ValueType elem_value (uint point_idx) const
 
template<class ValueType >
ValueType point_value (uint point_idx, uint i_dof=0) const
 

Protected Attributes

uint dim_
 Dimension. More...
 
ElemDomain domain_
 Flag: BulkOp = 0, SideOp = 1. More...
 
std::vector< uintshape_
 Shape of stored data (size of vector or number of rows and cols of matrix) More...
 
Eigen::Vector< ArenaVec< double >, Eigen::Dynamic > result_
 Result matrix of operation. More...
 
OpSizeType size_type_
 Type of operation by size of vector (element, point or fixed size) More...
 
std::vector< PatchOp< spacedim > * > input_ops_
 Indices of operations in PatchPointValues::operations_ vector on which PatchOp is depended. More...
 
uint n_dofs_
 Number of DOFs of FE operations (or 1 in case of element operations) More...
 
PatchFEValues< spacedim > * patch_fe_
 Pointer to PatchFEValues object. More...
 

Friends

class PatchFEValues< spacedim >
 

Detailed Description

template<unsigned int spacedim = 3>
class PatchOp< spacedim >

Class represents element or FE operations.

Definition at line 45 of file patch_op.hh.

Constructor & Destructor Documentation

◆ PatchOp()

template<unsigned int spacedim = 3>
PatchOp< spacedim >::PatchOp ( uint  dim,
PatchFEValues< spacedim > &  pfev,
std::initializer_list< uint shape,
OpSizeType  size_type,
uint  n_dofs = 1 
)
inline

Constructor

Set all data members.

Definition at line 52 of file patch_op.hh.

◆ ~PatchOp()

template<unsigned int spacedim = 3>
virtual PatchOp< spacedim >::~PatchOp ( )
inlinevirtual

Destructor.

Definition at line 60 of file patch_op.hh.

Member Function Documentation

◆ allocate_const_result()

template<unsigned int spacedim = 3>
void PatchOp< spacedim >::allocate_const_result ( ArenaVec< double > &  value_vec)
inline

Definition at line 127 of file patch_op.hh.

◆ allocate_result()

template<unsigned int spacedim = 3>
void PatchOp< spacedim >::allocate_result ( size_t  data_size,
PatchArena arena 
)
inline

Definition at line 122 of file patch_op.hh.

Here is the caller graph for this function:

◆ domain()

template<unsigned int spacedim = 3>
ElemDomain PatchOp< spacedim >::domain ( ) const
inline

Getter for bulk_side flag.

Definition at line 87 of file patch_op.hh.

Here is the caller graph for this function:

◆ elem_value()

template<unsigned int spacedim = 3>
template<class ValueType >
ValueType PatchOp< spacedim >::elem_value ( uint  point_idx) const
inline

Returns output value of data stored by elements.

Parameters
point_idxIndex of quadrature point in ElementCacheMap

◆ eval()

template<unsigned int spacedim = 3>
virtual void PatchOp< spacedim >::eval ( )
pure virtual

◆ format_shape()

template<unsigned int spacedim = 3>
std::string PatchOp< spacedim >::format_shape ( ) const
inline

Format shape to string

Method is used in output development method.

Definition at line 116 of file patch_op.hh.

◆ input_ops()

template<unsigned int spacedim = 3>
PatchOp<spacedim>* PatchOp< spacedim >::input_ops ( uint  i_op) const
inline

Return pointer to operation of i_op index in input operation vector.

Definition at line 102 of file patch_op.hh.

◆ n_comp()

template<unsigned int spacedim = 3>
uint PatchOp< spacedim >::n_comp ( ) const
inline

Return number of operation components

Value is computed from shape_ vector

Definition at line 77 of file patch_op.hh.

Here is the caller graph for this function:

◆ n_dofs()

template<unsigned int spacedim = 3>
uint PatchOp< spacedim >::n_dofs ( ) const
inline

Getter for n_dofs_.

Definition at line 97 of file patch_op.hh.

Here is the caller graph for this function:

◆ point_value()

template<unsigned int spacedim = 3>
template<class ValueType >
ValueType PatchOp< spacedim >::point_value ( uint  point_idx,
uint  i_dof = 0 
) const
inline

Returns output value on quadrature point.

Parameters
point_idxIndex of quadrature point in ElementCacheMap
i_dofIndex of DOF

◆ ppv()

template<unsigned int spacedim = 3>
PatchPointValues<spacedim>& PatchOp< spacedim >::ppv ( ) const
inline

Return reference of PatchPointValues.

Definition at line 155 of file patch_op.hh.

◆ raw_result() [1/2]

template<unsigned int spacedim = 3>
Eigen::Vector<ArenaVec<double>, Eigen::Dynamic>& PatchOp< spacedim >::raw_result ( )
inline

Return map referenced result as Eigen::Vector.

Definition at line 145 of file patch_op.hh.

◆ raw_result() [2/2]

template<unsigned int spacedim = 3>
const Eigen::Vector<ArenaVec<double>, Eigen::Dynamic>& PatchOp< spacedim >::raw_result ( ) const
inline

Same as previous but return const reference.

Definition at line 150 of file patch_op.hh.

◆ result_matrix()

template<unsigned int spacedim = 3>
Eigen::Map<Eigen::Matrix<ArenaVec<double>, Eigen::Dynamic, Eigen::Dynamic> > PatchOp< spacedim >::result_matrix ( )
inline

Return map referenced result as Eigen::Vector.

Definition at line 133 of file patch_op.hh.

Here is the caller graph for this function:

◆ result_sub_matrix()

template<unsigned int spacedim = 3>
Eigen::Map<Eigen::Matrix<ArenaVec<double>, Eigen::Dynamic, Eigen::Dynamic> > PatchOp< spacedim >::result_sub_matrix ( uint  i_dof)
inline

Return map referenced result of DOF values as Eigen::Matrix.

Definition at line 138 of file patch_op.hh.

Here is the caller graph for this function:

◆ set_shape_vec()

template<unsigned int spacedim = 3>
std::vector<uint> PatchOp< spacedim >::set_shape_vec ( std::initializer_list< uint shape) const
inline

Aligns shape_vec to 2 items (equal to matrix number of dimensions)

Definition at line 65 of file patch_op.hh.

◆ shape()

template<unsigned int spacedim = 3>
const std::vector<uint>& PatchOp< spacedim >::shape ( ) const
inline

Getter for shape_.

Definition at line 107 of file patch_op.hh.

Here is the caller graph for this function:

◆ size_type()

template<unsigned int spacedim = 3>
OpSizeType PatchOp< spacedim >::size_type ( ) const
inline

Getter for size_type_.

Definition at line 92 of file patch_op.hh.

Friends And Related Function Documentation

◆ PatchFEValues< spacedim >

template<unsigned int spacedim = 3>
friend class PatchFEValues< spacedim >
friend

Definition at line 188 of file patch_op.hh.

Member Data Documentation

◆ dim_

template<unsigned int spacedim = 3>
uint PatchOp< spacedim >::dim_
protected

Dimension.

Definition at line 181 of file patch_op.hh.

◆ domain_

template<unsigned int spacedim = 3>
ElemDomain PatchOp< spacedim >::domain_
protected

Flag: BulkOp = 0, SideOp = 1.

Definition at line 182 of file patch_op.hh.

◆ input_ops_

template<unsigned int spacedim = 3>
std::vector<PatchOp<spacedim> *> PatchOp< spacedim >::input_ops_
protected

Indices of operations in PatchPointValues::operations_ vector on which PatchOp is depended.

Definition at line 186 of file patch_op.hh.

◆ n_dofs_

template<unsigned int spacedim = 3>
uint PatchOp< spacedim >::n_dofs_
protected

Number of DOFs of FE operations (or 1 in case of element operations)

Definition at line 187 of file patch_op.hh.

◆ patch_fe_

template<unsigned int spacedim = 3>
PatchFEValues<spacedim>* PatchOp< spacedim >::patch_fe_
protected

Pointer to PatchFEValues object.

Definition at line 188 of file patch_op.hh.

◆ result_

template<unsigned int spacedim = 3>
Eigen::Vector<ArenaVec<double>, Eigen::Dynamic> PatchOp< spacedim >::result_
protected

Result matrix of operation.

Definition at line 184 of file patch_op.hh.

◆ shape_

template<unsigned int spacedim = 3>
std::vector<uint> PatchOp< spacedim >::shape_
protected

Shape of stored data (size of vector or number of rows and cols of matrix)

Definition at line 183 of file patch_op.hh.

◆ size_type_

template<unsigned int spacedim = 3>
OpSizeType PatchOp< spacedim >::size_type_
protected

Type of operation by size of vector (element, point or fixed size)

Definition at line 185 of file patch_op.hh.


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