33 #ifndef __H__UG__LIB_DISC__SPATIAL_DISC__DATA_EXPORT__
34 #define __H__UG__LIB_DISC__SPATIAL_DISC__DATA_EXPORT__
71 std::vector<std::vector<number> > vvvDeriv[],
120 template <
int refDim>
147 template <
typename TData,
int dim>
155 template <
int refDim>
166 std::vector<std::vector<TData> > vvvDeriv[],
170 template <
typename TClass,
int refDim>
172 void (TClass::*
func)( TData vValue[],
181 std::vector<std::vector<TData> > vvvDeriv[]));
184 template <
int refDim>
186 void (*
func)( TData vValue[],
195 std::vector<std::vector<TData> > vvvDeriv[]));
229 template <
int refDim>
241 std::vector<std::vector<TData> > vvvDeriv[])
const = 0;
246 template <
int refDim>
257 std::vector<std::vector<TData> > vvvDeriv[]);
271 std::vector<std::vector<TData> > vvvDeriv[])
const
273 m_f(vValue, vGlobIP,
time, si, u, elem, vCornerCoords, vLocIP, nip, bDeriv, vvvDeriv);
281 template <
typename TClass,
int refDim>
283 typedef void (TClass::*
MemFunc)(TData vValue[],
292 std::vector<std::vector<TData> > vvvDeriv[]);
306 std::vector<std::vector<TData> > vvvDeriv[])
const
308 ((
m_pObj)->*
m_mf)(vValue, vGlobIP,
time, si, u, elem, vCornerCoords, vLocIP, nip, bDeriv, vvvDeriv);
317 template <
int refDim>
322 template <
typename FreeFunc>
325 template <
typename TClass,
typename MemFunc>
337 std::vector<std::vector<TData> > vvvDeriv[])
const
339 (*m_spImpl)(vValue, vGlobIP,
time, si, u, elem, vCornerCoords, vLocIP, nip, bDeriv, vvvDeriv);
350 template <
int refDim>
352 template <
int refDim>
Definition: smart_pointer.h:296
Definition: smart_pointer.h:108
Definition: data_export.h:247
void operator()(TData vValue[], const MathVector< dim > vGlobIP[], number time, int si, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[], const MathVector< refDim > vLocIP[], const size_t nip, bool bDeriv, std::vector< std::vector< TData > > vvvDeriv[]) const
Definition: data_export.h:262
void(* FreeFunc)(TData vValue[], const MathVector< dim > vGlobIP[], number time, int si, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[], const MathVector< refDim > vLocIP[], const size_t nip, bool bDeriv, std::vector< std::vector< TData > > vvvDeriv[])
Definition: data_export.h:248
FreeFunc m_f
Definition: data_export.h:277
FreeFunctionFunctor(FreeFunc f)
Definition: data_export.h:260
Definition: data_export.h:230
virtual void operator()(TData vValue[], const MathVector< dim > vGlobIP[], number time, int si, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[], const MathVector< refDim > vLocIP[], const size_t nip, bool bDeriv, std::vector< std::vector< TData > > vvvDeriv[]) const =0
virtual ~FunctorBase()
Definition: data_export.h:242
Definition: data_export.h:318
Functor(TClass *obj, MemFunc f)
Definition: data_export.h:326
bool invalid() const
Definition: data_export.h:343
void invalidate()
Definition: data_export.h:344
void operator()(TData vValue[], const MathVector< dim > vGlobIP[], number time, int si, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[], const MathVector< refDim > vLocIP[], const size_t nip, bool bDeriv, std::vector< std::vector< TData > > vvvDeriv[]) const
Definition: data_export.h:328
ConstSmartPtr< FunctorBase< refDim > > m_spImpl
Definition: data_export.h:347
Functor()
Definition: data_export.h:320
bool valid() const
Definition: data_export.h:342
Functor(FreeFunc f)
Definition: data_export.h:323
Definition: data_export.h:282
void operator()(TData vValue[], const MathVector< dim > vGlobIP[], number time, int si, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[], const MathVector< refDim > vLocIP[], const size_t nip, bool bDeriv, std::vector< std::vector< TData > > vvvDeriv[]) const
Definition: data_export.h:297
MemFunc m_mf
Definition: data_export.h:313
MemberFunctionFunctor(TClass *obj, MemFunc f)
Definition: data_export.h:295
void(TClass::* MemFunc)(TData vValue[], const MathVector< dim > vGlobIP[], number time, int si, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[], const MathVector< refDim > vLocIP[], const size_t nip, bool bDeriv, std::vector< std::vector< TData > > vvvDeriv[])
Definition: data_export.h:283
TClass * m_pObj
Definition: data_export.h:312
Data export.
Definition: data_export.h:150
bool eval_fct_set(ReferenceObjectID id) const
Definition: data_export_impl.h:132
Functor< 2 > m_vCompFct2d[NUM_REFERENCE_OBJECTS]
Definition: data_export.h:362
virtual bool continuous() const
returns if provided data is continuous over geometric object boundaries
Definition: data_export.h:216
void add_needed_data(SmartPtr< ICplUserData< dim > > data)
add data dependency
Definition: data_export_impl.h:148
void eval_and_deriv(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, bool bDeriv, int s, std::vector< std::vector< TData > > vvvDeriv[], const MathMatrix< refDim, dim > *vJT=NULL) const
Definition: data_export_impl.h:65
Functor< 3 > & eval_fct(ReferenceObjectID id, Int2Type< 3 >)
Definition: data_export.h:357
void remove_needed_data(SmartPtr< ICplUserData< dim > > data)
remove needed data
Definition: data_export_impl.h:155
Functor< 2 > & eval_fct(ReferenceObjectID id, Int2Type< 2 >)
Definition: data_export.h:356
void clear_fct()
clears all export functions
Definition: data_export_impl.h:54
void set_fct(ReferenceObjectID id, TClass *obj, void(TClass::*func)(TData vValue[], const MathVector< dim > vGlobIP[], number time, int si, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[], const MathVector< refDim > vLocIP[], const size_t nip, bool bDeriv, std::vector< std::vector< TData > > vvvDeriv[]))
register evaluation of export function
Definition: data_export_impl.h:92
std::vector< SmartPtr< ICplUserData< dim > > > m_vDependData
data the export depends on
Definition: data_export.h:369
const Functor< refDim > & eval_fct(ReferenceObjectID id) const
Definition: data_export.h:353
DataExport(const char *functions)
default constructor
Definition: data_export_impl.h:46
virtual bool requires_grid_fct() const
returns if grid function is needed for evaluation
Definition: data_export.h:219
Functor< 1 > & eval_fct(ReferenceObjectID id, Int2Type< 1 >)
Definition: data_export.h:355
const Functor< 3 > & eval_fct(ReferenceObjectID id, Int2Type< 3 >) const
Definition: data_export.h:360
const Functor< 2 > & eval_fct(ReferenceObjectID id, Int2Type< 2 >) const
Definition: data_export.h:359
virtual size_t num_needed_data() const
number of other Data this data depends on
Definition: data_export.h:210
virtual SmartPtr< ICplUserData< dim > > needed_data(size_t i)
return needed data
Definition: data_export.h:213
Functor< refDim > & eval_fct(ReferenceObjectID id)
Definition: data_export.h:351
const Functor< 1 > & eval_fct(ReferenceObjectID id, Int2Type< 1 >) const
Definition: data_export.h:358
void clear()
clear dependent data
Definition: data_export.h:201
Functor< 1 > m_vCompFct1d[NUM_REFERENCE_OBJECTS]
Definition: data_export.h:361
Functor< 3 > m_vCompFct3d[NUM_REFERENCE_OBJECTS]
Definition: data_export.h:363
Definition: data_export.h:86
virtual bool continuous() const
returns if provided data is continuous over geometric object boundaries
Definition: data_export.h:106
virtual void check_setup() const
returns if the dependent data is ready for evaluation
Definition: data_export.cpp:194
void eval_and_deriv(MathVector< dim > 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< MathVector< dim > > > vvvDeriv[], const MathMatrix< refDim, dim > *vJT=NULL) const
Definition: data_export.cpp:122
GradientDataExport(const char *functions)
Definition: data_export.h:88
The base class for all geometric objects, such as vertices, edges, faces, volumes,...
Definition: grid_base_objects.h:157
Base class for UserData.
Definition: user_data.h:260
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
Definition: std_user_data.h:133
Definition: data_export.h:56
void eval_and_deriv(number 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< number > > vvvDeriv[], const MathMatrix< refDim, dim > *vJT=NULL) const
Definition: data_export.cpp:44
virtual void check_setup() const
returns if the dependent data is ready for evaluation
Definition: data_export.cpp:100
virtual bool continuous() const
returns if provided data is continuous over geometric object boundaries
Definition: data_export.cpp:109
ValueDataExport(const char *functions)
Definition: data_export.h:58
Definition: data_export.h:116
VectorDataExport(const char *functions)
Definition: data_export.h:118
void eval_and_deriv(MathVector< dim > 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< MathVector< dim > > > vvvDeriv[], const MathMatrix< refDim, dim > *vJT=NULL) const
Definition: data_export.cpp:208
virtual bool continuous() const
returns if provided data is continuous over geometric object boundaries
Definition: data_export.cpp:276
virtual void check_setup() const
returns if the dependent data is ready for evaluation
Definition: data_export.cpp:267
double number
Definition: types.h:124
ReferenceObjectID
these ids are used to identify the shape of a geometric object.
Definition: grid_base_objects.h:74
@ NUM_REFERENCE_OBJECTS
Definition: grid_base_objects.h:85
function func(x, y, z, t, si)
Definition: metaprogramming_util.h:42
function ProblemDisc new(problemDesc, dom)