36 #ifndef __H__UG__LIB_DISC__SPATIAL_DISC__PROJECT_LINKER__
37 #define __H__UG__LIB_DISC__SPATIAL_DISC__PROJECT_LINKER__
54 :
public StdDataLinker<ProjectionLinker<dim>, MathVector<dim>, dim>
69 m_spDVector = spVector.template cast_dynamic<DependentUserData<MathVector<dim>,
dim> > ();
91 MathVector<dim>&
value,
97 UG_THROW (
"ProjectionLinker: Cannot evaluate without any specification of the element!");
101 template <
int refDim>
117 (*m_spVector) (vValue, vGlobIP,
time, si, elem, vCornerCoords, vLocIP, nip, u, vJT);
122 rMapping.
update (vCornerCoords);
125 for (
size_t i = 0; i < nip; i++)
136 template <
int refDim>
160 rMapping.
update (vCornerCoords);
166 this->set_zero (vvvDeriv, nip);
169 for (
size_t i = 0; i < nip; i++)
175 vValue[i] = vVector[i];
178 if (! bDeriv)
continue;
179 for (
size_t fct = 0; fct <
m_spDVector->num_fct(); fct++)
183 for (
size_t sh = 0; sh < this->num_sh (c_fct); sh++)
185 vvvDeriv[i][c_fct][sh] = vDVector [sh];
Definition: smart_pointer.h:108
constant vector user data
Definition: const_user_data.h:187
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
virtual base class for reference mappings
Definition: reference_mapping_provider.h:53
virtual void update(const MathVector< worldDim > *vCornerCoord)=0
refresh mapping for new set of corners
virtual void jacobian(MathMatrix< worldDim, dim > &J, const MathVector< dim > &locPos) const =0
returns jacobian
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
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: projection_linker.h:55
StdDataLinker< ProjectionLinker< dim >, MathVector< dim >, dim > base_type
Base class type.
Definition: projection_linker.h:57
void evaluate(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, const MathMatrix< refDim, dim > *vJT=NULL) const
Computation only of the projection.
Definition: projection_linker.h:103
void evaluate(MathVector< dim > &value, const MathVector< dim > &glob_ip, number time, int si) const
Evaluation with no element is impossible.
Definition: projection_linker.h:90
ProjectionLinker(SmartPtr< CplUserData< MathVector< dim >, dim > > spVector)
Constructor.
Definition: projection_linker.h:63
SmartPtr< DependentUserData< MathVector< dim >, dim > > m_spDVector
Definition: projection_linker.h:196
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
Computation of the projection and its derivatives.
Definition: projection_linker.h:138
SmartPtr< CplUserData< MathVector< dim >, dim > > m_spVector
data to project
Definition: projection_linker.h:195
virtual bool requires_grid_fct() const
Returns true because without a grid function, we do not get the element to project to!
Definition: projection_linker.h:86
ProjectionLinker(MathVector< dim > vector)
Constructor.
Definition: projection_linker.h:75
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
void OrthogProjectVec(vector_t &v, const matrix_t &A)
Orthogonal projection.
Definition: math_matrix_vector_functions_common_impl.hpp:251
ReferenceObjectID
these ids are used to identify the shape of a geometric object.
Definition: grid_base_objects.h:74
SmartPtr< T, FreePolicy > make_sp(T *inst)
returns a SmartPtr for the passed raw pointer
Definition: smart_pointer.h:836