36 #ifndef __H__UG__LIB_DISC__SPATIAL_DISC__INTERVAL_LINKER__
37 #define __H__UG__LIB_DISC__SPATIAL_DISC__INTERVAL_LINKER__
52 :
public StdDataLinker<IntervalNumberLinker<dim>, number, dim>
67 init (spData, minCoord, maxCoord);
74 std::vector<number> min_coord,
75 std::vector<number> max_coord
78 if (min_coord.size () !=
dim || max_coord.size () !=
dim)
79 UG_THROW (
"IntervalNumberLinker: Illegal sizes of the boundar arrays!");
81 for (
size_t i = 0; i <
dim; i++)
83 minCoord[i] = min_coord[i]; maxCoord[i] = max_coord[i];
86 init (spData, minCoord, maxCoord);
111 template <
int refDim>
128 (*m_spData) (vValue, vGlobIP,
time, si, elem, vCornerCoords, vLocIP, nip, u, vJT);
130 for (
size_t ip = 0;
ip < nip;
ip++)
136 template <
int refDim>
150 std::vector<std::vector<number> > vvvDeriv[],
157 this->set_zero (vvvDeriv, nip);
161 for (
size_t ip = 0;
ip < nip;
ip++)
164 vValue[
ip] = vValues[
ip];
166 for (
size_t fct = 0; fct <
m_spDData->num_fct (); fct++)
170 for (
size_t sh = 0; sh < this->num_sh (c_fct); sh++)
171 vvvDeriv[
ip][c_fct][sh] = vDValues [sh];
191 m_spDData = spData.template cast_dynamic<DependentUserData<number, dim> > ();
204 for (
size_t i = 0; i <
dim; i++)
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: interval_linker.h:53
void evaluate(number &value, const MathVector< dim > &glob_ip, number time, int si) const
Evaluation for the global coordinates.
Definition: interval_linker.h:97
virtual bool requires_grid_fct() const
Returns true because without a grid function, we do not get the element.
Definition: interval_linker.h:93
IntervalNumberLinker(SmartPtr< CplUserData< number, dim > > spData, std::vector< number > min_coord, std::vector< number > max_coord)
Constructor.
Definition: interval_linker.h:72
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
Computation of the values and the derivatives.
Definition: interval_linker.h:138
void set_default(number v)
sets the default values out of the interval
Definition: interval_linker.h:90
number def_val
Definition: interval_linker.h:218
void evaluate(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, const MathMatrix< refDim, dim > *vJT=NULL) const
Computation without the derivatives.
Definition: interval_linker.h:113
IntervalNumberLinker(SmartPtr< CplUserData< number, dim > > spData, MathVector< dim > &minCoord, MathVector< dim > &maxCoord)
Constructor.
Definition: interval_linker.h:61
void init(SmartPtr< CplUserData< number, dim > > spData, MathVector< dim > &minCoord, MathVector< dim > &maxCoord)
a general initializer (to call from a constructor)
Definition: interval_linker.h:183
SmartPtr< CplUserData< number, dim > > m_spData
data to filter
Definition: interval_linker.h:211
MathVector< dim > m_minCoord
the interval
Definition: interval_linker.h:215
MathVector< dim > m_maxCoord
Definition: interval_linker.h:215
StdDataLinker< IntervalNumberLinker< dim >, number, dim > base_type
Base class type.
Definition: interval_linker.h:55
SmartPtr< DependentUserData< number, dim > > m_spDData
Definition: interval_linker.h:212
bool is_in(const MathVector< dim > &x) const
checks if the point is in the interval
Definition: interval_linker.h:200
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
#define UG_THROW(msg)
Definition: error.h:57
double number
Definition: types.h:124