Commit 76513f27 authored by Laurent Belcour's avatar Laurent Belcour Committed by Ludovic Courtès

[Clean] Remove tabs from vertical_segments.

parent bef8223f
......@@ -42,103 +42,100 @@
* control the behaviour of the vertical segments using the following
* option in the command line:
*
* + <strong>\-\-dt</strong> specify the size of the vertical segment. If the
* option <strong>\-\-dt-relative</strong> is not set, this size is absolute: \f$ [x,
* x - dt, x + dt] \f$. If the <strong>\-\-dt-relative</strong> option is set, the
* vertical segment size is relative to the middle point value \f$ x \f$:
* \f$ [x, x (1 - dt), x (1 + dt)] \f$. You can specify the vertical
* segment to be equal to the max of the relative and absolute sizes
* using the <strong>\-\-dt-max</strong> option.
* + <strong>\-\-dt</strong> specify the size of the vertical segment. If the
* option <strong>\-\-dt-relative</strong> is not set, this size is absolute: \f$ [x,
* x - dt, x + dt] \f$. If the <strong>\-\-dt-relative</strong> option is set, the
* vertical segment size is relative to the middle point value \f$ x \f$:
* \f$ [x, x (1 - dt), x (1 + dt)] \f$. You can specify the vertical
* segment to be equal to the max of the relative and absolute sizes
* using the <strong>\-\-dt-max</strong> option.
*
* + <strong>\-\-data-positive</strong> for the vertical segment to stay in the
* positive region. The negative values are replaced by zeros.
* positive region. The negative values are replaced by zeros.
*
*
* The data of the vertical segment can be restricted to subpart of the
* original data by specifying the bounding box of the input and output
* domain:
*
* + <strong>\-\-min</strong> <em>[vec]</em> specify the minimun input
* coordinate that should be loaded. All data with input coordinate
* less than this vector will be discarded.
* + <strong>\-\-min</strong> <em>[vec]</em> specify the minimun input
* coordinate that should be loaded. All data with input coordinate
* less than this vector will be discarded.
*
* + <strong>\-\-max</strong> <em>[vec]</em> specify the maximum input
* coordinate that should be loaded. All data with input coordinate
* greater than this vector will be discarded.
* + <strong>\-\-max</strong> <em>[vec]</em> specify the maximum input
* coordinate that should be loaded. All data with input coordinate
* greater than this vector will be discarded.
*
* + <strong>\-\-ymin</strong> <em>[vec]</em> specify the minimun output
* coordinate that should be loaded. All data with associated value
* less than this vector will be discarded.
* coordinate that should be loaded. All data with associated value
* less than this vector will be discarded.
*
* + <strong>\-\-ymax</strong> <em>[vec]</em> specify the maximum output
* coordinate that should be loaded. All data with associated value
* greater than this vector will be discarded.
* coordinate that should be loaded. All data with associated value
* greater than this vector will be discarded.
*/
class vertical_segment : public data
{
public: // methods
public: // methods
//! \brief Default constructor that does nothing at all.
vertical_segment() {}
//! \brief Default constructor that does nothing at all.
vertical_segment() : _is_absolute(true), _dt(0.1)
{
}
vertical_segment(unsigned int dim_X, unsigned int dim_Y, unsigned int size);
vertical_segment(unsigned int dim_X, unsigned int dim_Y, unsigned int size);
//! \brief Construct vertical segment data for a given size and where the size of each element
//! is also given. All data are initialized to zero
vertical_segment( params::input in_param,
//! \brief Construct vertical segment data for a given size and where the size of each element
//! is also given. All data are initialized to zero
vertical_segment( params::input in_param,
params::output out_param,
unsigned int size );
// Load data from a file
virtual void load(const std::string& filename) ;
// Load data from a file
virtual void load(const std::string& filename) ;
//! \brief Load data from a file using the command line arguments
//!
//! \details
//! Specific arguments for the vertical segment data
//! --dt specify a value for the absolute/relative segment if not defined
//! in the data
//! --data-positive for the data to be positive
//! --dt-relative use a relative segment intervale. The dt is used
//! multipled by the data
virtual void load(const std::string& filename, const arguments& args) ;
//! \brief Load data from a file using the command line arguments
//!
//! \details
//! Specific arguments for the vertical segment data
//! --dt specify a value for the absolute/relative segment if not defined
//! in the data
//! --data-positive for the data to be positive
//! --dt-relative use a relative segment intervale. The dt is used
//! multipled by the data
virtual void load(const std::string& filename, const arguments& args) ;
// Acces to data
virtual vec get(int i) const ;
virtual vec operator[](int i) const;
// Acces to data
virtual vec get(int i) const ;
virtual vec operator[](int i) const;
virtual vec value(const vec&) const
{
virtual vec value(const vec&) const {
NOT_IMPLEMENTED();
}
//! \brief Put the sample inside the data
virtual void set(const vec& x);
virtual void set(int i, const vec& x);
//! \brief Put the sample inside the data
virtual void set(const vec& x);
virtual void set(int i, const vec& x);
//! \brief Specific accessor to a vertical segment, this gives the
//! complete vector, plus the ordinate segment
virtual void get(int i, vec &x, vec &yl, vec &yu) const ;
//! \brief Specific accessor to a vertical segment, this gives the
//! complete vector, plus the ordinate segment
virtual void get(int i, vec &x, vec &yl, vec &yu) const ;
//! \brief Specific accessor to a vertical segment. Provides only the
//! ordinate segment.
virtual void get(int i, vec& yl, vec& yu) const ;
//! \brief Specific accessor to a vertical segment. Provides only the
//! ordinate segment.
virtual void get(int i, vec& yl, vec& yu) const ;
// Get data size
virtual int size() const ;
// Get data size
virtual int size() const ;
private: // method
private: // method
void initializeToZero( unsigned int number_of_data_elements );
void initializeToZero( unsigned int number_of_data_elements );
static void load_data_from_text(std::istream& input,
const arguments& header,
vertical_segment& result,
const arguments& args);
static void load_data_from_text(std::istream& input,
const arguments& header,
vertical_segment& result,
const arguments& args);
//! \brief From a correct input configuration 'x' with size
//! dimX()+dimY(), generate a vertical ! segment satisfying this object's
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment