36#ifndef __H__UG__PLUGINS__LEVEL_SET_AVE_DATA_H__
37#define __H__UG__PLUGINS__LEVEL_SET_AVE_DATA_H__
67template <
typename TGr
idFunction>
76 static const int dim = gf_type::dim;
103 if ((
m_fct = sp_gf->fct_id_by_name (fct_name)) >= sp_gf->num_fct ())
104 UG_THROW (
"LSAveData: Function space does not contain any function with name '" << fct_name <<
"'.");
107 UG_THROW (
"LSAveData: Only vertex-centered grid functions are supported.");
123 template <
int refDim>
137 std::vector<std::vector<number> > vvvDeriv[],
149 int g_level =
m_sp_gf->grid_level().level();
152 g_level =
m_sp_gf->approx_space()->num_levels () - 1;
155 (r_ref_elem.
num (0), elem, si, g_level,
false, vCornerCoords,
time)) < 0)
157 for(
size_t ip = 0;
ip < nip; ++
ip)
164 std::vector<DoFIndex> ind;
166 if (ind.size () != r_ref_elem.
num (0))
167 UG_THROW (
"LSAveData: Wrong number of values per element.");
172 for (
size_t co = 0; co < ind.size (); co++)
185 for (
size_t ip = 0;
ip < nip;
ip++)
parameterString s
Definition Biogas.lua:2
virtual ReferenceObjectID reference_object_id() const=0
const MathVector< dim > & ip(size_t s, size_t ip) const
Definition level_set_ave_data.h:70
size_t m_fct
the function inside of the grid function
Definition level_set_ave_data.h:192
gf_type::domain_type domain_type
domain type
Definition level_set_ave_data.h:85
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)
Performs the main computations:
Definition level_set_ave_data.h:125
TGridFunction gf_type
type of the grid function
Definition level_set_ave_data.h:73
virtual bool continuous() const
These are element-based data, they are not continuous.
Definition level_set_ave_data.h:117
virtual ~LSAveData()
Destructor.
Definition level_set_ave_data.h:111
gf_type::algebra_type algebra_type
algebra type
Definition level_set_ave_data.h:88
IInterfaceExtrapolation< domain_type, algebra_type > extrapol_type
extrapolation type
Definition level_set_ave_data.h:91
virtual bool requires_grid_fct() const
Returns true to get the grid element in the evaluation routine.
Definition level_set_ave_data.h:120
StdDependentUserData< this_type, number, dim > base_type
the base type
Definition level_set_ave_data.h:82
SmartPtr< gf_type > m_sp_gf
the grid function
Definition level_set_ave_data.h:191
LSAveData< gf_type > this_type
this type
Definition level_set_ave_data.h:79
LSAveData(SmartPtr< gf_type > sp_gf, const char *fct_name)
Constructor.
Definition level_set_ave_data.h:97
static const int dim
world dimension
Definition level_set_ave_data.h:76
SmartPtr< extrapol_type > m_sp_extrapol
the extrapolation (if any)
Definition level_set_ave_data.h:193
void set_extrapolation(SmartPtr< extrapol_type > sp_extrapol)
Set the extrapolation (if any)
Definition level_set_ave_data.h:114
size_t num(int dim) const
const number & DoFRef(const TMatrix &mat, const DoFIndex &iInd, const DoFIndex &jInd)