Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F63005575
map_2d_square.hh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, May 17, 02:20
Size
2 KB
Mime Type
text/x-c++
Expires
Sun, May 19, 02:20 (2 d)
Engine
blob
Format
Raw Data
Handle
17719496
Attached To
rTAMAAS tamaas
map_2d_square.hh
View Options
#ifndef __MAP_2D_SQUARE_HH__
#define __MAP_2D_SQUARE_HH__
/* -------------------------------------------------------------------------- */
#include "map_2d.hh"
/* -------------------------------------------------------------------------- */
template
<
typename
T
>
class
Map2dSquare
:
public
Map2d
<
T
>
{
/* ------------------------------------------------------------------------ */
/* Constructors/Destructors */
/* ------------------------------------------------------------------------ */
public
:
Map2dSquare
(
UInt
n
,
Real
L
=
1.
)
:
Map2d
<
T
>
(
n
,
n
,
L
,
L
){};
virtual
~
Map2dSquare
(){};
/* ------------------------------------------------------------------------ */
/* Methods */
/* ------------------------------------------------------------------------ */
public
:
//! get lateral number of discretization points
inline
UInt
size
()
const
{
return
Map2d
<
T
>::
size
(
0
);};
//! load all n-th point of heights array from text file usable with plot programs
void
loadFromTextFile
(
std
::
string
filename
,
int
each
=
1
);
//! set the grid size
void
setGridSize
(
UInt
n
){
Map2d
<
T
>::
setGridSize
(
n
,
n
);};
private
:
//! read an entry from a stringstream
T
readValue
(
std
::
stringstream
&
sstr
);
/* ------------------------------------------------------------------------ */
/* Accessors */
/* ------------------------------------------------------------------------ */
public
:
//! get the lateral size of the sample
inline
Real
getL
()
const
{
return
Map2d
<
T
>::
getL
(
0
);};
//! get the lateral size of the sample
inline
void
setL
(
Real
L
){
Map2d
<
T
>::
setL
(
L
,
L
);};
/* ------------------------------------------------------------------------ */
/* Class Members */
/* ------------------------------------------------------------------------ */
private
:
};
#endif
/* __MAP_2D_SQUARE_HH__ */
Event Timeline
Log In to Comment