ug4
ug::GlobAttachmentElementUserData< WDim, TData > Class Template Reference

#include <glob_attachment_user_data.h>

+ Inheritance diagram for ug::GlobAttachmentElementUserData< WDim, TData >:

Public Member Functions

virtual void compute (LocalVector *u, GridObject *elem, const MathVector< dim > vCornerCoords[], bool bDeriv=false)
 compute values (and derivatives iff compDeriv == true) More...
 
virtual void compute (LocalVectorTimeSeries *u, GridObject *elem, const MathVector< dim > vCornerCoords[], bool bDeriv=false)
 compute values (and derivatives iff compDeriv == true, but only for the 'current' time point) More...
 
virtual bool continuous () const
 returns if provided data is continuous over geometric object boundaries More...
 
template<int refDim>
void evaluate (data_type vValue[], const MathVector< dim > vGlobIP[], number time, int si, GridObject *elem, const MathVector< dim > vCornerCoords[], const MathVector< refDim > vLocIP[], const size_t nip, LocalVector *u, const MathMatrix< refDim, dim > *vJT=NULL) const
 
 GlobAttachmentElementUserData (SmartPtr< Grid > grid, const char *name)
 constructor More...
 
virtual void operator ()(data_type &value
 
virtual void operator ()(data_type vValue[]
 
virtual bool requires_grid_fct () const
 returns if grid function is needed for evaluation More...
 
- Public Member Functions inherited from ug::StdUserData< GlobAttachmentElementUserData< WDim, number >, number, WDim >
virtual void operator() (number &value, const MathVector< dim > &globIP, number time, int si) const=0
 returns value for a global position More...
 
virtual void operator() (number vValue[], const MathVector< dim > vGlobIP[], number time, int si, const size_t nip) const=0
 returns value for global positions More...
 
virtual void operator() (number 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() (number 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() (number 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
 
- Public Member Functions inherited from ug::CplUserData< TData, dim, TRet >
bool defined (size_t s, size_t ip) const
 returns flag, if data is evaluated (for conditional data) More...
 
size_t num_ip (size_t s) const
 returns the number of integration points More...
 
size_t num_series () const
 explicitly forward some functions More...
 
void register_storage_callback (DataImport< TData, dim > *obj, void(DataImport< TData, dim >::*func)())
 register external callback, invoked when data storage changed More...
 
void unregister_storage_callback (DataImport< TData, dim > *obj)
 register all callbacks registered by class More...
 
TData & value (size_t s, size_t ip)
 returns the value at ip More...
 
const TData & value (size_t s, size_t ip) const
 returns the value at ip More...
 
TData * values (size_t s)
 returns all values for a series More...
 
const TData * values (size_t s) const
 returns all values for a series More...
 
 ~CplUserData ()
 destructor More...
 
- Public Member Functions inherited from ug::ICplUserData< dim >
bool at_current_time (size_t s) const
 returns true iff the time point specification is equal to the current one, or not specified More...
 
virtual void check_setup () const
 returns if the dependent data is ready for evaluation More...
 
void clear ()
 clear all data More...
 
virtual bool constant () const
 returns if data is constant More...
 
int dim_local_ips () const
 returns current local ip dimension More...
 
 ICplUserData ()
 default constructor More...
 
const MathVector< dim > & ip (size_t s, size_t ip) const
 returns global ip More...
 
const MathVector< dim > * ips (size_t s) const
 returns global ips More...
 
template<int ldim>
const MathVector< ldim > & local_ip (size_t s, size_t ip) const
 returns local ip More...
 
template<int ldim>
const MathVector< ldim > * local_ips (size_t s) const
 returns local ips More...
 
virtual SmartPtr< ICplUserDataneeded_data (size_t i)
 return needed data More...
 
size_t num_ip (size_t s) const
 returns the number of integration points More...
 
virtual size_t num_needed_data () const
 number of other Data this data depends on More...
 
size_t num_series () const
 returns the number of ip series More...
 
template<int ldim>
size_t register_local_ip_series (const MathVector< ldim > *vPos, const size_t numIP, bool bMayChange=true)
 set local positions without the specification of the time point, returns series id More...
 
template<int ldim>
size_t register_local_ip_series (const MathVector< ldim > *vPos, const size_t numIP, const int timePointSpec, bool bMayChange=true)
 set local positions, returns series id More...
 
void set_global_ips (size_t s, const MathVector< dim > *vPos, size_t numIP)
 set global positions More...
 
template<int ldim>
void set_local_ips (const size_t seriesId, const MathVector< ldim > *vPos, const size_t numIP)
 sets new local ip positions for a local ip series More...
 
void set_subset (int si)
 set the subset of evaluation More...
 
void set_time_point (const size_t seriesId, const int timePointSpec)
 sets a new time point for a local ip series More...
 
void set_time_point (size_t timePoint)
 sets the current time point More...
 
void set_times (const std::vector< number > &vTime)
 set evaluation time More...
 
int subset () const
 returns the subset of evaluation More...
 
number time () const
 get the current evaluation time More...
 
number time (size_t s) const
 get the specified evaluation time More...
 
size_t time_point ()
 returns the current time point More...
 
size_t time_point (size_t s) const
 returns the time point specification (in particular, the current one, if the own one not specified) More...
 
int time_point_specification (size_t s) const
 returns the time point specification (note: it may be -1, i.e. not specified) More...
 
virtual void update_dof_sizes (const LocalIndices &ind)
 resize arrays More...
 
virtual bool zero_derivative () const
 returns if data depends on solution More...
 
virtual ~ICplUserData ()
 virtual desctructor More...
 
- 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...
 
- 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) const=0
 returns value for a global position More...
 
virtual void operator() (TData &value, const MathVector< dim > &globIP, number time, int si, Vertex *vrt) const
 returns a value at a vertex More...
 
virtual void operator() (TData vValue[], const MathVector< dim > vGlobIP[], number time, int si, const size_t nip) const=0
 returns values for global positions 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
 
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=0
 
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=0
 
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=0
 

Public Attributes

virtual void const MathVector< dim > number int si const
 
virtual void const MathVector< dim > number int const size_t nip const
 
virtual void const MathVector< dim > & globIP
 
virtual void const MathVector< dim > number int si
 
virtual void const MathVector< dim > number time
 
virtual void const MathVector< dimvGlobIP []
 

Private Types

typedef Attachment< data_typeattachment_type
 
typedef TData data_type
 
typedef grid_dim_traits< dim >::grid_base_object elem_type
 

Private Member Functions

void eval_on_elem (elem_type *elem, const size_t nip, data_type vValue[]) const
 Evalutation of the attachment in one element. More...
 

Private Attributes

Grid::AttachmentAccessor< elem_type, attachment_typem_aatt
 
attachment_type m_att
 
std::string m_attachment_name
 
SmartPtr< Gridm_spGrid
 

Static Private Attributes

static const int dim = WDim
 

Additional Inherited Members

- Public Types inherited from ug::CplUserData< TData, dim, TRet >
typedef ICplUserData< dimbase_type
 type of base class More...
 
- Public Types inherited from ug::UserData< TData, dim, void >
typedef TData data_type
 
typedef void return_type
 
- Protected Member Functions inherited from ug::StdUserData< GlobAttachmentElementUserData< WDim, number >, number, WDim >
GlobAttachmentElementUserData< WDim, number > & getImpl ()
 access to implementation More...
 
const GlobAttachmentElementUserData< WDim, number > & getImpl () const
 const access to implementation More...
 
- Protected Member Functions inherited from ug::CplUserData< TData, dim, TRet >
void call_storage_callback () const
 calls are registered external storage callbacks More...
 
void check_series (size_t s) const
 checks in debug mode the correct index More...
 
void check_series_ip (size_t s, size_t ip) const
 checks in debug mode the correct index More...
 
virtual void local_ip_series_added (const size_t seriesID)
 resizes the data field, when local ip changed signaled More...
 
virtual void local_ip_series_to_be_cleared ()
 free the data field memory and set series to zero More...
 
virtual void local_ips_changed (const size_t seriesID, const size_t newNumIP)
 implement callback, called when local IPs changed More...
 
virtual void value_storage_changed (const size_t seriesID)
 callback, invoked when storage of data has changed for a series More...
 
- Protected Member Functions inherited from ug::ICplUserData< dim >
void check_s (size_t s) const
 checks in debug mode the correct usage of indices More...
 
void check_s_ip (size_t s, size_t ip) const
 checks in debug mode the correct usage of indices More...
 
std::vector< const MathVector< 1 > * > & get_local_ips (Int2Type< 1 >)
 help function to get local ips More...
 
const std::vector< const MathVector< 1 > * > & get_local_ips (Int2Type< 1 >) const
 
std::vector< const MathVector< 2 > * > & get_local_ips (Int2Type< 2 >)
 
const std::vector< const MathVector< 2 > * > & get_local_ips (Int2Type< 2 >) const
 
std::vector< const MathVector< 3 > * > & get_local_ips (Int2Type< 3 >)
 
const std::vector< const MathVector< 3 > * > & get_local_ips (Int2Type< 3 >) const
 
virtual void global_ips_changed (const size_t seriesID, const MathVector< dim > *vPos, const size_t numIP)
 callback invoked after global ips have been changed More...
 
- Protected Attributes inherited from ug::ICplUserData< dim >
int m_defaultTimePoint
 default time point (or -1 if not specified) More...
 
int m_locPosDim
 dimension of local position (-1 indicates no dim set) More...
 
std::vector< const MathVector< 1 > * > m_pvLocIP1d
 local ips of dimension 1d-3d More...
 
std::vector< const MathVector< 2 > * > m_pvLocIP2d
 
std::vector< const MathVector< 3 > * > m_pvLocIP3d
 
int m_si
 subset for evaluation More...
 
size_t m_timePoint
 current time point (used if no explicit specification for series) More...
 
std::vector< bool > m_vMayChange
 flags if local ips may change More...
 
std::vector< size_t > m_vNumIP
 number of evaluation points (-1 indicates no ips set) More...
 
std::vector< numberm_vTime
 time for evaluation More...
 
std::vector< int > m_vTimePoint
 time points for the series More...
 
std::vector< const MathVector< dim > * > m_vvGlobPos
 global ips More...
 
- 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...
 

Member Typedef Documentation

◆ attachment_type

template<int WDim, typename TData = number>
typedef Attachment<data_type> ug::GlobAttachmentElementUserData< WDim, TData >::attachment_type
private

◆ data_type

template<int WDim, typename TData = number>
typedef TData ug::GlobAttachmentElementUserData< WDim, TData >::data_type
private

◆ elem_type

template<int WDim, typename TData = number>
typedef grid_dim_traits<dim>::grid_base_object ug::GlobAttachmentElementUserData< WDim, TData >::elem_type
private

Constructor & Destructor Documentation

◆ GlobAttachmentElementUserData()

Member Function Documentation

◆ compute() [1/2]

template<int WDim, typename TData = number>
virtual void ug::GlobAttachmentElementUserData< WDim, TData >::compute ( LocalVector u,
GridObject elem,
const MathVector< dim vCornerCoords[],
bool  bDeriv = false 
)
inlinevirtual

◆ compute() [2/2]

template<int WDim, typename TData = number>
virtual void ug::GlobAttachmentElementUserData< WDim, TData >::compute ( LocalVectorTimeSeries u,
GridObject elem,
const MathVector< dim vCornerCoords[],
bool  bDeriv = false 
)
inlinevirtual

◆ continuous()

template<int WDim, typename TData = number>
virtual bool ug::GlobAttachmentElementUserData< WDim, TData >::continuous ( ) const
inlinevirtual

returns if provided data is continuous over geometric object boundaries

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

◆ eval_on_elem()

template<int WDim, typename TData = number>
void ug::GlobAttachmentElementUserData< WDim, TData >::eval_on_elem ( elem_type elem,
const size_t  nip,
data_type  vValue[] 
) const
inlineprivate

Evalutation of the attachment in one element.

Parameters
elemthe element to evaluate on
nipnumber of the values to write
vValuearray for the values

References ug::ICplUserData< dim >::ip(), and ug::GlobAttachmentElementUserData< WDim, TData >::m_aatt.

Referenced by ug::GlobAttachmentElementUserData< WDim, TData >::compute(), and ug::GlobAttachmentElementUserData< WDim, TData >::evaluate().

◆ evaluate()

template<int WDim, typename TData = number>
template<int refDim>
void ug::GlobAttachmentElementUserData< WDim, TData >::evaluate ( data_type  vValue[],
const MathVector< dim vGlobIP[],
number  time,
int  si,
GridObject elem,
const MathVector< dim vCornerCoords[],
const MathVector< refDim >  vLocIP[],
const size_t  nip,
LocalVector u,
const MathMatrix< refDim, dim > *  vJT = NULL 
) const
inline

◆ operator() [1/2]

template<int WDim, typename TData = number>
virtual void ug::GlobAttachmentElementUserData< WDim, TData >::operator ( ) &
virtual

◆ operator() [2/2]

template<int WDim, typename TData = number>
virtual void ug::GlobAttachmentElementUserData< WDim, TData >::operator ( )
virtual

◆ requires_grid_fct()

template<int WDim, typename TData = number>
virtual bool ug::GlobAttachmentElementUserData< WDim, TData >::requires_grid_fct ( ) const
inlinevirtual

returns if grid function is needed for evaluation

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

Member Data Documentation

◆ const [1/2]

template<int WDim, typename TData = number>
virtual void const MathVector<dim> number int si ug::GlobAttachmentElementUserData< WDim, TData >::const
Initial value:
{
UG_THROW("GlobAttachmentElementUserData: Element required"
" for evaluation, but not passed. Cannot evaluate.")
#define UG_THROW(msg)
Definition: error.h:57

◆ const [2/2]

template<int WDim, typename TData = number>
virtual void const MathVector<dim> number int const size_t nip ug::GlobAttachmentElementUserData< WDim, TData >::const
Initial value:
{
UG_THROW("GlobAttachmentElementUserData: Element required"
" for evaluation, but not passed. Cannot evaluate.")

◆ dim

template<int WDim, typename TData = number>
const int ug::GlobAttachmentElementUserData< WDim, TData >::dim = WDim
staticprivate

◆ globIP

template<int WDim, typename TData = number>
virtual void const MathVector<dim>& ug::GlobAttachmentElementUserData< WDim, TData >::globIP

◆ m_aatt

◆ m_att

template<int WDim, typename TData = number>
attachment_type ug::GlobAttachmentElementUserData< WDim, TData >::m_att
private

◆ m_attachment_name

template<int WDim, typename TData = number>
std::string ug::GlobAttachmentElementUserData< WDim, TData >::m_attachment_name
private

◆ m_spGrid

template<int WDim, typename TData = number>
SmartPtr<Grid> ug::GlobAttachmentElementUserData< WDim, TData >::m_spGrid
private

◆ si

template<int WDim, typename TData = number>
virtual void const MathVector<dim> number int ug::GlobAttachmentElementUserData< WDim, TData >::si

◆ time

template<int WDim, typename TData = number>
void const MathVector< dim > number ug::GlobAttachmentElementUserData< WDim, TData >::time

◆ vGlobIP

template<int WDim, typename TData = number>
virtual void const MathVector<dim> ug::GlobAttachmentElementUserData< WDim, TData >::vGlobIP[]

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