Plugins
Loading...
Searching...
No Matches
ug::LevelSet::LSFbyRaster< TGridFunc > Class Template Reference

#include <ls_init.h>

Classes

class  z_ray_tracer_t
 an auxiliary class for the computation of the relative height More...
 

Public Member Functions

void interpolate_to (SmartPtr< TGridFunc > spLSF)
 computes the level-set function
 
 LSFbyRaster (const char *raster_file)
 class constructor
 
void set_local_top_faces_only (bool localTopFacesOnly)
 if relative values are used, tells whether the value can be obtained by local top faces only
 
void set_rel_default (number default_top_z)
 sets default position of the top (only used if m_bRelative)
 
void set_rel_tolerance (number tolerance)
 sets the tolerance for getting the position of the top (only used if m_bRelative)
 
void set_relative_to (const char *top_ss_names)
 sets the top subset
 
void set_relative_to (const char *top_ss_names, int grid_level)
 sets the top subset
 

Private Types

typedef TGridFunc::algebra_type algebra_type
 type of the algebra
 
typedef TGridFunc::domain_type domain_type
 type of the domain
 
typedef grid_dim_traits< dim >::element_type elem_t
 element type
 
typedef TGridFunc grid_func_type
 grid function type
 
typedef domain_type::grid_type grid_type
 grid type
 
typedef domain_type::position_accessor_type position_accessor_type
 type of the position accessor
 
typedef domain_type::position_attachment_type position_attachment_type
 type of the position accessor
 
typedef Raster< number, dim - 1 > raster_t
 the raster of the heights
 
typedef grid_dim_traits< dim-1 >::element_type side_t
 side type
 
typedef LSFbyRaster< TGridFunc > this_type
 this type
 
typedef TGridFunc::template traits< Vertex >::const_iterator VertexConstIterator
 vertex base iterator
 

Private Attributes

bool m_bDefaultTop
 whether the default position of the top is specified
 
bool m_bRelative
 whether relative to the top
 
bool m_localTopFacesOnly
 
raster_t m_raster
 
number m_rt_default
 default position of the top (if the ray tracing fails) - used only if m_bRelative
 
int m_rt_gl
 grid level of the top surface (or -1 if the surface)
 
number m_rt_tol
 tolerance for the ray tracing (to the top surfaces)
 
std::string m_top_ss_names
 top subsets (if specified)
 

Static Private Attributes

static const int dim = TGridFunc::dim
 world dimension
 

Detailed Description

template<typename TGridFunc>
class ug::LevelSet::LSFbyRaster< TGridFunc >

Initialization of a level-set function from a height raster.

The raster specifies the levels (heights, negated depths) of the level-set function possible relatively to a specified top subset.

Template Parameters
TGridFunctype of the grid function

Member Typedef Documentation

◆ algebra_type

template<typename TGridFunc >
typedef TGridFunc::algebra_type ug::LevelSet::LSFbyRaster< TGridFunc >::algebra_type
private

type of the algebra

◆ domain_type

template<typename TGridFunc >
typedef TGridFunc::domain_type ug::LevelSet::LSFbyRaster< TGridFunc >::domain_type
private

type of the domain

◆ elem_t

template<typename TGridFunc >
typedef grid_dim_traits<dim>::element_type ug::LevelSet::LSFbyRaster< TGridFunc >::elem_t
private

element type

◆ grid_func_type

template<typename TGridFunc >
typedef TGridFunc ug::LevelSet::LSFbyRaster< TGridFunc >::grid_func_type
private

grid function type

◆ grid_type

template<typename TGridFunc >
typedef domain_type::grid_type ug::LevelSet::LSFbyRaster< TGridFunc >::grid_type
private

grid type

◆ position_accessor_type

template<typename TGridFunc >
typedef domain_type::position_accessor_type ug::LevelSet::LSFbyRaster< TGridFunc >::position_accessor_type
private

type of the position accessor

◆ position_attachment_type

template<typename TGridFunc >
typedef domain_type::position_attachment_type ug::LevelSet::LSFbyRaster< TGridFunc >::position_attachment_type
private

type of the position accessor

◆ raster_t

template<typename TGridFunc >
typedef Raster<number, dim - 1> ug::LevelSet::LSFbyRaster< TGridFunc >::raster_t
private

the raster of the heights

◆ side_t

template<typename TGridFunc >
typedef grid_dim_traits<dim-1>::element_type ug::LevelSet::LSFbyRaster< TGridFunc >::side_t
private

side type

◆ this_type

template<typename TGridFunc >
typedef LSFbyRaster<TGridFunc> ug::LevelSet::LSFbyRaster< TGridFunc >::this_type
private

this type

◆ VertexConstIterator

template<typename TGridFunc >
typedef TGridFunc::template traits<Vertex>::const_iterator ug::LevelSet::LSFbyRaster< TGridFunc >::VertexConstIterator
private

vertex base iterator

Constructor & Destructor Documentation

◆ LSFbyRaster()

template<typename TGridFunc >
ug::LevelSet::LSFbyRaster< TGridFunc >::LSFbyRaster ( const char *  raster_file)
inline

class constructor

Parameters
raster_fileASCII raster file

References ug::Raster< class T, int TDIM >::load_from_asc(), and ug::LevelSet::LSFbyRaster< TGridFunc >::m_raster.

Member Function Documentation

◆ interpolate_to()

template<typename TGridFunc >
void ug::LevelSet::LSFbyRaster< TGridFunc >::interpolate_to ( SmartPtr< TGridFunc >  spLSF)

computes the level-set function

Interpolates the raster at the grid points and corrects the values by the level of the top subset (if specified).

Parameters
spLSFthe level-set function to compute

References ug::DoFRef(), ug::PST_CONSISTENT, UG_THROW, and SmartPtr< typename T, template< class TT > class FreePolicy >::valid().

◆ set_local_top_faces_only()

template<typename TGridFunc >
void ug::LevelSet::LSFbyRaster< TGridFunc >::set_local_top_faces_only ( bool  localTopFacesOnly)
inline

if relative values are used, tells whether the value can be obtained by local top faces only

References ug::LevelSet::LSFbyRaster< TGridFunc >::m_localTopFacesOnly.

◆ set_rel_default()

template<typename TGridFunc >
void ug::LevelSet::LSFbyRaster< TGridFunc >::set_rel_default ( number  default_top_z)
inline

sets default position of the top (only used if m_bRelative)

Parameters
default_top_zdefault value if the ray tracing fails

References ug::LevelSet::LSFbyRaster< TGridFunc >::m_bDefaultTop, and ug::LevelSet::LSFbyRaster< TGridFunc >::m_rt_default.

◆ set_rel_tolerance()

template<typename TGridFunc >
void ug::LevelSet::LSFbyRaster< TGridFunc >::set_rel_tolerance ( number  tolerance)
inline

sets the tolerance for getting the position of the top (only used if m_bRelative)

Parameters
tolerancetolerance of the ray tracing

References ug::LevelSet::LSFbyRaster< TGridFunc >::m_rt_tol.

◆ set_relative_to() [1/2]

template<typename TGridFunc >
void ug::LevelSet::LSFbyRaster< TGridFunc >::set_relative_to ( const char *  top_ss_names)
inline

sets the top subset

Parameters
top_ss_namesnames of the top subsets

References ug::LevelSet::LSFbyRaster< TGridFunc >::m_bRelative, and ug::LevelSet::LSFbyRaster< TGridFunc >::m_top_ss_names.

◆ set_relative_to() [2/2]

template<typename TGridFunc >
void ug::LevelSet::LSFbyRaster< TGridFunc >::set_relative_to ( const char *  top_ss_names,
int  grid_level 
)
inline

sets the top subset

Parameters
top_ss_namesnames of the top subsets
grid_levelgrid level of the top subset

References ug::LevelSet::LSFbyRaster< TGridFunc >::m_bRelative, ug::LevelSet::LSFbyRaster< TGridFunc >::m_rt_gl, and ug::LevelSet::LSFbyRaster< TGridFunc >::m_top_ss_names.

Member Data Documentation

◆ dim

template<typename TGridFunc >
const int ug::LevelSet::LSFbyRaster< TGridFunc >::dim = TGridFunc::dim
staticprivate

◆ m_bDefaultTop

template<typename TGridFunc >
bool ug::LevelSet::LSFbyRaster< TGridFunc >::m_bDefaultTop
private

whether the default position of the top is specified

Referenced by ug::LevelSet::LSFbyRaster< TGridFunc >::set_rel_default().

◆ m_bRelative

template<typename TGridFunc >
bool ug::LevelSet::LSFbyRaster< TGridFunc >::m_bRelative
private

◆ m_localTopFacesOnly

template<typename TGridFunc >
bool ug::LevelSet::LSFbyRaster< TGridFunc >::m_localTopFacesOnly
private

◆ m_raster

template<typename TGridFunc >
raster_t ug::LevelSet::LSFbyRaster< TGridFunc >::m_raster
private

◆ m_rt_default

template<typename TGridFunc >
number ug::LevelSet::LSFbyRaster< TGridFunc >::m_rt_default
private

default position of the top (if the ray tracing fails) - used only if m_bRelative

Referenced by ug::LevelSet::LSFbyRaster< TGridFunc >::set_rel_default().

◆ m_rt_gl

template<typename TGridFunc >
int ug::LevelSet::LSFbyRaster< TGridFunc >::m_rt_gl
private

grid level of the top surface (or -1 if the surface)

Referenced by ug::LevelSet::LSFbyRaster< TGridFunc >::set_relative_to().

◆ m_rt_tol

template<typename TGridFunc >
number ug::LevelSet::LSFbyRaster< TGridFunc >::m_rt_tol
private

tolerance for the ray tracing (to the top surfaces)

Referenced by ug::LevelSet::LSFbyRaster< TGridFunc >::set_rel_tolerance().

◆ m_top_ss_names

template<typename TGridFunc >
std::string ug::LevelSet::LSFbyRaster< TGridFunc >::m_top_ss_names
private

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