37 #ifndef __H__UG__LIB_DISC__SPATIAL_DISC__LINKER_ADAPTER__
38 #define __H__UG__LIB_DISC__SPATIAL_DISC__LINKER_ADAPTER__
47 :
public StdDataLinker< UserVectorEntryAdapter<dim>, number, dim>
72 (*m_spEncaps)(dummy, globIP,
time, si);
87 std::vector<encapsulated_type> dummy(nip);
90 (*m_spEncaps)(&dummy[0], vGlobIP,
time, si,
91 elem, vCornerCoords, vLocIP, nip, u, vJT);
94 for (
size_t ip=0;
ip<nip; ++
ip)
109 std::vector<std::vector<data_type > > vvvDeriv[],
115 for(
size_t ip = 0;
ip < nip; ++
ip)
122 this->set_zero(vvvDeriv, nip);
128 for(
size_t ip = 0;
ip < nip; ++
ip){
131 for(
size_t fct = 0; fct <
m_spDEncaps->num_fct(); ++fct)
140 for(
size_t sh = 0; sh < this->num_sh(commonFct); ++sh)
142 UG_ASSERT(commonFct < vvvDeriv[
ip].size(), commonFct<<
", "<<vvvDeriv[
ip].size());
143 vvvDeriv[
ip][commonFct][sh] += vDInputFct[sh][
m_index];
156 m_spDEncaps = data.template cast_dynamic<DependentUserData<encapsulated_type, dim> >();
Definition: smart_pointer.h:108
Type based UserData.
Definition: user_data.h:501
const TData & value(size_t s, size_t ip) const
returns the value at ip
Definition: user_data.h:512
The base class for all geometric objects, such as vertices, edges, faces, volumes,...
Definition: grid_base_objects.h:157
const MathVector< dim > & ip(size_t s, size_t ip) const
returns global ip
Definition: user_data.h:401
number time() const
get the current evaluation time
Definition: user_data.h:285
Definition: local_algebra.h:198
A class for fixed size, dense matrices.
Definition: math_matrix.h:52
combines several UserDatas to a new UserData of a specified type
Definition: linker.h:54
void set_num_input(size_t num)
sets the number of inputs
Definition: linker.h:107
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
Definition: linker.h:153
virtual void set_input(size_t i, SmartPtr< ICplUserData< dim > > input, SmartPtr< UserDataInfo > info)
sets an input
Definition: linker.h:114
virtual bool zero_derivative() const
returns if derivative is zero
Definition: linker_impl.h:179
StdDataLinker< UserVectorEntryAdapter< dim >, number, dim > base_type
Base class type.
Definition: adapter.h:51
void set_vector(SmartPtr< input_type > data, size_t index)
set conc import
Definition: adapter.h:153
SmartPtr< input_type > m_spEncaps
import for concentration
Definition: adapter.h:169
CplUserData< data_type, dim > user_data_base_type
Definition: adapter.h:54
void eval_and_deriv(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, bool bDeriv, int s, std::vector< std::vector< data_type > > vvvDeriv[], const MathMatrix< refDim, dim > *vJT=NULL) const
Definition: adapter.h:99
static const int _INPUT_
Definition: adapter.h:166
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
Definition: adapter.h:77
void evaluate(data_type &value, const MathVector< dim > &globIP, number time, int si) const
Definition: adapter.h:67
number data_type
Definition: adapter.h:53
UserVectorEntryAdapter()
Definition: adapter.h:61
MathVector< dim > encapsulated_type
Definition: adapter.h:56
SmartPtr< DependentUserData< encapsulated_type, dim > > m_spDEncaps
Definition: adapter.h:170
CplUserData< encapsulated_type, dim > input_type
Definition: adapter.h:57
size_t m_index
Definition: adapter.h:164
#define UG_ASSERT(expr, msg)
Definition: assert.h:70
double number
Definition: types.h:124