Plugins
Loading...
Searching...
No Matches
ug::d3f::LSPositionAtPoints< TLSPosZ > Class Template Reference

#include <level_set_pos.h>

Classes

struct  t_pnt_data
 type of point data More...
 

Public Types

typedef TLSPosZ t_ls_measurer
 measurer type
 

Public Member Functions

void add_pnt (MathVector< dim-1 > &xy, number z_spec=0, bool z_given=false)
 adds a point
 
void append_to_table (const char *file_name, size_t step, number time)
 appends the data to a given file
 
void clear_pnt ()
 clear the points
 
void compute ()
 compute the z-coordinates
 
const MathVector< dim-1 > & coord (size_t i)
 returns the low-dim. coordinates the point i
 
void load_points_from (const char *file_name, bool z_given=false)
 load points from a file
 
void load_points_from (std::istream &in, bool z_given=false)
 load points from a stream
 
 LSPositionAtPoints (SmartPtr< t_ls_measurer > sp_ls_measurer)
 constructor
 
size_t n_points ()
 returns the number points
 
void print (bool print_difference=false)
 prints the table of the points into the ug shell
 
void print_table_header (const char *file_name)
 prints the table header to a given file
 
void print_to (const char *file_name, bool print_difference=false)
 prints the table of the points into a file
 
void print_to (std::ostream &out, bool print_difference=false)
 prints the table of the points into a given stream
 
number spec_z_at_pnt (size_t i)
 return the specified z-coordinate at point i
 
number z_at_pnt (size_t i)
 return the computed z-coordinate at point i
 
bool z_is_spec (size_t i)
 return true iff the z-coordinate of point i is given
 

Static Public Attributes

static const int dim = t_ls_measurer::dim
 world dimension
 

Private Attributes

SmartPtr< t_ls_measurerm_sp_ls_measurer
 the measurer
 
std::vector< t_pnt_datam_v_points
 the points to evaluate at
 

Detailed Description

template<typename TLSPosZ>
class ug::d3f::LSPositionAtPoints< TLSPosZ >

Class for getting the z-coordinate of the free level set at points

Template Parameters
TLSPosZthe measurer type

Member Typedef Documentation

◆ t_ls_measurer

template<typename TLSPosZ >
typedef TLSPosZ ug::d3f::LSPositionAtPoints< TLSPosZ >::t_ls_measurer

measurer type

Constructor & Destructor Documentation

◆ LSPositionAtPoints()

template<typename TLSPosZ >
ug::d3f::LSPositionAtPoints< TLSPosZ >::LSPositionAtPoints ( SmartPtr< t_ls_measurer sp_ls_measurer)
inline

constructor

Parameters
sp_ls_measurerthe measurer

Member Function Documentation

◆ add_pnt()

template<typename TLSPosZ >
void ug::d3f::LSPositionAtPoints< TLSPosZ >::add_pnt ( MathVector< dim-1 > &  xy,
number  z_spec = 0,
bool  z_given = false 
)
inline

adds a point

Parameters
xylow-dim coordinate of the point
z_specexpected value of z-coordinate
z_giveniff z is specified

References ug::d3f::LSPositionAtPoints< TLSPosZ >::m_v_points.

◆ append_to_table()

template<typename TLSPosZ >
void ug::d3f::LSPositionAtPoints< TLSPosZ >::append_to_table ( const char *  file_name,
size_t  step,
number  time 
)

appends the data to a given file

Appends the data to a given file

Parameters
file_nameprint to this file
steptime step no.
timetime argument

References pcl::ProcessCommunicator::get_proc_id(), pcl::ProcRank(), UG_COND_THROW, ug::d3f::LSPositionAtPoints< TLSPosZ >::t_pnt_data::valid, and ug::d3f::LSPositionAtPoints< TLSPosZ >::t_pnt_data::z.

◆ clear_pnt()

template<typename TLSPosZ >
void ug::d3f::LSPositionAtPoints< TLSPosZ >::clear_pnt ( )
inline

◆ compute()

◆ coord()

template<typename TLSPosZ >
const MathVector< dim-1 > & ug::d3f::LSPositionAtPoints< TLSPosZ >::coord ( size_t  i)
inline

returns the low-dim. coordinates the point i

References ug::d3f::LSPositionAtPoints< TLSPosZ >::m_v_points.

◆ load_points_from() [1/2]

template<typename TLSPosZ >
void ug::d3f::LSPositionAtPoints< TLSPosZ >::load_points_from ( const char *  file_name,
bool  z_given = false 
)

load points from a file

Loads the point data from a file

Parameters
file_namefile to read data from
z_givenif the file specifies the z_coordinate, too

References ug::FindFileInStandardPaths(), and UG_COND_THROW.

◆ load_points_from() [2/2]

template<typename TLSPosZ >
void ug::d3f::LSPositionAtPoints< TLSPosZ >::load_points_from ( std::istream &  in,
bool  z_given = false 
)

load points from a stream

Loads the point data from a stream

Parameters
instream to read data from
z_givenif the file specifies the z_coordinate, too

References UG_THROW.

◆ n_points()

template<typename TLSPosZ >
size_t ug::d3f::LSPositionAtPoints< TLSPosZ >::n_points ( )
inline

returns the number points

References ug::d3f::LSPositionAtPoints< TLSPosZ >::m_v_points.

◆ print()

template<typename TLSPosZ >
void ug::d3f::LSPositionAtPoints< TLSPosZ >::print ( bool  print_difference = false)
inline

prints the table of the points into the ug shell

Parameters
print_differenceif to print the given z and the difference

References ug::GetLogAssistant(), and ug::d3f::LSPositionAtPoints< TLSPosZ >::print_to().

◆ print_table_header()

template<typename TLSPosZ >
void ug::d3f::LSPositionAtPoints< TLSPosZ >::print_table_header ( const char *  file_name)

◆ print_to() [1/2]

template<typename TLSPosZ >
void ug::d3f::LSPositionAtPoints< TLSPosZ >::print_to ( const char *  file_name,
bool  print_difference = false 
)

prints the table of the points into a file

Prints the point data to a file

Parameters
file_nameprint to this file
print_differenceif to print the given z and the difference

References pcl::ProcessCommunicator::get_proc_id(), pcl::ProcRank(), and UG_COND_THROW.

◆ print_to() [2/2]

template<typename TLSPosZ >
void ug::d3f::LSPositionAtPoints< TLSPosZ >::print_to ( std::ostream &  out,
bool  print_difference = false 
)

◆ spec_z_at_pnt()

template<typename TLSPosZ >
number ug::d3f::LSPositionAtPoints< TLSPosZ >::spec_z_at_pnt ( size_t  i)
inline

return the specified z-coordinate at point i

References ug::d3f::LSPositionAtPoints< TLSPosZ >::m_v_points.

◆ z_at_pnt()

template<typename TLSPosZ >
number ug::d3f::LSPositionAtPoints< TLSPosZ >::z_at_pnt ( size_t  i)
inline

return the computed z-coordinate at point i

References ug::d3f::LSPositionAtPoints< TLSPosZ >::m_v_points.

◆ z_is_spec()

template<typename TLSPosZ >
bool ug::d3f::LSPositionAtPoints< TLSPosZ >::z_is_spec ( size_t  i)
inline

return true iff the z-coordinate of point i is given

References ug::d3f::LSPositionAtPoints< TLSPosZ >::m_v_points.

Member Data Documentation

◆ dim

template<typename TLSPosZ >
const int ug::d3f::LSPositionAtPoints< TLSPosZ >::dim = t_ls_measurer::dim
static

world dimension

◆ m_sp_ls_measurer

template<typename TLSPosZ >
SmartPtr<t_ls_measurer> ug::d3f::LSPositionAtPoints< TLSPosZ >::m_sp_ls_measurer
private

the measurer

◆ m_v_points


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