36 #ifndef __H__UG__PLUGINS__ELECTROMAGNETISM__NEDELEC_GF_USER_DATA__
37 #define __H__UG__PLUGINS__ELECTROMAGNETISM__NEDELEC_GF_USER_DATA__
55 namespace Electromagnetism{
61 template <
typename TGr
idFunc>
64 <NedelecGridFunctionData<TGridFunc>, MathVector<TGridFunc::dim>, TGridFunc::dim>
97 UG_CATCH_THROW (
"NedelecGridFunctionData: Function space does not contain"
98 " a function with name " << cmp <<
".");
102 UG_THROW (
"NedelecGridFunctionData: Function " << cmp
103 <<
"is not based on the Nedelec element.");
113 template <
int refDim>
135 UG_THROW (
"NedelecGridFunctionData: Derivatives are not implemented.");
138 std::vector<DoFIndex> ind;
140 if (ind.size() > maxEdges)
141 UG_THROW (
"NedelecGridFunctionData: Illegal number of DoFs!");
144 number dofValues [maxEdges];
145 for (
size_t sh = 0; sh < ind.size(); ++sh)
150 (
m_spGF->domain().
get(), elem, vCornerCoords, dofValues, vLocIP, nip, vValue);
158 template <
typename TGr
idFunc>
161 <NedelecCurlData<TGridFunc>, MathVector<TGridFunc::dim>, TGridFunc::dim>
194 UG_CATCH_THROW (
"NedelecCurlData: Function space does not contain"
195 " a function with name " << cmp <<
".");
199 UG_THROW (
"NedelecCurlData: Function " << cmp
200 <<
"is not based on the Nedelec element.");
210 template <
int refDim>
232 UG_THROW (
"NedelecCurlData: Derivatives are not implemented.");
235 std::vector<DoFIndex> ind;
237 if (ind.size() > maxEdges)
238 UG_THROW (
"NedelecGridFunctionData: Illegal number of DoFs!");
241 number dofValues [maxEdges];
242 for (
size_t sh = 0; sh < ind.size(); ++sh)
248 (
m_spGF->domain().
get(), elem, vCornerCoords, dofValues, curl);
249 for (
size_t ip = 0;
ip < nip;
ip++)
261 template <
typename TGr
idFunc>
264 <NedelecSigmaEData<TGridFunc>, MathVector<TGridFunc::dim>, TGridFunc::dim>
301 UG_CATCH_THROW (
"NedelecGridFunctionData: Function space does not contain"
302 " a function with name " << cmp <<
".");
306 UG_THROW (
"NedelecGridFunctionData: Function " << cmp
307 <<
"is not based on the Nedelec element.");
317 template <
int refDim>
339 UG_THROW (
"NedelecSigmaEData: Derivatives are not implemented.");
344 UG_THROW (
"NedelecSigmaEData: No material data set to subset" << si
345 <<
" (or this is a low-dim. domain).");
348 for (
size_t i = 0; i < nip; i++) vValue [i] = 0.0;
353 std::vector<DoFIndex> ind;
355 if (ind.size() > maxEdges)
356 UG_THROW (
"NedelecGridFunctionData: Illegal number of DoFs!");
359 number dofValues [maxEdges];
360 for (
size_t sh = 0; sh < ind.size(); ++sh)
365 (
m_spGF->domain().
get(), elem, vCornerCoords, dofValues, vLocIP, nip, vValue);
368 for (
size_t i = 0; i < nip; i++)
Class for subdomain-dependent data for the E-based formulated problems.
Definition: em_material.h:63
Definition: nedelec_gf_user_data.h:162
TGridFunc::domain_type domain_type
Type of domain.
Definition: nedelec_gf_user_data.h:165
size_t m_fct
component of function
Definition: nedelec_gf_user_data.h:178
domain_type::position_type position_type
Type of position coordinates (e.g. position_type)
Definition: nedelec_gf_user_data.h:171
virtual bool requires_grid_fct() const
Returns true to get the grid element in the evaluation routine.
Definition: nedelec_gf_user_data.h:207
static const int dim
World dimension.
Definition: nedelec_gf_user_data.h:168
SmartPtr< TGridFunc > m_spGF
grid function
Definition: nedelec_gf_user_data.h:175
NedelecCurlData(SmartPtr< TGridFunc > spGridFct, const char *cmp)
constructor
Definition: nedelec_gf_user_data.h:183
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
Performs the main computations:
Definition: nedelec_gf_user_data.h:212
virtual bool continuous() const
The vector field retrieved from the Nedelec-type 1 (Whitney-1) dofs are not continuous.
Definition: nedelec_gf_user_data.h:204
Definition: nedelec_gf_user_data.h:65
static const int dim
World dimension.
Definition: nedelec_gf_user_data.h:71
TGridFunc::domain_type domain_type
Type of domain.
Definition: nedelec_gf_user_data.h:68
virtual bool continuous() const
The vector field retrieved from the Nedelec-type 1 (Whitney-1) dofs are not continuous.
Definition: nedelec_gf_user_data.h:107
virtual bool requires_grid_fct() const
Returns true to get the grid element in the evaluation routine.
Definition: nedelec_gf_user_data.h:110
SmartPtr< TGridFunc > m_spGF
grid function
Definition: nedelec_gf_user_data.h:78
domain_type::position_type position_type
Type of position coordinates (e.g. position_type)
Definition: nedelec_gf_user_data.h:74
NedelecGridFunctionData(SmartPtr< TGridFunc > spGridFct, const char *cmp)
constructor
Definition: nedelec_gf_user_data.h:86
size_t m_fct
component of function
Definition: nedelec_gf_user_data.h:81
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
Performs the main computations:
Definition: nedelec_gf_user_data.h:115
Interpolation of the Nedelec dofs and their curls.
Definition: nedelec_local_ass.h:399
static void curl(const TDomain *domain, GridObject *elem, const position_type corners[], const number dofs[], MathVector< WDim > &curl_vec)
computes curl of the function
Definition: nedelec_local_ass.h:434
static void value(const TDomain *domain, GridObject *elem, const position_type corners[], const number dofs[], const MathVector< refDim > local[], const size_t n_pnt, MathVector< WDim > values[])
computes the values at given points
Definition: nedelec_local_ass.h:411
Definition: nedelec_gf_user_data.h:265
TGridFunc::domain_type domain_type
Type of domain.
Definition: nedelec_gf_user_data.h:268
SmartPtr< TGridFunc > m_spGF
grid function
Definition: nedelec_gf_user_data.h:278
NedelecSigmaEData(SmartPtr< TGridFunc > spGridFct, const char *cmp, SmartPtr< EMaterial< domain_type > > emMatherial)
constructor
Definition: nedelec_gf_user_data.h:289
static const int dim
World dimension.
Definition: nedelec_gf_user_data.h:271
SmartPtr< EMaterial< domain_type > > m_spEMaterial
subdomain-dependent data (propertiels of the materials)
Definition: nedelec_gf_user_data.h:284
size_t m_fct
component of function
Definition: nedelec_gf_user_data.h:281
virtual bool requires_grid_fct() const
Returns true to get the grid element in the evaluation routine.
Definition: nedelec_gf_user_data.h:314
virtual bool continuous() const
The vector field retrieved from the Nedelec-type 1 (Whitney-1) dofs are not continuous.
Definition: nedelec_gf_user_data.h:311
domain_type::position_type position_type
Type of position coordinates (e.g. position_type)
Definition: nedelec_gf_user_data.h:274
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
Performs the main computations:
Definition: nedelec_gf_user_data.h:319
const MathVector< dim > & ip(size_t s, size_t ip) const
MathVector< dim > position_type
#define UG_CATCH_THROW(msg)
const number & DoFRef(const TMatrix &mat, const DoFIndex &iInd, const DoFIndex &jInd)