ug4
ug::CompositeUserData< TData, dim, TRet > Class Template Reference

This is a compositum for user data from different subsets. More...

#include <composite_user_data.h>

+ Inheritance diagram for ug::CompositeUserData< TData, dim, TRet >:

Public Types

typedef UserData< TData, dim, TRet > base_type
 
typedef std::map< int, ref_typemap_type
 
typedef SmartPtr< base_typeref_type
 
- Public Types inherited from ug::UserData< TData, dim, void >
typedef TData data_type
 
typedef void return_type
 

Public Member Functions

void add (int si, ref_type ref)
 ! Add 'UserData' for given subset index. More...
 
 CompositeUserData (bool continuous)
 
virtual bool continuous () const
 returns if provided data is continuous over geometric object boundaries More...
 
ref_type get (int si)
 
SmartPtr< TCplUserDataget_coupled (int si)
 
bool has (int si)
 
bool is_coupled (int si)
 
virtual TRet operator() (TData &value, const MathVector< dim > &globIP, number time, int si) const
 returns value for a global position More...
 
virtual void operator() (TData vValue[], const MathVector< dim > vGlobIP[], number time, int si, const size_t nip) const
 returns values for global positions More...
 
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
 
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
 
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
 
virtual bool requires_grid_fct () const
 returns true, if at least one of the underlying UserData requires grid functions. More...
 
virtual ~CompositeUserData ()
 
- Public Member Functions inherited from ug::UserData< TData, dim, void >
int get_dim () const
 returns dimension More...
 
virtual void operator() (TData &value, const MathVector< dim > &globIP, number time, int si, Vertex *vrt) const
 returns a value at a vertex More...
 
std::string type () const
 returns type of data as string (e.g. "Number", "Vector", "Matrix") More...
 
void operator() (TData &value, const MathVector< dim > &globIP, number time, int si, GridObject *elem, const MathVector< dim > vCornerCoords[], const MathVector< 1 > &locIP, LocalVector *u) const
 
void operator() (TData &value, const MathVector< dim > &globIP, number time, int si, GridObject *elem, const MathVector< dim > vCornerCoords[], const MathVector< 2 > &locIP, LocalVector *u) const
 
void operator() (TData &value, const MathVector< dim > &globIP, number time, int si, GridObject *elem, const MathVector< dim > vCornerCoords[], const MathVector< 3 > &locIP, LocalVector *u) const
 
- Public Member Functions inherited from ug::UserDataInfo
const FunctionGroupfunction_group () const
 Function Group of functions. More...
 
const FunctionIndexMappingmap () const
 get function mapping More...
 
size_t num_fct () const
 number of functions this export depends on More...
 
const char * obj_name ()
 gets the name of the object (s. the field m_objName) More...
 
virtual void set_function_pattern (ConstSmartPtr< FunctionPattern > fctPatt)
 sets the function pattern for a possibly needed grid function More...
 
void set_obj_name (const char *name)
 sets the name of the object (s. the field m_objName) More...
 
virtual ~UserDataInfo ()
 virtual destructor More...
 

Protected Types

typedef CplUserData< TData, dim, TRet > TCplUserData
 

Protected Member Functions

map_type::const_iterator find (int si) const
 

Protected Attributes

bool m_bRequiresGridFunction
 
bool m_continuous
 
map_type m_map
 
- Protected Attributes inherited from ug::UserDataInfo
FunctionGroup m_fctGrp
 functions the data depends on More...
 
FunctionIndexMapping m_map
 Mapping for import fct. More...
 
SmartPtr< char > m_objName
 This field is used mainly for debugging: One can assign a name to the object to identify it when running. More...
 

Detailed Description

template<typename TData, int dim, typename TRet = void>
class ug::CompositeUserData< TData, dim, TRet >

This is a compositum for user data from different subsets.

This is handy, but the implementation is rather slow.

Member Typedef Documentation

◆ base_type

template<typename TData , int dim, typename TRet = void>
typedef UserData<TData, dim, TRet> ug::CompositeUserData< TData, dim, TRet >::base_type

◆ map_type

template<typename TData , int dim, typename TRet = void>
typedef std::map<int, ref_type> ug::CompositeUserData< TData, dim, TRet >::map_type

◆ ref_type

template<typename TData , int dim, typename TRet = void>
typedef SmartPtr<base_type> ug::CompositeUserData< TData, dim, TRet >::ref_type

◆ TCplUserData

template<typename TData , int dim, typename TRet = void>
typedef CplUserData<TData, dim, TRet> ug::CompositeUserData< TData, dim, TRet >::TCplUserData
protected

Constructor & Destructor Documentation

◆ CompositeUserData()

template<typename TData , int dim, typename TRet = void>
ug::CompositeUserData< TData, dim, TRet >::CompositeUserData ( bool  continuous)
inline

◆ ~CompositeUserData()

template<typename TData , int dim, typename TRet = void>
virtual ug::CompositeUserData< TData, dim, TRet >::~CompositeUserData ( )
inlinevirtual

Member Function Documentation

◆ add()

template<typename TData , int dim, typename TRet = void>
void ug::CompositeUserData< TData, dim, TRet >::add ( int  si,
ref_type  ref 
)
inline

◆ continuous()

template<typename TData , int dim, typename TRet = void>
virtual bool ug::CompositeUserData< TData, dim, TRet >::continuous ( ) const
inlinevirtual

returns if provided data is continuous over geometric object boundaries

Implements ug::UserData< TData, dim, void >.

References ug::CompositeUserData< TData, dim, TRet >::m_continuous.

◆ find()

◆ get()

template<typename TData , int dim, typename TRet = void>
ref_type ug::CompositeUserData< TData, dim, TRet >::get ( int  si)
inline

◆ get_coupled()

template<typename TData , int dim, typename TRet = void>
SmartPtr<TCplUserData> ug::CompositeUserData< TData, dim, TRet >::get_coupled ( int  si)
inline

◆ has()

template<typename TData , int dim, typename TRet = void>
bool ug::CompositeUserData< TData, dim, TRet >::has ( int  si)
inline

◆ is_coupled()

template<typename TData , int dim, typename TRet = void>
bool ug::CompositeUserData< TData, dim, TRet >::is_coupled ( int  si)
inline

◆ operator()() [1/5]

template<typename TData , int dim, typename TRet = void>
virtual TRet ug::CompositeUserData< TData, dim, TRet >::operator() ( TData &  value,
const MathVector< dim > &  globIP,
number  time,
int  si 
) const
inlinevirtual

returns value for a global position

Implements ug::UserData< TData, dim, void >.

References ug::CompositeUserData< TData, dim, TRet >::find().

◆ operator()() [2/5]

template<typename TData , int dim, typename TRet = void>
virtual void ug::CompositeUserData< TData, dim, TRet >::operator() ( TData  vValue[],
const MathVector< dim vGlobIP[],
number  time,
int  si,
const size_t  nip 
) const
inlinevirtual

returns values for global positions

Implements ug::UserData< TData, dim, void >.

References ug::CompositeUserData< TData, dim, TRet >::find().

◆ operator()() [3/5]

template<typename TData , int dim, typename TRet = void>
virtual void ug::CompositeUserData< TData, dim, TRet >::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
inlinevirtual

returns values for local and global positions

Implements ug::UserData< TData, dim, void >.

References ug::CompositeUserData< TData, dim, TRet >::find().

◆ operator()() [4/5]

template<typename TData , int dim, typename TRet = void>
virtual void ug::CompositeUserData< TData, dim, TRet >::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
inlinevirtual

returns values for local and global positions

Implements ug::UserData< TData, dim, void >.

References ug::CompositeUserData< TData, dim, TRet >::find().

◆ operator()() [5/5]

template<typename TData , int dim, typename TRet = void>
virtual void ug::CompositeUserData< TData, dim, TRet >::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
inlinevirtual

returns values for local and global positions

Implements ug::UserData< TData, dim, void >.

References ug::CompositeUserData< TData, dim, TRet >::find().

◆ requires_grid_fct()

template<typename TData , int dim, typename TRet = void>
virtual bool ug::CompositeUserData< TData, dim, TRet >::requires_grid_fct ( ) const
inlinevirtual

returns true, if at least one of the underlying UserData requires grid functions.

Implements ug::UserData< TData, dim, void >.

References ug::CompositeUserData< TData, dim, TRet >::m_bRequiresGridFunction.

Member Data Documentation

◆ m_bRequiresGridFunction

template<typename TData , int dim, typename TRet = void>
bool ug::CompositeUserData< TData, dim, TRet >::m_bRequiresGridFunction
protected

◆ m_continuous

template<typename TData , int dim, typename TRet = void>
bool ug::CompositeUserData< TData, dim, TRet >::m_continuous
protected

◆ m_map

template<typename TData , int dim, typename TRet = void>
map_type ug::CompositeUserData< TData, dim, TRet >::m_map
protected

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