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

This is a compositum for user data defined on 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 SmartPtr< base_typeref_type
 the attached UserData objects should have the same type as this class (i.e. they are "remapped") More...
 
- Public Types inherited from ug::UserData< TData, dim, void >
typedef TData data_type
 
typedef void return_type
 

Public Member Functions

void add (const SubsetGroup &ssg, SmartPtr< base_type > ref)
 Add 'UserData' object for all subsets in a given group. More...
 
void add (ConstSmartPtr< ISubsetHandler > ssh, const char *ss_names, SmartPtr< base_type > ref)
 Add 'UserData' object for all subsets by their names. More...
 
void add (int si, SmartPtr< base_type > ref)
 Add 'UserData' object for given subset index. More...
 
 CompositeUserData ()
 
 CompositeUserData (bool continuous)
 
virtual bool continuous () const
 returns if provided data is continuous over geometric object boundaries More...
 
SmartPtr< base_typeget (int si) const
 
SmartPtr< TCplUserDataget_coupled (int si)
 
bool has (int si) const
 Checks if anything is assigned to a given subset index. More...
 
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
 

Private Member Functions

void check (int si) const
 

Private Attributes

bool m_bContinuous
 
bool m_bRequiresGridFunction
 
std::vector< SmartPtr< base_type > > m_vData
 

Additional Inherited Members

- 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 defined on different subsets.

This combines user data objects defined on several subsets which is handy, but may be 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

◆ ref_type

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

the attached UserData objects should have the same type as this class (i.e. they are "remapped")

◆ 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() [1/2]

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

◆ CompositeUserData() [2/2]

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() [1/3]

template<typename TData , int dim, typename TRet = void>
void ug::CompositeUserData< TData, dim, TRet >::add ( const SubsetGroup ssg,
SmartPtr< base_type ref 
)
inline

Add 'UserData' object for all subsets in a given group.

Parameters
ssgthe subset group
refpointer to the user-data object

References ug::CompositeUserData< TData, dim, TRet >::add(), and ug::SubsetGroup::size().

◆ add() [2/3]

template<typename TData , int dim, typename TRet = void>
void ug::CompositeUserData< TData, dim, TRet >::add ( ConstSmartPtr< ISubsetHandler ssh,
const char *  ss_names,
SmartPtr< base_type ref 
)
inline

Add 'UserData' object for all subsets by their names.

Parameters
sshsubset handler of the domain
ss_namesnames of the subdomains
refpointer to the user-data object

References ug::SubsetGroup::add(), ug::CompositeUserData< TData, dim, TRet >::add(), and ug::TokenizeTrimString().

◆ add() [3/3]

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

◆ check()

template<typename TData , int dim, typename TRet = void>
void ug::CompositeUserData< TData, dim, TRet >::check ( int  si) const
inlineprivate

◆ 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_bContinuous.

◆ get()

template<typename TData , int dim, typename TRet = void>
SmartPtr<base_type> ug::CompositeUserData< TData, dim, TRet >::get ( int  si) const
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) const
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

◆ 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

◆ 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

◆ 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

◆ 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

◆ 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_bContinuous

template<typename TData , int dim, typename TRet = void>
bool ug::CompositeUserData< TData, dim, TRet >::m_bContinuous
private

◆ m_bRequiresGridFunction

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

◆ m_vData


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