OPAL (Object Oriented Parallel Accelerator Library)
2.2.0
OPAL
|
#include <FromFile.h>
Public Member Functions | |
FromFile (const std::string &filename, const std::string &dvarName, size_t modulo) | |
void | create (boost::shared_ptr< SampleIndividual > &ind, size_t i) |
void | allocate (const CmdArguments_t &args, const Comm::Bundle_t &comm) |
double | getNext () |
unsigned int | getSize () const |
Expressions::Result_t | operator() (client::function::arguments_t args) |
![]() | |
virtual | ~SamplingMethod () |
Static Public Attributes | |
static const std::string | name |
Private Member Functions | |
void | incrementCounter () |
void | readValues () |
reads a simple list of double values More... | |
Private Attributes | |
std::vector< double > | chain_m |
unsigned int | n_m |
size_t | counter_m |
size_t | mod_m |
std::string | filename_m |
std::string | dvarName_m |
unsigned int | globalSize_m |
std::vector< double > | values_ |
std::string | filename_ |
Parse file that contains design variable values. Each column belongs to a design variable. The first line is considered as header and consists of the design variable name. The name has to agree with the string in the input file.
Simple functor that reads vector data from a file. If the file contains more than one value the sum is returned.
\[ result = \sum_{i=0}^n value_i \]
Definition at line 21 of file FromFile.h.
|
inline |
Definition at line 26 of file FromFile.h.
References filename_m, and globalSize_m.
|
inlinevirtual |
Allocate memory for sampling. Not every sampling method requires that.
This function is used to reduce memory since only the sampler ranks need these sampling methods.
args | samler arguments |
comm | sampler communicator |
Reimplemented from SamplingMethod.
Definition at line 70 of file FromFile.h.
References chain_m, dvarName_m, filename_m, Comm::Bundle_t::island_id, and max().
|
inlinevirtual |
Implements SamplingMethod.
Definition at line 66 of file FromFile.h.
References getNext().
|
inline |
Definition at line 135 of file FromFile.h.
References chain_m, incrementCounter(), and n_m.
Referenced by create().
|
inline |
Definition at line 142 of file FromFile.h.
References globalSize_m.
|
inlineprivate |
|
inline |
Definition at line 31 of file FromFile.h.
References Physics::e, filename_, readValues(), sum(), and values_.
|
private |
reads a simple list of double values
Definition at line 4 of file FromFile.cpp.
References filename_, and values_.
Referenced by operator()().
|
private |
Definition at line 147 of file FromFile.h.
Referenced by allocate(), getNext(), and incrementCounter().
|
private |
Definition at line 149 of file FromFile.h.
Referenced by incrementCounter().
|
private |
Definition at line 152 of file FromFile.h.
Referenced by allocate().
|
private |
Definition at line 59 of file FromFile.h.
Referenced by operator()(), and readValues().
|
private |
Definition at line 151 of file FromFile.h.
Referenced by allocate(), and FromFile().
|
private |
Definition at line 154 of file FromFile.h.
Referenced by FromFile(), and getSize().
|
private |
Definition at line 150 of file FromFile.h.
Referenced by incrementCounter().
|
private |
Definition at line 148 of file FromFile.h.
Referenced by getNext(), and incrementCounter().
|
static |
Definition at line 29 of file FromFile.h.
|
private |
Definition at line 57 of file FromFile.h.
Referenced by operator()(), and readValues().