|
Plugins
|
#include <level_set_pos.h>
Inheritance diagram for ug::d3f::LSPosZData< TGridFunction >:Classes | |
| struct | GetXYForElements |
| Helper class for computation of the position of the level set in all the elements. More... | |
Public Types | |
| typedef StdDependentUserData< this_type, number, wDim > | base_type |
| the base type | |
| typedef gf_type::domain_type | domain_type |
| domain type | |
| typedef TGridFunction | gf_type |
| type of the grid function | |
| typedef domain_type::position_accessor_type | pos_acc_type |
| position attachment accessor type | |
| typedef LSPosZData< gf_type > | this_type |
| this type | |
Public Types inherited from ug::CplUserData< typename TData, int dim, typename TRet > | |
| typedef ICplUserData< dim > | base_type |
Public Types inherited from ug::UserData< typename TData, int dim, typename TRet > | |
| typedef TData | data_type |
| typedef TRet | return_type |
Public Member Functions | |
| virtual bool | continuous () const |
| We consider here the height as a continuous field only if it is evaluated at vertices. | |
| template<int refDim> | |
| void | eval_and_deriv (number vValue[], const MathVector< wDim > vGlobIP[], number time, int si, GridObject *elem, const MathVector< wDim > vCornerCoords[], const MathVector< refDim > vLocIP[], const size_t nip, LocalVector *u, bool bDeriv, int s, std::vector< std::vector< number > > vvvDeriv[], const MathMatrix< refDim, wDim > *vJT=NULL) |
| Performs the main computations: | |
| LSPosZData (SmartPtr< measurer_type > &sp_ls_pos_z, const char *subsets) | |
| Constructor. | |
| void | reinit () |
| Initializer (should be called before every use). Reinialize the measurer before running this reinit! | |
| void | reinit_for (int dim) |
| Initializer (should be called before every use). Reinialize the measurer before running this reinit! | |
| virtual bool | requires_grid_fct () const |
| Returns true to get the grid element in the evaluation routine. | |
| void | set_default_height (number defaultHeight) |
| sets the default value for the points with no level set | |
| ~LSPosZData () | |
| Destructor. | |
Public Member Functions inherited from ug::StdDependentUserData< LSPosZData< TGridFunction >, number, TGridFunction::dim > | |
| virtual void | compute (LocalVector *u, GridObject *elem, const MathVector< dim > vCornerCoords[], bool bDeriv=false) |
| virtual void | compute (LocalVectorTimeSeries *u, GridObject *elem, const MathVector< dim > vCornerCoords[], bool bDeriv=false) |
| void | eval_deriv (LocalVector *u, GridObject *elem, const MathVector< dim > vCornerCoords[], bool bDeriv=false) |
| void | eval_deriv (LocalVectorTimeSeries *u, GridObject *elem, const MathVector< dim > vCornerCoords[], bool bDeriv=false) |
| void | evaluate (TData 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 |
| virtual void | operator() (TData &value, const MathVector< dim > &globIP, number time, int si) const |
| virtual void | operator() (TData vValue[], const MathVector< dim > vGlobIP[], number time, int si, const size_t nip) const |
| StdDependentUserData () | |
| StdDependentUserData (const char *symbFct) | |
| StdDependentUserData (const std::string &symbFct) | |
| StdDependentUserData (const std::vector< std::string > &symbFct) | |
Public Member Functions inherited from ug::StdUserData< StdDependentUserData< TImpl, TData, dim >, TData, dim, void, DependentUserData< TData, dim > > | |
| virtual void | operator() (TData vValue[], const MathVector< dim > vGlobIP[], number time, int si, GridObject *elem, const MathVector< dim > vCornerCoords[], const MathVector< 1 > vLocIP[], const size_t nip, LocalVector *u, const MathMatrix< 1, dim > *vJT=NULL) const |
| virtual void | operator() (TData vValue[], const MathVector< dim > vGlobIP[], number time, int si, GridObject *elem, const MathVector< dim > vCornerCoords[], const MathVector< 1 > vLocIP[], const size_t nip, LocalVector *u, const MathMatrix< 1, dim > *vJT=NULL) const |
| virtual void | operator() (TData vValue[], const MathVector< dim > vGlobIP[], number time, int si, GridObject *elem, const MathVector< dim > vCornerCoords[], const MathVector< 2 > vLocIP[], const size_t nip, LocalVector *u, const MathMatrix< 2, dim > *vJT=NULL) const |
| virtual void | operator() (TData vValue[], const MathVector< dim > vGlobIP[], number time, int si, GridObject *elem, const MathVector< dim > vCornerCoords[], const MathVector< 2 > vLocIP[], const size_t nip, LocalVector *u, const MathMatrix< 2, dim > *vJT=NULL) const |
| virtual void | operator() (TData vValue[], const MathVector< dim > vGlobIP[], number time, int si, GridObject *elem, const MathVector< dim > vCornerCoords[], const MathVector< 3 > vLocIP[], const size_t nip, LocalVector *u, const MathMatrix< 3, dim > *vJT=NULL) const |
| virtual void | operator() (TData vValue[], const MathVector< dim > vGlobIP[], number time, int si, GridObject *elem, const MathVector< dim > vCornerCoords[], const MathVector< 3 > vLocIP[], const size_t nip, LocalVector *u, const MathMatrix< 3, dim > *vJT=NULL) const |
Public Member Functions inherited from ug::CplUserData< typename TData, int dim, typename TRet > | |
| bool | defined (size_t s, size_t ip) const |
| size_t | num_ip (size_t s) const |
| size_t | num_series () const |
| void | register_storage_callback (DataImport< TData, dim > *obj, void(DataImport< TData, dim >::*func)()) |
| void | unregister_storage_callback (DataImport< TData, dim > *obj) |
| TData & | value (size_t s, size_t ip) |
| const TData & | value (size_t s, size_t ip) const |
| TData * | values (size_t s) |
| const TData * | values (size_t s) const |
| ~CplUserData () | |
Public Member Functions inherited from ug::ICplUserData< int dim > | |
| bool | at_current_time (size_t s) const |
| virtual void | check_setup () const |
| void | clear () |
| virtual bool | constant () const |
| int | dim_local_ips () const |
| ICplUserData () | |
| const MathVector< dim > & | ip (size_t s, size_t ip) const |
| const MathVector< dim > * | ips (size_t s) const |
| const MathVector< ldim > & | local_ip (size_t s, size_t ip) const |
| const MathVector< ldim > * | local_ips (size_t s) const |
| virtual SmartPtr< ICplUserData > | needed_data (size_t i) |
| size_t | num_ip (size_t s) const |
| virtual size_t | num_needed_data () const |
| size_t | num_series () const |
| virtual void | prepare_element (GridObject *e, const MathVector< dim > vCornerCoords[]) |
| size_t | register_local_ip_series (const MathVector< ldim > *vPos, const size_t numIP, bool bMayChange=true) |
| size_t | register_local_ip_series (const MathVector< ldim > *vPos, const size_t numIP, const int timePointSpec, bool bMayChange=true) |
| void | set_global_ips (size_t s, const MathVector< dim > *vPos, size_t numIP) |
| void | set_local_ips (const size_t seriesId, const MathVector< ldim > *vPos, const size_t numIP) |
| void | set_subset (int si) |
| void | set_time_point (const size_t seriesId, const int timePointSpec) |
| void | set_time_point (size_t timePoint) |
| void | set_times (const std::vector< number > &vTime) |
| int | subset () const |
| number | time () const |
| number | time (size_t s) const |
| size_t | time_point () |
| size_t | time_point (size_t s) const |
| int | time_point_specification (size_t s) const |
| virtual void | update_dof_sizes (const LocalIndices &ind) |
| virtual bool | zero_derivative () const |
| virtual | ~ICplUserData () |
Public Member Functions inherited from ug::UserDataInfo | |
| const FunctionGroup & | function_group () const |
| const FunctionIndexMapping & | map () const |
| size_t | num_fct () const |
| const char * | obj_name () |
| virtual void | set_function_pattern (ConstSmartPtr< FunctionPattern > fctPatt) |
| void | set_obj_name (const char *name) |
| virtual | ~UserDataInfo () |
Public Member Functions inherited from ug::UserData< typename TData, int dim, typename TRet > | |
| int | get_dim () const |
| TRet | operator() (TData &value, const MathVector< dim > &globIP, number time, int si, GridObject *elem, const MathVector< dim > vCornerCoords[], const MathVector< 1 > &locIP, LocalVector *u) const |
| TRet | operator() (TData &value, const MathVector< dim > &globIP, number time, int si, GridObject *elem, const MathVector< dim > vCornerCoords[], const MathVector< 1 > &locIP, LocalVector *u) const |
| TRet | operator() (TData &value, const MathVector< dim > &globIP, number time, int si, GridObject *elem, const MathVector< dim > vCornerCoords[], const MathVector< 2 > &locIP, LocalVector *u) const |
| TRet | operator() (TData &value, const MathVector< dim > &globIP, number time, int si, GridObject *elem, const MathVector< dim > vCornerCoords[], const MathVector< 2 > &locIP, LocalVector *u) const |
| TRet | operator() (TData &value, const MathVector< dim > &globIP, number time, int si, GridObject *elem, const MathVector< dim > vCornerCoords[], const MathVector< 3 > &locIP, LocalVector *u) const |
| TRet | operator() (TData &value, const MathVector< dim > &globIP, number time, int si, GridObject *elem, const MathVector< dim > vCornerCoords[], const MathVector< 3 > &locIP, LocalVector *u) const |
| virtual void | operator() (TData &value, const MathVector< dim > &globIP, number time, int si, Vertex *vrt) const |
| std::string | type () const |
Static Public Attributes | |
| static const int | wDim = gf_type::dim |
| world dimension | |
Private Types | |
| typedef LSPositionZ< TGridFunction > | measurer_type |
| type of the class for measuring the height of the level-set | |
| typedef Attachment< size_t > | num_a_type |
| type of the attachment numbering the elements | |
Private Member Functions | |
| void | detach_for (int dim) |
| Destroys the attachment (for a variable dimensionality) | |
| template<int elemDim> | |
| void | detach_for_ () |
| Destroys the attachment (for the templated dimensionality) | |
| template<typename TElem > | |
| void | get_xy_for_all_ (MathVector< wDim-1 > *xy_pos, number *z_pos) |
| Computes the xy-coordinates of the evaluation points for all elements of the given type. | |
| template<int elemDim> | |
| void | reinit_for_ () |
| Initializer for the constant dimensionality. | |
Private Attributes | |
| num_a_type | m_a_elem_num |
| attachment keeping a numbering of the elements (vertices etc.) in the subsets | |
| number | m_default_height |
| the default value of the z-coordinate if the level set is not found | |
| int | m_elem_dim |
| dimensionality of the elements (-1 = not initizlised) | |
| std::vector< number > | m_elem_z |
| z-coordinates of the level set at the elements of the subsets | |
| SmartPtr< measurer_type > | m_sp_ls_pos_z |
| the object to measure the z-coordinate of the level set | |
| SubsetGroup | m_SsGrp |
| (low-dimensional) subsets to compute the coordinates over | |
| bool | m_use_ss_z_as_default |
| whether to use the z-coord. of the subset as the default value | |
Additional Inherited Members | |
Protected Member Functions inherited from ug::StdDependentUserData< LSPosZData< TGridFunction >, number, TGridFunction::dim > | |
| TImpl & | getImpl () |
| const TImpl & | getImpl () const |
Protected Member Functions inherited from ug::StdUserData< StdDependentUserData< TImpl, TData, dim >, TData, dim, void, DependentUserData< TData, dim > > | |
| TImpl & | getImpl () |
| const TImpl & | getImpl () const |
Protected Member Functions inherited from ug::CplUserData< typename TData, int dim, typename TRet > | |
| void | call_storage_callback () const |
| void | check_series (size_t s) const |
| void | check_series_ip (size_t s, size_t ip) const |
| virtual void | local_ip_series_added (const size_t seriesID) |
| virtual void | local_ip_series_to_be_cleared () |
| virtual void | local_ips_changed (const size_t seriesID, const size_t newNumIP) |
| virtual void | value_storage_changed (const size_t seriesID) |
Protected Member Functions inherited from ug::ICplUserData< int dim > | |
| void | check_s (size_t s) const |
| void | check_s_ip (size_t s, size_t ip) const |
| std::vector< const MathVector< 1 > * > & | get_local_ips (Int2Type< 1 >) |
| const std::vector< const MathVector< 1 > * > & | get_local_ips (Int2Type< 1 >) const |
| std::vector< const MathVector< 2 > * > & | get_local_ips (Int2Type< 2 >) |
| const std::vector< const MathVector< 2 > * > & | get_local_ips (Int2Type< 2 >) const |
| std::vector< const MathVector< 3 > * > & | get_local_ips (Int2Type< 3 >) |
| const std::vector< const MathVector< 3 > * > & | get_local_ips (Int2Type< 3 >) const |
| virtual void | global_ips_changed (const size_t seriesID, const MathVector< dim > *vPos, const size_t numIP) |
Protected Attributes inherited from ug::ICplUserData< int dim > | |
| int | m_defaultTimePoint |
| int | m_locPosDim |
| std::vector< const MathVector< 1 > * > | m_pvLocIP1d |
| std::vector< const MathVector< 2 > * > | m_pvLocIP2d |
| std::vector< const MathVector< 3 > * > | m_pvLocIP3d |
| int | m_si |
| size_t | m_timePoint |
| std::vector< bool > | m_vMayChange |
| std::vector< size_t > | m_vNumIP |
| std::vector< number > | m_vTime |
| std::vector< int > | m_vTimePoint |
| std::vector< const MathVector< dim > * > | m_vvGlobPos |
Protected Attributes inherited from ug::UserDataInfo | |
| FunctionGroup | m_fctGrp |
| FunctionIndexMapping | m_map |
| SmartPtr< char > | m_objName |
Class for representing the z-coordinates of the level set as the user data
This class with the user data interface computes the z-coodinates of the level set at every grid element of the given subsets. It can be used for the graphical representation of the depth of the level set on, e.g., the top surface of the domain. Note that due to the complicated evaluations, it is not recommended to pass all the subsets this computation.
| typedef StdDependentUserData<this_type, number, wDim> ug::d3f::LSPosZData< TGridFunction >::base_type |
the base type
| typedef gf_type::domain_type ug::d3f::LSPosZData< TGridFunction >::domain_type |
domain type
| typedef TGridFunction ug::d3f::LSPosZData< TGridFunction >::gf_type |
type of the grid function
|
private |
type of the class for measuring the height of the level-set
|
private |
type of the attachment numbering the elements
| typedef domain_type::position_accessor_type ug::d3f::LSPosZData< TGridFunction >::pos_acc_type |
position attachment accessor type
| typedef LSPosZData<gf_type> ug::d3f::LSPosZData< TGridFunction >::this_type |
this type
| ug::d3f::LSPosZData< TGridFunction >::LSPosZData | ( | SmartPtr< measurer_type > & | sp_ls_pos_z, |
| const char * | subsetNames | ||
| ) |
Constructor.
Class constructor
| sp_ls_pos_z | the measurer |
| subsetNames | subsets where to compute the z-coordinates |
References ug::SubsetGroup::add(), ug::d3f::LSPosZData< TGridFunction >::m_sp_ls_pos_z, ug::d3f::LSPosZData< TGridFunction >::m_SsGrp, ug::SubsetGroup::set_subset_handler(), ug::TokenizeString(), UG_THROW, and SmartPtr< typename T, template< class TT > class FreePolicy >::valid().
| ug::d3f::LSPosZData< TGridFunction >::~LSPosZData | ( | ) |
Destructor.
Class destructor
|
inlinevirtual |
We consider here the height as a continuous field only if it is evaluated at vertices.
Implements ug::UserDataInfo.
References ug::d3f::LSPosZData< TGridFunction >::m_elem_dim.
|
private |
Destroys the attachment (for a variable dimensionality)
Destroys the attachment (for a variable dimensionality)
| dim | detach the attachments for this dimensionality (-1 = no action) |
|
private |
Destroys the attachment (for the templated dimensionality)
Destroys the attachment (for the templated dimensionality)
| void ug::d3f::LSPosZData< TGridFunction >::eval_and_deriv | ( | number | vValue[], |
| const MathVector< wDim > | vGlobIP[], | ||
| number | time, | ||
| int | si, | ||
| GridObject * | grid_obj, | ||
| const MathVector< wDim > | vCornerCoords[], | ||
| const MathVector< refDim > | vLocIP[], | ||
| const size_t | nip, | ||
| LocalVector * | u, | ||
| bool | bDeriv, | ||
| int | s, | ||
| std::vector< std::vector< number > > | vvvDeriv[], | ||
| const MathMatrix< refDim, wDim > * | vJT = NULL |
||
| ) |
Performs the main computations:
Interpolates the vertex values of the z-coordinates
| vValue | for the computed value |
References ug::LFEID::LAGRANGE, ug::GridObject::reference_object_id(), ug::LocalShapeFunctionSet< int TDim, typename TShape, typename TGrad >::shapes(), UG_ASSERT, and UG_THROW.
|
private |
Computes the xy-coordinates of the evaluation points for all elements of the given type.
Computes the xy-coordinates of the evaluation points for all elements of the given type
| xy_pos | for the (wDim-1)-coordinate sets |
| z_pos | for the z-coordinates (if not NULL) |
References ug::d3f::LSPosZData_ElemEvalPnt< WDim, TAAPos, TElem >::get().
| void ug::d3f::LSPosZData< TGridFunction >::reinit | ( | ) |
Initializer (should be called before every use). Reinialize the measurer before running this reinit!
Initializer: Computes the z-coordinates at the vertices (the default version). Warning: Reinialize the measurer (m_sp_ls_pos_z) before running this reinit!
References pcl::ProcessCommunicator::allreduce(), and PCL_RO_MAX.
| void ug::d3f::LSPosZData< TGridFunction >::reinit_for | ( | int | dim | ) |
Initializer (should be called before every use). Reinialize the measurer before running this reinit!
Initializer: Computes the z-coordinates at the vertices. Warning: Reinialize the measurer (m_sp_ls_pos_z) before running this reinit!
| dim | reinitilize for this dimensionality (-1 = reinit) |
References UG_THROW.
|
private |
Initializer for the constant dimensionality.
Initializer: Computes the z-coordinates in the elements. (The templated version.) Warning: Reinialize the measurer (m_sp_ls_pos_z) before running this reinit!
References pcl::ProcessCommunicator::allgatherv(), pcl::ProcessCommunicator::allreduce(), pcl::ProcessCommunicator::get_local_proc_id(), PCL_RO_MAX, and UG_LOG.
|
inlinevirtual |
Returns true to get the grid element in the evaluation routine.
Implements ug::UserDataInfo.
|
inline |
sets the default value for the points with no level set
| defaultHeight | the default value for the points with no level set |
References ug::d3f::LSPosZData< TGridFunction >::m_default_height, and ug::d3f::LSPosZData< TGridFunction >::m_use_ss_z_as_default.
|
private |
attachment keeping a numbering of the elements (vertices etc.) in the subsets
|
private |
the default value of the z-coordinate if the level set is not found
Referenced by ug::d3f::LSPosZData< TGridFunction >::set_default_height().
|
private |
dimensionality of the elements (-1 = not initizlised)
Referenced by ug::d3f::LSPosZData< TGridFunction >::continuous().
|
private |
z-coordinates of the level set at the elements of the subsets
|
private |
the object to measure the z-coordinate of the level set
Referenced by ug::d3f::LSPosZData< TGridFunction >::LSPosZData().
|
private |
(low-dimensional) subsets to compute the coordinates over
Referenced by ug::d3f::LSPosZData< TGridFunction >::LSPosZData().
|
private |
whether to use the z-coord. of the subset as the default value
Referenced by ug::d3f::LSPosZData< TGridFunction >::set_default_height().
|
static |
world dimension