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

#include <rivers.h>

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

Public Types

typedef TGridFunction::algebra_type algebra_type
 type of the algebra
 
typedef TGridFunction::domain_type domain_type
 type of the domain
 
typedef TGridFunction grid_func_type
 grid function type
 
typedef domain_type::grid_type grid_type
 grid type
 
- Public Types inherited from ug::d3f::VertexLowDimRecharge< TGridFunction >
typedef TGridFunction::algebra_type algebra_type
 type of the algebra
 
typedef TGridFunction::domain_type domain_type
 type of the domain
 
typedef grid_dim_traits< dim >::side_type g_surf_elem_t
 type of the elements constituting surfaces in the grid
 
typedef geometry_traits< g_surf_elem_t >::iterator g_surf_iter_t
 type of the iterator of the grid surface elements
 
typedef TGridFunction grid_func_type
 grid function type
 
typedef domain_type::grid_type grid_type
 grid type
 
typedef RayElemIntersectionRecord< g_surf_elem_t * > top_intersection_record_t
 
typedef lg_ntree< dim-1, dim, g_surf_elem_ttop_tracer_tree_t
 

Public Member Functions

void check_fs_covering (bool v)
 sets the verification of the covering by the free surface
 
void check_top_covering (bool v)
 sets the verification of the covering by the top subset
 
void file_output_prefix (const char *s)
 sets the prefix to add to every line in the file
 
number fs_depth_for (const Edge *seg) const
 gets the depth of the free surface for a segment
 
void print_total_recharge (bool v)
 whether to print the total integrated recharge
 
void print_total_recharge (const char *f_name)
 whether to print the total integrated recharge to a file
 
void reset_river_depth ()
 set the river depth from the fs depth
 
number river_depth_for (const Edge *seg) const
 gets the depth of the river for a segment
 
SmartPtr< SegmentNetworkriver_network () const
 returns the river network
 
number river_width_for (const Edge *seg) const
 gets the with of the river for a segment
 
void save_river_depth (const char *file_name)
 save the river network with the fs depth in a file
 
void set_river_width (number riverWidth)
 sets river width for all segments
 
void set_river_width (number riverWidth, const char *ss_name)
 sets river width for a particular subset by name
 
void set_river_width (number riverWidth, int ssi)
 sets river width for a particular subset
 
void use_nodal_fs_height (bool v)
 sets measuring the depth of the free surface from the centers of the segments to the nodes and back
 
 VertexRiverRecharge (SmartPtr< SegmentNetwork > spRiverNetwork, number smoothLen, SmartPtr< grid_func_type > spLSF)
 class constructor
 
virtual ~VertexRiverRecharge ()
 class destructor
 
- Public Member Functions inherited from ug::d3f::VertexLowDimRecharge< TGridFunction >
void compute (SmartPtr< grid_func_type > spRecharge)
 computes the recharge at the vertices
 
number max_depth_diff () const
 returns the set maximum depth difference
 
bool no_inflow () const
 returns the state of the possible inflow
 
bool restrict_depth () const
 returns the state of the depth restriction
 
void restrict_depth (number max_depth_diff)
 restricts the depth
 
void set_bottom_thickness (number e)
 sets the thickness of the bottom
 
void set_constant_flux (number flux)
 sets the constant flux (mainly for debugging purposes)
 
void set_density (number rho)
 sets the density of the water
 
void set_gravity (number g)
 sets the gravity
 
void set_no_inflow (bool b)
 switches the possible inflow on/off
 
void set_permeability (number k)
 sets the permeability of the bottom
 
void set_relative_to (const char *subsetNames)
 specifyes the subsets of the top
 
void set_relative_to (const char *subsetNames, number top_tolerance)
 specifyes the subsets of the top
 
void set_relative_to (const char *subsetNames, number top_tolerance, int top_grid_level)
 specifyes the subsets of the top
 
void set_viscosity (number mu)
 sets the viscosity of the water
 
void simple_compute (SmartPtr< grid_func_type > spRecharge)
 computes the recharge at the vertices
 
number smooth_len () const
 returns the smoothing parameter
 
 VertexLowDimRecharge (number smoothLen, SmartPtr< grid_func_type > spLSF)
 constructor
 

Static Public Attributes

static const int dim = TGridFunction::dim
 world dimension
 
- Static Public Attributes inherited from ug::d3f::VertexLowDimRecharge< TGridFunction >
static const int dim = TGridFunction::dim
 world dimension
 
static const int mol_dim = dim - 1
 dimension of the mollifier
 

Private Types

typedef Grid::EdgeAttachmentAccessor< depth_attachment_typedepth_accessor_type
 accessor type for the depth attachment
 
typedef ANumber depth_attachment_type
 attachment type for the depth of segments of the rivers
 
typedef VertexRiverRecharge< TGridFunction > this_type
 this type
 

Private Member Functions

virtual void compute_depths ()
 fills the attachment with the depths of the free surface
 
void compute_fs_depths_at_nodes ()
 computes the depths of the free surface at the nodes of the river vertices
 
void compute_fs_depths_at_segments ()
 computes the depths of the free surface at the centers of the river segments
 
void do_print_total_recharge ()
 prints the total recharge
 
virtual number simple_smoothed_recharge_at (MathVector< dim > &x) const
 computes the smoothed recharge at a given point neglecting the depths, width etc.
 
virtual number smoothed_recharge_at (MathVector< dim > &x) const
 computes the smoothed recharge at a given point
 

Private Attributes

depth_accessor_type m_aaFSDepth
 accessor for the attachment for the depth of the free surface
 
depth_accessor_type m_aaRiverDepth
 accessor for the attachment for the depth of the rivers
 
depth_accessor_type m_aaRiverWidth
 accessor forthe attachment for the width of the rivers
 
depth_attachment_type m_aFSDepth
 attachment for the depth of the free surface for the segments
 
depth_attachment_type m_aRiverDepth
 attachment for the specified depth of the rivers at the segments
 
depth_attachment_type m_aRiverWidth
 attachment for the width of the rivers
 
bool m_bCheckFSCovering
 whether to check the covering of the river segments by the free surface
 
bool m_bCheckTopCovering
 whether to check the covering of the river segments by the top subset
 
bool m_bNodalFSDepth
 whether to measure the depth of the free surface at the nodes, not in the segments
 
bool m_bPrintTotalRecharge
 whether to print the total recharge integrated over the rivers
 
std::string m_sOutputPrefix
 ... and prepend the following prefix to the lines
 
SmartPtr< SegmentNetworkm_spRiverNetwork
 grid of the river segments
 
std::string m_sTotalRechargeFile
 if yes, if to print it into a file, too
 

Additional Inherited Members

- Protected Member Functions inherited from ug::d3f::VertexLowDimRecharge< TGridFunction >
number get_ls_height_at (MathVector< dim-1 > &x)
 computes the z-coordinate of the level set at a given point
 
size_t get_top_z (const MathVector< dim > &over)
 get the intersection with the top
 
bool ls_depth_is_relative ()
 returns true iff the depths should be relative
 
size_t min_top_depth (MathVector< dim-1 > &x, number &min_depth)
 computes the minimum z-coordinate of the top surface (returns the number of the intersections)
 
number object_recharge (number h_s, number h_fs, number w) const
 the river recharge intensivity (according to the model)
 
void prepare_ls_height ()
 initializes the level-set z-coordinate computations
 
- Protected Attributes inherited from ug::d3f::VertexLowDimRecharge< TGridFunction >
number m_constant_flux
 the intensity per unit length if constant (all other parameters are ignored)
 
number m_density
 density of the water
 
number m_e
 thickness of the bottom
 
number m_gravity
 gravity
 
bool m_is_constant
 if to use the constant intensity
 
LSPositionZ< grid_func_typem_lsPosZ
 depth measurer for the level set
 
number m_max_depth_diff
 max. depth difference (if restricted)
 
bool m_no_inflow
 whether to switch the possible inflow off
 
number m_perm
 permeability of the bottom
 
bool m_restrict_depth
 if to restrict the depth
 
number m_smoothLen
 smoothing parameter (of the mollifier)
 
SmartPtr< top_tracer_tree_tm_spTopTracerTree
 tree for the top ray traicer
 
number m_top_tolerance
 tolerance for the projection to the top
 
std::vector< top_intersection_record_tm_topIntersectionRecords
 top intersection tracer auxiliary data struction
 
std::vector< MathVector< dim > > m_topTracePoints
 intersection points with the top subsets
 
number m_viscosity
 viscosity of the water
 

Detailed Description

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

Class for the computation of the recharge by the rivers at vertices

This class computes the (positive or negative) recharge introduced by the rivers at the vertices of the computation grid.

Template Parameters
TFunctiontype of the vertex-centered grid function

Member Typedef Documentation

◆ algebra_type

template<typename TGridFunction >
typedef TGridFunction::algebra_type ug::d3f::VertexRiverRecharge< TGridFunction >::algebra_type

type of the algebra

◆ depth_accessor_type

template<typename TGridFunction >
typedef Grid::EdgeAttachmentAccessor<depth_attachment_type> ug::d3f::VertexRiverRecharge< TGridFunction >::depth_accessor_type
private

accessor type for the depth attachment

◆ depth_attachment_type

template<typename TGridFunction >
typedef ANumber ug::d3f::VertexRiverRecharge< TGridFunction >::depth_attachment_type
private

attachment type for the depth of segments of the rivers

◆ domain_type

template<typename TGridFunction >
typedef TGridFunction::domain_type ug::d3f::VertexRiverRecharge< TGridFunction >::domain_type

type of the domain

◆ grid_func_type

template<typename TGridFunction >
typedef TGridFunction ug::d3f::VertexRiverRecharge< TGridFunction >::grid_func_type

grid function type

◆ grid_type

template<typename TGridFunction >
typedef domain_type::grid_type ug::d3f::VertexRiverRecharge< TGridFunction >::grid_type

grid type

◆ this_type

template<typename TGridFunction >
typedef VertexRiverRecharge<TGridFunction> ug::d3f::VertexRiverRecharge< TGridFunction >::this_type
private

this type

Constructor & Destructor Documentation

◆ VertexRiverRecharge()

◆ ~VertexRiverRecharge()

Member Function Documentation

◆ check_fs_covering()

template<typename TGridFunction >
void ug::d3f::VertexRiverRecharge< TGridFunction >::check_fs_covering ( bool  v)
inline

sets the verification of the covering by the free surface

References ug::d3f::VertexRiverRecharge< TGridFunction >::m_bCheckFSCovering.

◆ check_top_covering()

template<typename TGridFunction >
void ug::d3f::VertexRiverRecharge< TGridFunction >::check_top_covering ( bool  v)
inline

sets the verification of the covering by the top subset

References ug::d3f::VertexRiverRecharge< TGridFunction >::m_bCheckTopCovering.

◆ compute_depths()

template<typename TGridFunction >
void ug::d3f::VertexRiverRecharge< TGridFunction >::compute_depths ( )
privatevirtual

fills the attachment with the depths of the free surface

Computes the depths of the segments.

Implements ug::d3f::VertexLowDimRecharge< TGridFunction >.

References pcl::ProcessCommunicator::allreduce(), ug::Grid::num_edges(), PCL_RO_MIN, UG_THROW, and ug::EdgeVertices::vertex().

◆ compute_fs_depths_at_nodes()

template<typename TGridFunction >
void ug::d3f::VertexRiverRecharge< TGridFunction >::compute_fs_depths_at_nodes ( )
private

computes the depths of the free surface at the nodes of the river vertices

Computes the depths of the free surface at the centers of the river segments.

References pcl::ProcessCommunicator::allreduce(), ug::Grid::attach_to_vertices(), ug::Grid::detach_from_vertices(), ug::Grid::num_vertices(), PCL_RO_MAX, UG_THROW, and ug::EdgeVertices::vertex().

◆ compute_fs_depths_at_segments()

template<typename TGridFunction >
void ug::d3f::VertexRiverRecharge< TGridFunction >::compute_fs_depths_at_segments ( )
private

computes the depths of the free surface at the centers of the river segments

Computes the depths of the free surface at the centers of the river segments.

References pcl::ProcessCommunicator::allreduce(), ug::Grid::num_edges(), PCL_RO_MAX, UG_THROW, and ug::EdgeVertices::vertex().

◆ do_print_total_recharge()

template<typename TGridFunction >
void ug::d3f::VertexRiverRecharge< TGridFunction >::do_print_total_recharge ( )
private

prints the total recharge

Prints the integrated recharge through the rivers.

References pcl::ProcessCommunicator::get_proc_id(), pcl::ProcRank(), UG_COND_THROW, UG_LOG, ug::VecDistance(), and ug::EdgeVertices::vertex().

◆ file_output_prefix()

template<typename TGridFunction >
void ug::d3f::VertexRiverRecharge< TGridFunction >::file_output_prefix ( const char *  s)
inline

sets the prefix to add to every line in the file

References ug::d3f::VertexRiverRecharge< TGridFunction >::m_sOutputPrefix, and s.

◆ fs_depth_for()

template<typename TGridFunction >
number ug::d3f::VertexRiverRecharge< TGridFunction >::fs_depth_for ( const Edge seg) const
inline

gets the depth of the free surface for a segment

References ug::d3f::VertexRiverRecharge< TGridFunction >::m_aaFSDepth.

◆ print_total_recharge() [1/2]

template<typename TGridFunction >
void ug::d3f::VertexRiverRecharge< TGridFunction >::print_total_recharge ( bool  v)
inline

whether to print the total integrated recharge

References ug::d3f::VertexRiverRecharge< TGridFunction >::m_bPrintTotalRecharge.

◆ print_total_recharge() [2/2]

template<typename TGridFunction >
void ug::d3f::VertexRiverRecharge< TGridFunction >::print_total_recharge ( const char *  f_name)
inline

◆ reset_river_depth()

template<typename TGridFunction >
void ug::d3f::VertexRiverRecharge< TGridFunction >::reset_river_depth ( )

set the river depth from the fs depth

Sets the river depth to the fs depth.

References pcl::ProcessCommunicator::allreduce(), ug::Grid::attach_to_vertices(), ug::Grid::detach_from_vertices(), ug::Grid::num_vertices(), PCL_RO_MAX, and UG_THROW.

◆ river_depth_for()

template<typename TGridFunction >
number ug::d3f::VertexRiverRecharge< TGridFunction >::river_depth_for ( const Edge seg) const
inline

gets the depth of the river for a segment

References ug::d3f::VertexRiverRecharge< TGridFunction >::m_aaRiverDepth.

◆ river_network()

template<typename TGridFunction >
SmartPtr< SegmentNetwork > ug::d3f::VertexRiverRecharge< TGridFunction >::river_network ( ) const
inline

◆ river_width_for()

template<typename TGridFunction >
number ug::d3f::VertexRiverRecharge< TGridFunction >::river_width_for ( const Edge seg) const
inline

gets the with of the river for a segment

References ug::d3f::VertexRiverRecharge< TGridFunction >::m_aaRiverWidth.

◆ save_river_depth()

template<typename TGridFunction >
void ug::d3f::VertexRiverRecharge< TGridFunction >::save_river_depth ( const char *  file_name)

save the river network with the fs depth in a file

Saves the river network in a file with the nodal fs depths in the z-coordinates.

Parameters
file_namefile to save in

References pcl::ProcessCommunicator::allreduce(), ug::Grid::attach_to_vertices(), ug::Grid::detach_from_vertices(), ug::Grid::num_vertices(), PCL_RO_MAX, and UG_THROW.

◆ set_river_width() [1/3]

template<typename TGridFunction >
void ug::d3f::VertexRiverRecharge< TGridFunction >::set_river_width ( number  riverWidth)

sets river width for all segments

Initializes the river width attachment for all segments.

Parameters
riverWidththe width

Referenced by ug::d3f::VertexRiverRecharge< TGridFunction >::VertexRiverRecharge().

◆ set_river_width() [2/3]

template<typename TGridFunction >
void ug::d3f::VertexRiverRecharge< TGridFunction >::set_river_width ( number  riverWidth,
const char *  ss_name 
)

sets river width for a particular subset by name

Initializes the river width attachment for a particular subset given by name.

Parameters
riverWidththe width
ss_namesubset name

References ug::ISubsetHandler::get_subset_index(), ug::TokenizeTrimString(), and UG_THROW.

◆ set_river_width() [3/3]

template<typename TGridFunction >
void ug::d3f::VertexRiverRecharge< TGridFunction >::set_river_width ( number  riverWidth,
int  ssi 
)

sets river width for a particular subset

Initializes the river width attachment for a particular subset id.

Parameters
riverWidththe width
ssisubset index in the segment grid

◆ simple_smoothed_recharge_at()

template<typename TGridFunction >
number ug::d3f::VertexRiverRecharge< TGridFunction >::simple_smoothed_recharge_at ( MathVector< dim > &  x) const
privatevirtual

computes the smoothed recharge at a given point neglecting the depths, width etc.

Parameters
xcoordinates of the points where to get the recharge

Implements ug::d3f::VertexLowDimRecharge< TGridFunction >.

References ug::Grid::begin(), ug::Grid::end(), ug::VecDistance(), and ug::EdgeVertices::vertex().

◆ smoothed_recharge_at()

template<typename TGridFunction >
number ug::d3f::VertexRiverRecharge< TGridFunction >::smoothed_recharge_at ( MathVector< dim > &  x) const
privatevirtual

computes the smoothed recharge at a given point

Computes the smoothed recharge of all the segments of the river in a given neighbourhood.

Parameters
xcoordinates of the points where to get the recharge

Implements ug::d3f::VertexLowDimRecharge< TGridFunction >.

References ug::Grid::begin(), ug::Grid::end(), ug::VecDistance(), and ug::EdgeVertices::vertex().

◆ use_nodal_fs_height()

template<typename TGridFunction >
void ug::d3f::VertexRiverRecharge< TGridFunction >::use_nodal_fs_height ( bool  v)
inline

sets measuring the depth of the free surface from the centers of the segments to the nodes and back

References ug::d3f::VertexRiverRecharge< TGridFunction >::m_bNodalFSDepth.

Member Data Documentation

◆ dim

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

world dimension

◆ m_aaFSDepth

template<typename TGridFunction >
depth_accessor_type ug::d3f::VertexRiverRecharge< TGridFunction >::m_aaFSDepth
private

◆ m_aaRiverDepth

template<typename TGridFunction >
depth_accessor_type ug::d3f::VertexRiverRecharge< TGridFunction >::m_aaRiverDepth
private

◆ m_aaRiverWidth

template<typename TGridFunction >
depth_accessor_type ug::d3f::VertexRiverRecharge< TGridFunction >::m_aaRiverWidth
private

◆ m_aFSDepth

template<typename TGridFunction >
depth_attachment_type ug::d3f::VertexRiverRecharge< TGridFunction >::m_aFSDepth
private

◆ m_aRiverDepth

template<typename TGridFunction >
depth_attachment_type ug::d3f::VertexRiverRecharge< TGridFunction >::m_aRiverDepth
private

◆ m_aRiverWidth

template<typename TGridFunction >
depth_attachment_type ug::d3f::VertexRiverRecharge< TGridFunction >::m_aRiverWidth
private

◆ m_bCheckFSCovering

template<typename TGridFunction >
bool ug::d3f::VertexRiverRecharge< TGridFunction >::m_bCheckFSCovering
private

whether to check the covering of the river segments by the free surface

Referenced by ug::d3f::VertexRiverRecharge< TGridFunction >::check_fs_covering().

◆ m_bCheckTopCovering

template<typename TGridFunction >
bool ug::d3f::VertexRiverRecharge< TGridFunction >::m_bCheckTopCovering
private

whether to check the covering of the river segments by the top subset

Referenced by ug::d3f::VertexRiverRecharge< TGridFunction >::check_top_covering().

◆ m_bNodalFSDepth

template<typename TGridFunction >
bool ug::d3f::VertexRiverRecharge< TGridFunction >::m_bNodalFSDepth
private

whether to measure the depth of the free surface at the nodes, not in the segments

Referenced by ug::d3f::VertexRiverRecharge< TGridFunction >::use_nodal_fs_height().

◆ m_bPrintTotalRecharge

template<typename TGridFunction >
bool ug::d3f::VertexRiverRecharge< TGridFunction >::m_bPrintTotalRecharge
private

◆ m_sOutputPrefix

template<typename TGridFunction >
std::string ug::d3f::VertexRiverRecharge< TGridFunction >::m_sOutputPrefix
private

... and prepend the following prefix to the lines

Referenced by ug::d3f::VertexRiverRecharge< TGridFunction >::file_output_prefix().

◆ m_spRiverNetwork

◆ m_sTotalRechargeFile

template<typename TGridFunction >
std::string ug::d3f::VertexRiverRecharge< TGridFunction >::m_sTotalRechargeFile
private

if yes, if to print it into a file, too

Referenced by ug::d3f::VertexRiverRecharge< TGridFunction >::print_total_recharge().


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