Plugins
Loading...
Searching...
No Matches
ug::d3f::RichardsFreeSurfaceHeight< TGridFunction > Class Template Reference

Computes and stores the height of the free water surface (e.g., where pressure is 0) for the Richards equation. More...

#include <richards_fs_height.h>

+ Inheritance diagram for ug::d3f::RichardsFreeSurfaceHeight< TGridFunction >:

Classes

struct  t_pnt_data
 Internal structure to hold cached measurement data for a specific vertex point. More...
 

Public Types

typedef StdDependentUserData< this_type, number, dimbase_type
 
typedef gf_type::domain_type domain_type
 
typedef TGridFunction gf_type
 
typedef GlobalGridFunctionNumberData< TGridFunction > glob_userdata_type
 type of the class for getting the values of a grid function by a global coordinate
 
typedef LSPositionZ< TGridFunction > measurer_type
 type of free surface measurer
 
typedef Attachment< size_t > num_a_type
 type of the attachment numbering the vertices
 
typedef Grid::VertexAttachmentAccessor< num_a_typenum_aa_type
 type of the attachment accessor for the numbering attachment
 
typedef domain_type::position_accessor_type pos_acc_type
 
typedef RichardsFreeSurfaceHeight< gf_typethis_type
 
typedef Attachment< numberval_a_type
 type of the attachment numbering the vertices
 
typedef Grid::VertexAttachmentAccessor< val_a_typeval_aa_type
 type of the attachment accessor for the value attachment
 
- 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 (although it is not completely so)
 
template<int refDim>
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)
 Evaluates the free surface height at integration points of a grid element.
 
void reinit ()
 Reinitializes the measurer.
 
virtual bool requires_grid_fct () const
 Returns true to get the grid element in the evaluation routine.
 
 RichardsFreeSurfaceHeight (SmartPtr< gf_type > spGf, const char *subset="top", const char *cmp="p")
 Constructor for RichardsFreeSurfaceHeight.
 
- Public Member Functions inherited from ug::StdDependentUserData< RichardsFreeSurfaceHeight< 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< ICplUserDataneeded_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 FunctionGroupfunction_group () const
 
const FunctionIndexMappingmap () 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 dim = gf_type::dim
 

Private Attributes

num_a_type m_a_vrt_num
 
val_a_type m_a_vrt_val
 
const char * m_cmp
 
glob_userdata_type m_glob_userdata
 
std::vector< t_pnt_datam_measurement_points
 
measurer_type m_sp_ls_pos_z
 
SmartPtr< std::vector< number > > m_sp_vrt_val
 
SmartPtr< gf_typem_spGf
 
SubsetGroup m_SsGrp
 

Additional Inherited Members

- Protected Member Functions inherited from ug::StdDependentUserData< RichardsFreeSurfaceHeight< 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< numberm_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
 

Detailed Description

template<typename TGridFunction>
class ug::d3f::RichardsFreeSurfaceHeight< TGridFunction >

Computes and stores the height of the free water surface (e.g., where pressure is 0) for the Richards equation.

  • This class measures the z-coordinate of a level set (usually pressure p = 0) and projects it onto a designated subset of the domain (typically the "top" boundary). It stores these measurements at the vertices and provides an evaluation routine to interpolate these heights across grid elements.
  • Note: Parallelization should be implemented in the classes that use this measurer.

Member Typedef Documentation

◆ base_type

template<typename TGridFunction >
typedef StdDependentUserData<this_type, number, dim> ug::d3f::RichardsFreeSurfaceHeight< TGridFunction >::base_type

◆ domain_type

template<typename TGridFunction >
typedef gf_type::domain_type ug::d3f::RichardsFreeSurfaceHeight< TGridFunction >::domain_type

◆ gf_type

template<typename TGridFunction >
typedef TGridFunction ug::d3f::RichardsFreeSurfaceHeight< TGridFunction >::gf_type

◆ glob_userdata_type

template<typename TGridFunction >
typedef GlobalGridFunctionNumberData<TGridFunction> ug::d3f::RichardsFreeSurfaceHeight< TGridFunction >::glob_userdata_type

type of the class for getting the values of a grid function by a global coordinate

◆ measurer_type

template<typename TGridFunction >
typedef LSPositionZ<TGridFunction> ug::d3f::RichardsFreeSurfaceHeight< TGridFunction >::measurer_type

type of free surface measurer

◆ num_a_type

template<typename TGridFunction >
typedef Attachment<size_t> ug::d3f::RichardsFreeSurfaceHeight< TGridFunction >::num_a_type

type of the attachment numbering the vertices

◆ num_aa_type

template<typename TGridFunction >
typedef Grid::VertexAttachmentAccessor<num_a_type> ug::d3f::RichardsFreeSurfaceHeight< TGridFunction >::num_aa_type

type of the attachment accessor for the numbering attachment

◆ pos_acc_type

template<typename TGridFunction >
typedef domain_type::position_accessor_type ug::d3f::RichardsFreeSurfaceHeight< TGridFunction >::pos_acc_type

◆ this_type

template<typename TGridFunction >
typedef RichardsFreeSurfaceHeight<gf_type> ug::d3f::RichardsFreeSurfaceHeight< TGridFunction >::this_type

◆ val_a_type

template<typename TGridFunction >
typedef Attachment<number> ug::d3f::RichardsFreeSurfaceHeight< TGridFunction >::val_a_type

type of the attachment numbering the vertices

◆ val_aa_type

template<typename TGridFunction >
typedef Grid::VertexAttachmentAccessor<val_a_type> ug::d3f::RichardsFreeSurfaceHeight< TGridFunction >::val_aa_type

type of the attachment accessor for the value attachment

Constructor & Destructor Documentation

◆ RichardsFreeSurfaceHeight()

template<typename TGridFunction >
ug::d3f::RichardsFreeSurfaceHeight< TGridFunction >::RichardsFreeSurfaceHeight ( SmartPtr< gf_type spGf,
const char *  subset = "top",
const char *  cmp = "p" 
)

Member Function Documentation

◆ continuous()

template<typename TGridFunction >
virtual bool ug::d3f::RichardsFreeSurfaceHeight< TGridFunction >::continuous ( ) const
inlinevirtual

We consider here the height as a continuous field (although it is not completely so)

Implements ug::UserDataInfo.

◆ eval_and_deriv()

template<typename TGridFunction >
template<int refDim>
void ug::d3f::RichardsFreeSurfaceHeight< TGridFunction >::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 
)

Evaluates the free surface height at integration points of a grid element.

  • Interpolates the cached free surface heights from the vertices to the integration points using local shape functions.
Parameters
vValuefor the computed value

References ug::LFEID::LAGRANGE, ug::GridObject::reference_object_id(), ug::LocalShapeFunctionSet< int TDim, typename TShape, typename TGrad >::shapes(), and UG_THROW.

◆ reinit()

template<typename TGridFunction >
void ug::d3f::RichardsFreeSurfaceHeight< TGridFunction >::reinit ( )

Reinitializes the measurer.

  • Scans the specified subset, computes the free surface height (z-coordinate) at the xy-coordinates of each vertex, and caches these values.

References pcl::InterfaceCommunicator< class TLayout >::communicate(), pcl::InterfaceCommunicator< class TLayout >::exchange_data(), grid(), ug::DistributedGridManager::grid_layout_map(), ug::INT_H_MASTER, and ug::INT_H_SLAVE.

◆ requires_grid_fct()

template<typename TGridFunction >
virtual bool ug::d3f::RichardsFreeSurfaceHeight< TGridFunction >::requires_grid_fct ( ) const
inlinevirtual

Returns true to get the grid element in the evaluation routine.

Implements ug::UserDataInfo.

Member Data Documentation

◆ dim

template<typename TGridFunction >
const int ug::d3f::RichardsFreeSurfaceHeight< TGridFunction >::dim = gf_type::dim
static

◆ m_a_vrt_num

template<typename TGridFunction >
num_a_type ug::d3f::RichardsFreeSurfaceHeight< TGridFunction >::m_a_vrt_num
private

◆ m_a_vrt_val

template<typename TGridFunction >
val_a_type ug::d3f::RichardsFreeSurfaceHeight< TGridFunction >::m_a_vrt_val
private

◆ m_cmp

template<typename TGridFunction >
const char* ug::d3f::RichardsFreeSurfaceHeight< TGridFunction >::m_cmp
private

◆ m_glob_userdata

template<typename TGridFunction >
glob_userdata_type ug::d3f::RichardsFreeSurfaceHeight< TGridFunction >::m_glob_userdata
private

◆ m_measurement_points

template<typename TGridFunction >
std::vector<t_pnt_data> ug::d3f::RichardsFreeSurfaceHeight< TGridFunction >::m_measurement_points
private

◆ m_sp_ls_pos_z

template<typename TGridFunction >
measurer_type ug::d3f::RichardsFreeSurfaceHeight< TGridFunction >::m_sp_ls_pos_z
private

◆ m_sp_vrt_val

template<typename TGridFunction >
SmartPtr<std::vector<number> > ug::d3f::RichardsFreeSurfaceHeight< TGridFunction >::m_sp_vrt_val
private

◆ m_spGf

template<typename TGridFunction >
SmartPtr<gf_type> ug::d3f::RichardsFreeSurfaceHeight< TGridFunction >::m_spGf
private

◆ m_SsGrp

template<typename TGridFunction >
SubsetGroup ug::d3f::RichardsFreeSurfaceHeight< TGridFunction >::m_SsGrp
private

The documentation for this class was generated from the following files: