38 #ifndef __H__UG__LIB_DISC__SPATIAL_DISC__USER_DATA__ONC_USER_DATA__
39 #define __H__UG__LIB_DISC__SPATIAL_DISC__USER_DATA__ONC_USER_DATA__
60 template <
typename TDomain>
62 :
public StdUserData<OutNormCmp<TDomain>, MathVector<TDomain::dim>, TDomain::dim, void, UserData<MathVector<TDomain::dim>, TDomain::dim, void> >
97 std::vector<std::string> vssNames;
101 for (
size_t k = 0; k < vssNames.size (); k++)
105 }
UG_CATCH_THROW (
"SubsetIndicatorUserData: Failed to parse subset names.");
125 template <
int refDim>
142 (* m_spData) (vValue, vGlobIP, time, si, elem, vCornerCoords, vLocIP, nip, u, vJT);
145 if (refDim !=
dim - 1)
147 UG_THROW (
"OutNormCmp: Wrong dimensionality of the subset.");
152 fd_elem_type * fd_elem = NULL;
156 fd_elem_secure_container_type fd_elem_list;
158 grid.associated_elements (fd_elem_list, elem);
162 if (fd_elem_list.size () == 1)
164 fd_elem = fd_elem_list[0];
165 fd_si =
m_spDomain->subset_handler()->get_subset_index (fd_elem);
171 for (
size_t k = 0; k < fd_elem_list.size (); k++)
173 fd_elem_type * e = fd_elem_list[k];
189 for (
size_t ip = 0; ip < nip; ip++) vValue[ip] = 0;
201 = ReferenceMappingProvider::get<dim, dim> (fd_roid, fd_elem_corner_coords);
202 std::vector<MathVector<dim> > fd_loc_ip (nip);
203 for (
size_t ip = 0; ip < nip; ip++)
207 (* m_spData) (&(vValue[0]), vGlobIP, time, fd_si, fd_elem, &(fd_elem_corner_coords[0]),
208 &(fd_loc_ip[0]), nip, u);
214 = ReferenceMappingProvider::get<refDim, dim> (roid, vCornerCoords);
215 for (
size_t ip = 0; ip < nip; ip++)
220 map.jacobian (J, vLocIP[ip]);
236 UG_THROW(
"OutNormCmp: Element required for evaluation, but not passed. Cannot evaluate.");
249 UG_THROW(
"OutNormCmp: Element required for evaluation, but not passed. Cannot evaluate.");
Definition: smart_pointer.h:108
T * get()
returns encapsulated pointer
Definition: smart_pointer.h:197
virtual base class for reference mappings
Definition: reference_mapping_provider.h:53
virtual void global_to_local(MathVector< dim > &locPos, const MathVector< worldDim > &globPos, const size_t maxIter=1000, const number tol=1e-10) const =0
map global coordinate to local coordinate
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
Definition: local_algebra.h:198
A class for fixed size, dense matrices.
Definition: math_matrix.h:52
Projection to the outer normal for a given vector user data.
Definition: dim_dim_user_data.h:63
static const int dim
the world dimension
Definition: dim_dim_user_data.h:65
void evaluate(vec_type 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
Evaluator.
Definition: dim_dim_user_data.h:127
SubsetGroup m_ssGrp
the subset group for the inner part
Definition: dim_dim_user_data.h:83
MathVector< dim > vec_type
the original data type
Definition: dim_dim_user_data.h:74
SmartPtr< domain_type > m_spDomain
the domain
Definition: dim_dim_user_data.h:80
virtual bool requires_grid_fct() const
Returns true to get the grid element in the evaluation routine.
Definition: dim_dim_user_data.h:121
SmartPtr< UserData< vec_type, dim, void > > m_spData
the original data
Definition: dim_dim_user_data.h:77
TDomain domain_type
the domain type
Definition: dim_dim_user_data.h:68
virtual bool continuous() const
Indicator functions are discontinuous.
Definition: dim_dim_user_data.h:118
TDomain::grid_type grid_type
the grid type
Definition: dim_dim_user_data.h:71
OutNormCmp(SmartPtr< domain_type > spDomain, SmartPtr< UserData< vec_type, dim, void > > spData, const char *ss_names)
constructor
Definition: dim_dim_user_data.h:89
OutNormCmp(SmartPtr< domain_type > spDomain, SmartPtr< UserData< vec_type, dim, void > > spData)
constructor
Definition: dim_dim_user_data.h:110
Container which holds an array of pointers.
Definition: pointer_const_array.h:84
Definition: std_user_data.h:63
Group of subsets.
Definition: subset_group.h:51
void clear()
clear all subsets
Definition: subset_group.h:116
bool empty() const
returns if function group is empty
Definition: subset_group.h:119
ConstSmartPtr< ISubsetHandler > subset_handler() const
get underlying subset handler
Definition: subset_group.h:72
void add(int si)
adds a subset by number to this group
Definition: subset_group.cpp:64
bool contains(int si) const
returns true if subset is contained in this group
Definition: subset_group.cpp:272
Type based UserData.
Definition: user_data.h:143
const FunctionIndexMapping & map() const
get function mapping
Definition: user_data.h:78
void CollectCornerCoordinates(std::vector< typename TAAPos::ValueType > &vCornerCoordsOut, const TElem &elem, const TAAPos &aaPos, bool clearContainer=true)
returns the corner coordinates of a geometric object
Definition: domain_util_impl.h:75
void RemoveWhitespaceFromString(std::string &str)
removes all white space from a string, also within the string
Definition: string_util.cpp:50
#define UG_CATCH_THROW(msg)
Definition: error.h:64
#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
void TokenizeString(const string &str, vector< string > &vToken, const char delimiter)
Definition: string_util.cpp:56
Definition: domain_traits.h:53
Definition: grid_dim_traits.h:53