33 #ifndef __H__UG__LIB_DISC__SPATIAL_DISC__DATA_EXPORT_IMPL__
34 #define __H__UG__LIB_DISC__SPATIAL_DISC__DATA_EXPORT_IMPL__
45 template <
typename TData,
int dim>
53 template <
typename TData,
int dim>
63 template <
typename TData,
int dim>
75 std::vector<std::vector<TData> > vvvDeriv[],
82 UG_THROW(
"DataExport: no evaluation function set for "<<
83 roid<<
" (world dim: "<<
dim<<
", ref dim: "<<refDim<<
").");
85 (
func)(vValue,vGlobIP,time,si,*u,elem,
86 vCornerCoords,vLocIP,nip, bDeriv, vvvDeriv);
89 template <
typename TData,
int dim>
90 template <
typename TClass,
int refDim>
93 void (TClass::*
func)( TData vValue[],
102 std::vector<std::vector<TData> > vvvDeriv[]))
105 UG_THROW(
"Reference Object id invalid: "<<
id);
110 template <
typename TData,
int dim>
111 template <
int refDim>
114 void (*
func)( TData vValue[],
123 std::vector<std::vector<TData> > vvvDeriv[]))
126 UG_THROW(
"Reference Object id invalid: "<<
id);
131 template <
typename TData,
int dim>
137 case 1:
if(eval_fct<1>(
id).valid()) bRes =
true;
break;
138 case 2:
if(eval_fct<2>(
id).valid()) bRes =
true;
break;
139 case 3:
if(eval_fct<3>(
id).valid()) bRes =
true;
break;
140 default:
UG_THROW(
"DataExport: Dimension "<<d<<
" not supported.");
146 template <
typename TData,
int dim>
150 m_vDependData.push_back(data);
153 template <
typename TData,
int dim>
157 m_vDependData.erase(remove(m_vDependData.begin(),
160 m_vDependData.end());
Definition: smart_pointer.h:108
Definition: data_export.h:318
Data export.
Definition: data_export.h:150
bool eval_fct_set(ReferenceObjectID id) const
Definition: data_export_impl.h:132
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
void remove_needed_data(SmartPtr< ICplUserData< dim > > data)
remove needed data
Definition: data_export_impl.h:155
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
DataExport(const char *functions)
default constructor
Definition: data_export_impl.h:46
The base class for all geometric objects, such as vertices, edges, faces, volumes,...
Definition: grid_base_objects.h:157
virtual ReferenceObjectID reference_object_id() const =0
Base class for UserData.
Definition: user_data.h:260
Definition: local_algebra.h:198
void access_by_map(const FunctionIndexMapping &funcMap)
access only part of the functions using mapping (restrict functions)
Definition: local_algebra.h:306
A class for fixed size, dense matrices.
Definition: math_matrix.h:52
Definition: std_user_data.h:133
#define UG_THROW(msg)
Definition: error.h:57
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
int ReferenceElementDimension(ReferenceObjectID roid)
returns the reference element dimension at run-time
Definition: reference_element_util.h:40
function func(x, y, z, t, si)