33 #ifndef __LIB_DISC__COMPOSITE_USER_DATA_H_
34 #define __LIB_DISC__COMPOSITE_USER_DATA_H_
43 template <
typename TData,
int dim,
typename TRet =
void>
69 {
return (
find(si)->second); }
76 {
return (
has(si) &&
find(si)->second.template is_of_type<TCplUserData>()); }
79 {
return find(si)->second.template cast_dynamic<TCplUserData>(); }
100 {
return (*
find(si)->second)(value, globIP, time, si); }
105 number time,
int si,
const size_t nip)
const
106 {
return (*
find(si)->second)(vValue, vGlobIP, time, si, nip); }
119 return (*
find(si)->second)(vValue, vGlobIP, time, si, elem, vCornerCoords, vLocIP, nip, u, vJT);
132 return (*
find(si)->second)(vValue, vGlobIP, time, si, elem, vCornerCoords, vLocIP, nip, u, vJT);
145 return (*
find(si)->second)(vValue, vGlobIP, time, si, elem, vCornerCoords, vLocIP, nip, u, vJT);
151 typename map_type::const_iterator
find(
int si)
const
153 typename map_type::const_iterator it =
m_map.find(si);
Definition: smart_pointer.h:108
This is a compositum for user data from different subsets.
Definition: composite_user_data.h:45
virtual TRet operator()(TData &value, const MathVector< dim > &globIP, number time, int si) const
returns value for a global position
Definition: composite_user_data.h:97
bool has(int si)
Definition: composite_user_data.h:71
map_type m_map
Definition: composite_user_data.h:158
SmartPtr< TCplUserData > get_coupled(int si)
Definition: composite_user_data.h:78
UserData< TData, dim, TRet > base_type
Definition: composite_user_data.h:49
virtual ~CompositeUserData()
Definition: composite_user_data.h:56
virtual void operator()(TData vValue[], const MathVector< dim > vGlobIP[], number time, int si, const size_t nip) const
returns values for global positions
Definition: composite_user_data.h:103
void add(int si, ref_type ref)
! Add 'UserData' for given subset index.
Definition: composite_user_data.h:59
virtual bool continuous() const
returns if provided data is continuous over geometric object boundaries
Definition: composite_user_data.h:86
virtual bool requires_grid_fct() const
returns true, if at least one of the underlying UserData requires grid functions.
Definition: composite_user_data.h:91
bool is_coupled(int si)
Definition: composite_user_data.h:75
bool m_bRequiresGridFunction
Definition: composite_user_data.h:160
CompositeUserData(bool continuous)
Definition: composite_user_data.h:53
map_type::const_iterator find(int si) const
Definition: composite_user_data.h:151
std::map< int, ref_type > map_type
Definition: composite_user_data.h:51
bool m_continuous
Definition: composite_user_data.h:159
virtual void operator()(TData vValue[], const MathVector< dim > vGlobIP[], number time, int si, GridObject *elem, const MathVector< dim > vCornerCoords[], const MathVector< 3 > vLocIP[], const size_t nip, LocalVector *u, const MathMatrix< 3, dim > *vJT=NULL) const
Definition: composite_user_data.h:135
ref_type get(int si)
Definition: composite_user_data.h:68
CplUserData< TData, dim, TRet > TCplUserData
Definition: composite_user_data.h:47
virtual void operator()(TData vValue[], const MathVector< dim > vGlobIP[], number time, int si, GridObject *elem, const MathVector< dim > vCornerCoords[], const MathVector< 1 > vLocIP[], const size_t nip, LocalVector *u, const MathMatrix< 1, dim > *vJT=NULL) const
Definition: composite_user_data.h:109
virtual void operator()(TData vValue[], const MathVector< dim > vGlobIP[], number time, int si, GridObject *elem, const MathVector< dim > vCornerCoords[], const MathVector< 2 > vLocIP[], const size_t nip, LocalVector *u, const MathMatrix< 2, dim > *vJT=NULL) const
Definition: composite_user_data.h:122
SmartPtr< base_type > ref_type
Definition: composite_user_data.h:50
Type based UserData.
Definition: user_data.h:501
The base class for all geometric objects, such as vertices, edges, faces, volumes,...
Definition: grid_base_objects.h:157
Definition: local_algebra.h:198
A class for fixed size, dense matrices.
Definition: math_matrix.h:52
Type based UserData.
Definition: user_data.h:143
#define UG_ASSERT(expr, msg)
Definition: assert.h:70
double number
Definition: types.h:124