ug4
|
Data import. More...
#include <data_import.h>
Public Types | |
typedef boost::function< void(const LocalVector &u, std::vector< std::vector< TData > > vvvLinDefect[], const size_t nip)> | LinDefectFunc |
type of evaluation function More... | |
Public Member Functions | |
void | add_jacobian (LocalMatrix &J, const number scale) |
compute jacobian for derivative w.r.t. non-system owned unknowns More... | |
virtual void | check_setup () |
checks if ready for evaluation More... | |
void | clear_fct () |
clear all evaluation functions More... | |
virtual void | clear_ips () |
removes the positions More... | |
virtual void | compute_lin_defect (LocalVector &u) |
compute lin defect More... | |
virtual bool | constant () const |
returns if data is constant More... | |
SmartPtr< ICplUserData< dim > > | data () |
returns the connected ICplUserData More... | |
virtual bool | data_given () const |
returns true if data given More... | |
DataImport (bool bLinDefect=true) | |
Constructor. More... | |
const TData * | deriv (size_t ip, size_t fct) const |
return the derivative w.r.t to local function at ip More... | |
const TData & | deriv (size_t ip, size_t fct, size_t dof) const |
return the derivative w.r.t to local function and dof at ip More... | |
TData * | lin_defect (size_t ip, size_t fct) |
returns the pointer to all linearized defects at one ip More... | |
const TData * | lin_defect (size_t ip, size_t fct) const |
returns the pointer to all linearized defects at one ip More... | |
TData & | lin_defect (size_t ip, size_t fct, size_t sh) |
returns the linearized defect More... | |
const TData & | lin_defect (size_t ip, size_t fct, size_t sh) const |
const access to lin defect More... | |
size_t | num_ip () const |
number of integration points More... | |
size_t | num_sh (size_t fct) const |
number of shapes for local function More... | |
const TData & | operator[] (size_t ip) const |
returns the data value at ip More... | |
const MathVector< dim > & | position (size_t i) const |
position of ip More... | |
void | set_data (SmartPtr< CplUserData< TData, dim > > spData) |
set the user data More... | |
template<typename TClass > | |
void | set_fct (ReferenceObjectID id, TClass *obj, void(TClass::*func)(const LocalVector &u, std::vector< std::vector< TData > > vvvLinDefect[], const size_t nip)) |
register evaluation of linear defect for a element More... | |
void | set_fct (ReferenceObjectID id, void(*func)(const LocalVector &u, std::vector< std::vector< TData > > vvvLinDefect[], const size_t nip)) |
register evaluation of linear defect for a element More... | |
void | set_global_ips (const MathVector< dim > *vPos, size_t numIP) |
sets the global positions More... | |
void | set_local_ips (const MathVector< dim > *vPos, size_t numIP, bool bMayChange=true) |
set the local integration points More... | |
void | set_local_ips (const MathVector< dim > *vPos, size_t numIP, int timePointSpec, bool bMayChange=true) |
set the local integration points More... | |
template<int ldim> | |
void | set_local_ips (const MathVector< ldim > *vPos, size_t numIP, bool bMayChange=true) |
set the local integration points More... | |
template<int ldim> | |
void | set_local_ips (const MathVector< ldim > *vPos, size_t numIP, int timePointSpec, bool bMayChange=true) |
set the local integration points More... | |
virtual void | set_roid (ReferenceObjectID id) |
sets the geometric object type More... | |
void | set_time_point (int timePointSpec) |
set the time point specification More... | |
virtual void | update_dof_sizes (const LocalIndices &ind) |
resize lin defect arrays More... | |
SmartPtr< CplUserData< TData, dim > > | user_data () |
returns the connected ICplUserData More... | |
const TData * | values () const |
returns the data value at ip More... | |
~DataImport () | |
Destructor. More... | |
Public Member Functions inherited from ug::IDataImport< dim > | |
const FunctionIndexMapping & | conn_map () const |
get function mapping of dependent data More... | |
IDataImport (bool compLinDefect=true) | |
Constructor. More... | |
const FunctionIndexMapping & | map () const |
get function mapping More... | |
size_t | num_fct () const |
number of functions More... | |
DiscPart | part () const |
returns if import is located in mass part (for time dependent problems) More... | |
void | set_comp_lin_defect (bool b) |
sets if lin defect is to be computed More... | |
void | set_expl_part () |
set to explicit part More... | |
void | set_map (const FunctionIndexMapping &map) |
set function group for linearization of defect More... | |
void | set_mass_part () |
sets if import is located in mass part (for time dependent problems) More... | |
void | set_none_part () |
set to no part More... | |
void | set_part (DiscPart part) |
sets part of import More... | |
void | set_rhs_part () |
sets if import is located in rhs part More... | |
void | set_stiff_part () |
sets if import is located in stiff part (default) More... | |
bool | zero_derivative () const |
returns if data depends on unknown functions More... | |
virtual | ~IDataImport () |
Protected Member Functions | |
void | cache_data_access () |
caches data access More... | |
void | check_ip (size_t ip) const |
checks in debug mode the correct index More... | |
void | check_ip_fct (size_t ip, size_t fct) const |
checks in debug mode the correct index More... | |
void | check_ip_fct_sh (size_t ip, size_t fct, size_t sh) const |
checks in debug mode the correct index More... | |
void | check_values () const |
checks in debug mode the correct index More... | |
void | resize_defect_array () |
resizes the lin defect arrays for current number of ips. More... | |
Protected Attributes | |
ReferenceObjectID | m_id |
current Geom Object More... | |
size_t | m_numIP |
number of ips More... | |
int | m_seriesID |
series number provided by export More... | |
SmartPtr< DependentUserData< TData, dim > > | m_spDependentUserData |
connected export (if depended data) More... | |
SmartPtr< CplUserData< TData, dim > > | m_spUserData |
connected UserData More... | |
LinDefectFunc | m_vLinDefectFunc [NUM_REFERENCE_OBJECTS] |
function pointers for all elem types More... | |
const TData * | m_vValue |
cached access to the UserData field More... | |
std::vector< size_t > | m_vvNumDoFPerFct |
number of functions and their dofs More... | |
std::vector< std::vector< std::vector< TData > > > | m_vvvLinDefect |
linearized defect (num_ip) x (num_fct) x (num_dofs(i)) More... | |
Protected Attributes inherited from ug::IDataImport< dim > | |
bool | m_bCompLinDefect |
indicates iff lin defect should be computed More... | |
FunctionIndexMapping | m_map |
Mapping for import fct. More... | |
DiscPart | m_part |
flag to indicate where import is located More... | |
SmartPtr< ICplUserData< dim > > | m_spICplUserData |
connected iexport More... | |
Data import.
A DataImport is used to import data into an ElemDisc.
typedef boost::function<void (const LocalVector& u, std::vector<std::vector<TData> > vvvLinDefect[], const size_t nip)> ug::DataImport< TData, dim >::LinDefectFunc |
type of evaluation function
|
inline |
Constructor.
References ug::DataImport< TData, dim >::clear_fct().
ug::DataImport< TData, dim >::~DataImport |
Destructor.
|
virtual |
compute jacobian for derivative w.r.t. non-system owned unknowns
compute the linearization only if the export parameter is 'at current time'
Implements ug::IDataImport< dim >.
References ug::LocalMatrix::access_by_map(), and UG_ASSERT.
|
protected |
caches data access
|
inlineprotected |
checks in debug mode the correct index
References UG_ASSERT.
Referenced by ug::DataImport< TData, dim >::operator[]().
|
inlineprotected |
checks in debug mode the correct index
Referenced by ug::DataImport< TData, dim >::lin_defect().
|
inlineprotected |
checks in debug mode the correct index
References UG_ASSERT.
Referenced by ug::DataImport< TData, dim >::lin_defect().
|
virtual |
checks if ready for evaluation
Implements ug::IDataImport< dim >.
References dim, ug::ROID_UNKNOWN, and UG_THROW.
|
inlineprotected |
checks in debug mode the correct index
References UG_ASSERT.
Referenced by ug::DataImport< TData, dim >::values().
void ug::DataImport< TData, dim >::clear_fct |
clear all evaluation functions
References ug::NUM_REFERENCE_OBJECTS.
Referenced by ug::DataImport< TData, dim >::DataImport().
|
virtual |
removes the positions
Implements ug::IDataImport< dim >.
|
inlinevirtual |
compute lin defect
compute the linearization only if the export parameter is 'at current time'
compute the linearization
Implements ug::IDataImport< dim >.
References ug::LocalVector::access_by_map(), ug::DataImport< TData, dim >::m_id, ug::DataImport< TData, dim >::m_numIP, ug::DataImport< TData, dim >::m_seriesID, ug::DataImport< TData, dim >::m_spUserData, ug::DataImport< TData, dim >::m_vLinDefectFunc, ug::DataImport< TData, dim >::m_vvvLinDefect, ug::IDataImport< dim >::map(), ug::DataImport< TData, dim >::num_ip(), and UG_ASSERT.
|
inlinevirtual |
returns if data is constant
This method, returns if the connected data is constant.
Implements ug::IDataImport< dim >.
References ug::DataImport< TData, dim >::data_given(), and ug::DataImport< TData, dim >::m_spUserData.
|
inlinevirtual |
returns the connected ICplUserData
Implements ug::IDataImport< dim >.
References ug::DataImport< TData, dim >::m_spUserData.
|
inlinevirtual |
returns true if data given
Implements ug::IDataImport< dim >.
References ug::DataImport< TData, dim >::m_spUserData.
Referenced by ug::DataImport< TData, dim >::constant(), and ug::DataImport< TData, dim >::position().
|
inline |
return the derivative w.r.t to local function at ip
References ug::DataImport< TData, dim >::m_seriesID, ug::DataImport< TData, dim >::m_spDependentUserData, and UG_ASSERT.
|
inline |
return the derivative w.r.t to local function and dof at ip
References ug::DataImport< TData, dim >::m_seriesID, ug::DataImport< TData, dim >::m_spDependentUserData, and UG_ASSERT.
|
inline |
returns the pointer to all linearized defects at one ip
References ug::DataImport< TData, dim >::check_ip_fct(), and ug::DataImport< TData, dim >::m_vvvLinDefect.
|
inline |
returns the pointer to all linearized defects at one ip
References ug::DataImport< TData, dim >::check_ip_fct(), and ug::DataImport< TData, dim >::m_vvvLinDefect.
|
inline |
returns the linearized defect
References ug::DataImport< TData, dim >::check_ip_fct_sh(), and ug::DataImport< TData, dim >::m_vvvLinDefect.
|
inline |
const access to lin defect
References ug::DataImport< TData, dim >::check_ip_fct_sh(), and ug::DataImport< TData, dim >::m_vvvLinDefect.
|
inline |
number of integration points
References ug::DataImport< TData, dim >::m_numIP.
Referenced by ug::DataImport< TData, dim >::compute_lin_defect().
|
inline |
number of shapes for local function
References ug::DataImport< TData, dim >::m_vvNumDoFPerFct, and UG_ASSERT.
|
inline |
returns the data value at ip
References ug::DataImport< TData, dim >::check_ip(), and ug::DataImport< TData, dim >::m_vValue.
|
inline |
position of ip
References ug::DataImport< TData, dim >::data_given(), ug::DataImport< TData, dim >::m_seriesID, ug::DataImport< TData, dim >::m_spUserData, and UG_THROW.
|
protected |
resizes the lin defect arrays for current number of ips.
References resize().
void ug::DataImport< TData, dim >::set_data | ( | SmartPtr< CplUserData< TData, dim > > | spData | ) |
set the user data
void ug::DataImport< TData, dim >::set_fct | ( | ReferenceObjectID | id, |
TClass * | obj, | ||
void(TClass::*)(const LocalVector &u, std::vector< std::vector< TData > > vvvLinDefect[], const size_t nip) | func | ||
) |
register evaluation of linear defect for a element
References func(), ug::NUM_REFERENCE_OBJECTS, and UG_THROW.
void ug::DataImport< TData, dim >::set_fct | ( | ReferenceObjectID | id, |
void(*)(const LocalVector &u, std::vector< std::vector< TData > > vvvLinDefect[], const size_t nip) | func | ||
) |
register evaluation of linear defect for a element
References func(), ug::NUM_REFERENCE_OBJECTS, and UG_THROW.
void ug::DataImport< TData, dim >::set_global_ips | ( | const MathVector< dim > * | vPos, |
size_t | numIP | ||
) |
sets the global positions
References UG_ASSERT.
void ug::DataImport< TData, dim >::set_local_ips | ( | const MathVector< dim > * | vPos, |
size_t | numIP, | ||
bool | bMayChange = true |
||
) |
set the local integration points
void ug::DataImport< TData, dim >::set_local_ips | ( | const MathVector< dim > * | vPos, |
size_t | numIP, | ||
int | timePointSpec, | ||
bool | bMayChange = true |
||
) |
set the local integration points
void ug::DataImport< TData, dim >::set_local_ips | ( | const MathVector< ldim > * | vPos, |
size_t | numIP, | ||
bool | bMayChange = true |
||
) |
set the local integration points
void ug::DataImport< TData, dim >::set_local_ips | ( | const MathVector< ldim > * | vPos, |
size_t | numIP, | ||
int | timePointSpec, | ||
bool | bMayChange = true |
||
) |
|
virtual |
sets the geometric object type
Implements ug::IDataImport< dim >.
References ug::ROID_UNKNOWN, and UG_THROW.
void ug::DataImport< TData, dim >::set_time_point | ( | int | timePointSpec | ) |
set the time point specification
|
virtual |
resize lin defect arrays
Implements ug::IDataImport< dim >.
References ug::FunctionIndexMapping::num_fct(), and UG_ASSERT.
|
inline |
returns the connected ICplUserData
References ug::DataImport< TData, dim >::m_spUserData.
|
inline |
returns the data value at ip
References ug::DataImport< TData, dim >::check_values(), and ug::DataImport< TData, dim >::m_vValue.
|
protected |
current Geom Object
Referenced by ug::DataImport< TData, dim >::compute_lin_defect().
|
protected |
number of ips
Referenced by ug::DataImport< TData, dim >::compute_lin_defect(), and ug::DataImport< TData, dim >::num_ip().
|
protected |
series number provided by export
Referenced by ug::DataImport< TData, dim >::compute_lin_defect(), ug::DataImport< TData, dim >::deriv(), and ug::DataImport< TData, dim >::position().
|
protected |
connected export (if depended data)
Referenced by ug::DataImport< TData, dim >::deriv().
|
protected |
|
protected |
function pointers for all elem types
Referenced by ug::DataImport< TData, dim >::compute_lin_defect().
|
protected |
cached access to the UserData field
Referenced by ug::DataImport< TData, dim >::operator[](), and ug::DataImport< TData, dim >::values().
|
protected |
number of functions and their dofs
Referenced by ug::DataImport< TData, dim >::num_sh().
|
protected |
linearized defect (num_ip) x (num_fct) x (num_dofs(i))
Referenced by ug::DataImport< TData, dim >::compute_lin_defect(), and ug::DataImport< TData, dim >::lin_defect().