ug4
|
combines several UserDatas to a new UserData of a specified type More...
#include <linker.h>
Public Member Functions | |
virtual void | check_setup () const |
returns if data is ok More... | |
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 (TData 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 |
virtual SmartPtr< ICplUserData< dim > > | needed_data (size_t i) |
return needed data More... | |
virtual size_t | num_input () const |
number of inputs More... | |
virtual size_t | num_needed_data () const |
number of other Data this data depends on More... | |
virtual void | 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 value for global positions More... | |
virtual bool | requires_grid_fct () const |
returns that a grid function is needed for evaluation More... | |
virtual void | set_function_pattern (ConstSmartPtr< FunctionPattern > fctPatt) |
updates the function group More... | |
virtual void | set_input (size_t i, SmartPtr< ICplUserData< dim > > input, SmartPtr< UserDataInfo > info) |
sets an input More... | |
void | set_num_input (size_t num) |
sets the number of inputs More... | |
virtual bool | zero_derivative () const |
returns if derivative is zero More... | |
bool | zero_derivative (size_t i) const |
returns if the derivative of the i'th input is zero More... | |
Public Member Functions inherited from ug::StdUserData< StdDataLinker< TImpl, TData, dim >, TData, dim, void, DependentUserData< TData, dim > > | |
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 |
Public Member Functions inherited from ug::DependentUserData< TData, dim > | |
DependentUserData () | |
default constructor More... | |
TData * | deriv (size_t s, size_t ip, size_t fct) |
returns the derivatives of the local function, at ip More... | |
const TData * | deriv (size_t s, size_t ip, size_t fct) const |
returns the derivatives of the local function, at ip More... | |
TData & | deriv (size_t s, size_t ip, size_t fct, size_t dof) |
returns the derivative of the local function, at ip and for a dof More... | |
const TData & | deriv (size_t s, size_t ip, size_t fct, size_t dof) const |
returns the derivative of the local function, at ip and for a dof More... | |
template<int ldim> | |
const MathVector< ldim > * | local_ips (size_t s) const |
returns local ips More... | |
size_t | num_ip (size_t s) const |
returns the number of integration points More... | |
size_t | num_series () const |
returns the number of ip series More... | |
size_t | num_sh (size_t fct) const |
number of shapes for local function More... | |
virtual void | update_dof_sizes (const LocalIndices &ind) |
resize lin defect arrays More... | |
DependentUserData (const char *symbFct) | |
DependentUserData (const std::string &symbFct) | |
DependentUserData (const std::vector< std::string > &symbFct) | |
void | set_functions (const char *symbFct) |
void | set_functions (const std::string &symbFct) |
void | set_functions (const std::vector< std::string > &symbFct) |
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... | |
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... | |
size_t | num_ip (size_t s) const |
returns the number of integration points 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 | ~ICplUserData () |
virtual desctructor More... | |
Public Member Functions inherited from ug::UserDataInfo | |
const FunctionGroup & | function_group () const |
Function Group of functions. More... | |
const FunctionIndexMapping & | map () 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... | |
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, 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 |
Protected Member Functions | |
template<int refDim> | |
void | eval_deriv (LocalVector *u, GridObject *elem, const MathVector< dim > vCornerCoords[], bool bDeriv=false) |
template<int refDim> | |
void | eval_deriv (LocalVectorTimeSeries *u, GridObject *elem, const MathVector< dim > vCornerCoords[], bool bDeriv=false) |
TImpl & | getImpl () |
access to implementation More... | |
const TImpl & | getImpl () const |
const access to implementation More... | |
virtual void | global_ips_changed (const size_t seriesID, const MathVector< dim > *vPos, const size_t numIP) |
forwards the global positions to the data inputs More... | |
size_t | input_common_fct (size_t i, size_t fct) const |
returns the number in the common FctGrp for a fct of an input More... | |
size_t | input_num_fct (size_t i) const |
returns number of functions the input depends on More... | |
virtual void | local_ip_series_added (const size_t seriesID) |
requests series id's from input data More... | |
virtual void | local_ip_series_to_be_cleared () |
requests cleaning of the ip series in the data inputs More... | |
virtual void | local_ips_changed (const size_t seriesID, const size_t newNumIP) |
forwards the local positions to the data inputs More... | |
size_t | series_id (size_t i, size_t s) const |
returns the series id set for the i'th input More... | |
Protected Member Functions inherited from ug::StdUserData< StdDataLinker< TImpl, TData, dim >, TData, dim, void, DependentUserData< TData, dim > > | |
StdDataLinker< TImpl, TData, dim > & | getImpl () |
access to implementation More... | |
const StdDataLinker< TImpl, TData, dim > & | getImpl () const |
const access to implementation More... | |
Protected Member Functions inherited from ug::DependentUserData< TData, dim > | |
void | check_s_ip (size_t s, size_t ip) const |
checks in debug mode the correct usage of indices More... | |
void | check_s_ip_fct (size_t s, size_t ip, size_t fct) const |
checks in debug mode the correct usage of indices More... | |
void | check_s_ip_fct_dof (size_t s, size_t ip, size_t fct, size_t dof) const |
checks in debug mode the correct usage of indices More... | |
void | extract_fct_grp () |
extracts the function group More... | |
void | resize_deriv_array () |
resizes the derivative arrays for current number of ips. More... | |
void | resize_deriv_array (const size_t seriesID) |
resizes the derivative arrays for current number of ips of a single series 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 | 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 |
Protected Attributes | |
std::vector< FunctionIndexMapping > | m_vMap |
Function mapping for each input relative to common FunctionGroup. More... | |
std::vector< SmartPtr< ICplUserData< dim > > > | m_vspICplUserData |
data input More... | |
std::vector< SmartPtr< UserDataInfo > > | m_vspUserDataInfo |
data input casted to IDependend data More... | |
std::vector< std::vector< size_t > > | m_vvSeriesID |
series id the linker uses to get data from input More... | |
Protected Attributes inherited from ug::DependentUserData< TData, dim > | |
std::vector< std::string > | m_SymbFct |
string of symbolic functions required More... | |
std::vector< size_t > | m_vvNumDoFPerFct |
number of functions and their dofs More... | |
std::vector< std::vector< std::vector< std::vector< TData > > > > | m_vvvvDeriv |
Derivatives. 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< number > | m_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... | |
Additional Inherited Members | |
Public Types inherited from ug::DependentUserData< TData, dim > | |
typedef CplUserData< TData, dim > | base_type |
Base class type. More... | |
Public Types inherited from ug::CplUserData< TData, dim, TRet > | |
typedef ICplUserData< dim > | base_type |
type of base class More... | |
Public Types inherited from ug::UserData< TData, dim, void > | |
typedef TData | data_type |
typedef void | return_type |
Static Public Member Functions inherited from ug::DependentUserData< TData, dim > | |
static void | set_zero (std::vector< std::vector< TData > > vvvDeriv[], const size_t nip) |
sets all derivative values to zero More... | |
combines several UserDatas to a new UserData of a specified type
This class provides data at integration points and implements the DependentUserData interface.
TData | output Data type |
dim | World dimension |
|
virtual |
|
virtual |
compute values (and derivatives iff compDeriv == true)
Implements ug::ICplUserData< dim >.
References ug::GridObject::base_object_id(), and UG_ASSERT.
|
virtual |
compute values (and derivatives iff compDeriv == true, but only for the 'current' time point)
Implements ug::ICplUserData< dim >.
References ug::GridObject::base_object_id(), UG_ASSERT, and UG_THROW.
|
virtual |
returns if provided data is continuous over geometric object boundaries
Implements ug::UserData< TData, dim, void >.
|
protected |
|
protected |
References s, and ug::LocalVectorTimeSeries::solution().
|
inline |
|
inlineprotected |
access to implementation
|
inlineprotected |
const access to implementation
|
protectedvirtual |
forwards the global positions to the data inputs
Reimplemented from ug::ICplUserData< dim >.
References UG_ASSERT.
|
inlineprotected |
returns the number in the common FctGrp for a fct of an input
References ug::StdDataLinker< TImpl, TData, dim >::m_vMap, ug::UserDataInfo::num_fct(), and UG_ASSERT.
Referenced by ug::ScaleAddLinker< TData, dim, TDataScale, TRet >::input_common_fct(), and ug::ScaleAddLinker< TData, dim, TDataScale, TRet >::scale_common_fct().
|
inlineprotected |
returns number of functions the input depends on
References ug::StdDataLinker< TImpl, TData, dim >::m_vspUserDataInfo, and UG_ASSERT.
Referenced by ug::ScaleAddLinker< TData, dim, TDataScale, TRet >::input_num_fct(), and ug::ScaleAddLinker< TData, dim, TDataScale, TRet >::scale_num_fct().
|
protectedvirtual |
requests series id's from input data
Reimplemented from ug::DependentUserData< TData, dim >.
References ug::DependentUserData< TData, dim >::local_ip_series_added(), s, UG_ASSERT, and UG_THROW.
|
protectedvirtual |
requests cleaning of the ip series in the data inputs
Reimplemented from ug::DependentUserData< TData, dim >.
References ug::DependentUserData< TData, dim >::local_ip_series_to_be_cleared(), and UG_ASSERT.
|
protectedvirtual |
forwards the local positions to the data inputs
Reimplemented from ug::DependentUserData< TData, dim >.
References ug::DependentUserData< TData, dim >::local_ips_changed(), s, UG_ASSERT, and UG_THROW.
|
inlinevirtual |
return needed data
Reimplemented from ug::ICplUserData< dim >.
References ug::StdDataLinker< TImpl, TData, dim >::m_vspICplUserData, and UG_ASSERT.
|
inlinevirtual |
number of inputs
References ug::StdDataLinker< TImpl, TData, dim >::num_needed_data().
|
inlinevirtual |
number of other Data this data depends on
Reimplemented from ug::ICplUserData< dim >.
References ug::StdDataLinker< TImpl, TData, dim >::m_vspICplUserData.
Referenced by ug::StdDataLinker< TImpl, TData, dim >::num_input().
|
virtual |
returns value for a global position
Implements ug::StdUserData< StdDataLinker< TImpl, TData, dim >, TData, dim, void, DependentUserData< TData, dim > >.
|
virtual |
returns value for global positions
Implements ug::StdUserData< StdDataLinker< TImpl, TData, dim >, TData, dim, void, DependentUserData< TData, dim > >.
|
virtual |
returns that a grid function is needed for evaluation
Reimplemented from ug::DependentUserData< TData, dim >.
Reimplemented in ug::ProjectionLinker< dim >, and ug::IntervalNumberLinker< dim >.
|
inlineprotected |
returns the series id set for the i'th input
References ug::StdDataLinker< TImpl, TData, dim >::m_vvSeriesID, s, and UG_ASSERT.
|
virtual |
updates the function group
Reimplemented from ug::DependentUserData< TData, dim >.
References ug::CreateFunctionIndexMapping(), ug::CreateUnionOfFunctionGroups(), and UG_CATCH_THROW.
|
inlinevirtual |
sets an input
References input(), ug::StdDataLinker< TImpl, TData, dim >::m_vspICplUserData, ug::StdDataLinker< TImpl, TData, dim >::m_vspUserDataInfo, and UG_ASSERT.
|
inline |
sets the number of inputs
References ug::StdDataLinker< TImpl, TData, dim >::m_vspICplUserData, and ug::StdDataLinker< TImpl, TData, dim >::m_vspUserDataInfo.
|
virtual |
returns if derivative is zero
Reimplemented from ug::DependentUserData< TData, dim >.
|
inline |
returns if the derivative of the i'th input is zero
References ug::StdDataLinker< TImpl, TData, dim >::m_vspICplUserData.
|
protected |
Function mapping for each input relative to common FunctionGroup.
Referenced by ug::StdDataLinker< TImpl, TData, dim >::input_common_fct().
|
protected |
data input
Referenced by ug::StdDataLinker< TImpl, TData, dim >::needed_data(), ug::StdDataLinker< TImpl, TData, dim >::num_needed_data(), ug::StdDataLinker< TImpl, TData, dim >::set_input(), ug::StdDataLinker< TImpl, TData, dim >::set_num_input(), and ug::StdDataLinker< TImpl, TData, dim >::zero_derivative().
|
protected |
data input casted to IDependend data
Referenced by ug::StdDataLinker< TImpl, TData, dim >::input_num_fct(), ug::StdDataLinker< TImpl, TData, dim >::set_input(), and ug::StdDataLinker< TImpl, TData, dim >::set_num_input().
|
protected |
series id the linker uses to get data from input
Referenced by ug::StdDataLinker< TImpl, TData, dim >::series_id().