Logo  0.95.0-final
Finite Element Embedded Library and Language in C++
Feel++ Feel++ on Github Feel++ community
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Feel::Application Class Reference

#include <application.hpp>

Detailed Description

provides information about the Application

SERIAL Application.

MPI Application.

Author
Christophe Prud'homme
Christophe Prud'homme
See Also
+ Inheritance diagram for Feel::Application:

Public Types

Typedefs
typedef boost::ptr_list< Simgetsimgets_type
 Simget collection type.
 
typedef simgets_type::iterator simget_iterator
 Simget iterator over the collection.
 

Public Member Functions

Constructors, destructor
 Application ()
 
 Application (AboutData const &ad)
 
 Application (AboutData const &ad, po::options_description const &od)
 
 Application (int argc, char **argv, AboutData const &ad)
 
 Application (int argc, char **argv, AboutData const &ad, po::options_description const &od)
 
 Application (Application const &app)
 
virtual ~Application ()
 
 Application (int argc, char **argv, AboutData const &ad)
 
 Application (int argc, char **argv, AboutData const &ad, po::options_description const &od)
 
 ~Application ()
 
 Application (int argc, char **argv, AboutData const &ad)
 
 Application (int argc, char **argv, AboutData const &ad, po::options_description const &od)
 
 Application (Application const &)
 
 ~Application ()
 
Mutators
void setName1 (std::string const &name1)
 
void setName2 (std::string const &name2)
 
void setH (double h, int precision=4)
 
void setDimension (int dim)
 

Static Public Member Functions

static void barrier ()
 
static mpi::communicator const & comm ()
 

Protected Member Functions

void doOptions (int argc, char **argv)
 
void parseAndStoreOptions (po::command_line_parser parser, bool extra_parser=false)
 
void processGenericOptions ()
 
void setLogs ()
 

Accessors

po::options_description const & optionsDescription () const
 
po::variables_map const & vm () const
 
AboutData const & about () const
 
int unknownArgc () const
 
char ** unknownArgv () const
 
uint16_type nProcess ()
 
uint16_type processId ()
 
bool isMPIInitialized () const
 
std::string rootRepository () const
 
simget_iterator begin ()
 
simget_iterator end ()
 
size_type nSimgets () const
 
bool verbose () const
 
bool isMPIInitialized () const
 
static bool initialized ()
 
static bool finalized ()
 
static std::string processorName ()
 
static bool initialized ()
 
static bool finalized ()
 
static std::string processorName ()
 

Methods

enum  Stats {
  FLAT = 1<<1,
  HEADER = 1<<2,
  ERRORS = 1<<3,
  TIME = 1<<4,
  DATA = 1<<5,
  NUMBERS = 1<<6,
  ALL = ERRORS | TIME | DATA | NUMBERS
}
 
ApplicationchangeRepository (boost::format)
 
WorldComm & comm ()
 
WorldComm const & comm () const
 
void barrier ()
 
void add (Simget *simget)
 
virtual void run ()
 
virtual void run (const double *X, unsigned long P, double *Y, unsigned long N)
 
void setStats (std::vector< std::string > const &keys)
 
void printStats (std::ostream &out, size_type stats=ALL) const
 
void printStats (std::ostream &out, std::vector< std::string > const &keys, size_type stats=ALL) const
 
std::string resultFileName () const
 
template<class T >
static void Send (const T &obj, int proc, int tag)
 
template<class T >
static void Broadcast (T &obj)
 
template<class T >
static void Recv (T &obj, int proc, int tag)
 
template<class T >
static void Broadcast (T &, int=0)
 
static void barrier ()
 

Constructor & Destructor Documentation

Feel::Application::Application ( AboutData const &  ad)

Construct an MPI Application

Parameters
adAboutData structure for this Application
CommMPI communicator
Feel::Application::Application ( AboutData const &  ad,
po::options_description const &  od 
)

Construct an MPI Application

Parameters
adAboutData structure for this Application
odpo::options_description structure for this Application
CommMPI communicator
Feel::Application::Application ( int  argc,
char **  argv,
AboutData const &  ad 
)

Construct an MPI Application

Parameters
argcnumber of arguments on the command line
argvarguments in the command line
adAboutData structure for this Application
CommMPI communicator
Feel::Application::Application ( int  argc,
char **  argv,
AboutData const &  ad,
po::options_description const &  od 
)

Construct an MPI Application

Parameters
argcnumber of arguments on the command line
argvarguments in the command line
adAboutData structure for this Application
odpo::options_description structure for this Application
CommMPI communicator
Feel::Application::Application ( Application const &  app)

copy constructor

Parameters
appApplication to be copy constructed
Feel::Application::Application ( int  argc,
char **  argv,
AboutData const &  ad 
)

Construct an MPI Application

Parameters
argcnumber of arguments on the command line
argvarguments in the command line
adAboutData structure for this Application
CommMPI communicator
Feel::Application::Application ( int  argc,
char **  argv,
AboutData const &  ad,
po::options_description const &  od 
)

Construct an MPI Application

Parameters
argcnumber of arguments on the command line
argvarguments in the command line
adAboutData structure for this Application
odpo::options_description structure for this Application
CommMPI communicator
Feel::Application::Application ( int  argc,
char **  argv,
AboutData const &  ad 
)

Construct an SERIAL Application

Parameters
argcnumber of arguments on the command line
argvarguments in the command line
adAboutData structure for this Application
Feel::Application::Application ( int  argc,
char **  argv,
AboutData const &  ad,
po::options_description const &  od 
)

Construct an SERIAL Application

Parameters
argcnumber of arguments on the command line
argvarguments in the command line
adAboutData structure for this Application
odpo::options_description structure for this Application

Member Function Documentation

AboutData const& Feel::Application::about ( ) const
inline

get the about data of the application

Returns
the about data ofthe application
See Also
AboutData
void Feel::Application::add ( Simget simget)

add a new simget to the application

static void Feel::Application::barrier ( )
inlinestatic
Returns
the barrier
static void Feel::Application::barrier ( )
inlinestatic
Returns
the barrier
void Feel::Application::barrier ( )
inline
Returns
the barrier
simget_iterator Feel::Application::begin ( )
inline
Returns
the begin() iterator
Application & Feel::Application::changeRepository ( boost::format  fmt)

change to Simulation Repository

References Feel::AboutData::appName(), and setLogs().

static mpi::communicator const& Feel::Application::comm ( )
inlinestatic
Returns
the communicator
WorldComm& Feel::Application::comm ( )
inline
Returns
the communicator
WorldComm const& Feel::Application::comm ( ) const
inline
Returns
the communicator
void Feel::Application::doOptions ( int  argc,
char **  argv 
)
protected

parse and store application options from cmdline

Parameters
argcnumber of arguments
argvarguments

parse config file if given to command line

References about(), Feel::AboutData::appName(), and Feel::benchmark_options().

simget_iterator Feel::Application::end ( )
inline
Returns
the end() iterator
static bool Feel::Application::finalized ( )
inlinestatic

Determine if the MPI environment has already been finalized.

The routine is equivalent to a call to MPI_Finalized.

Returns
true if the MPI environment has been finalized.
static bool Feel::Application::finalized ( )
inlinestatic

Determine if the MPI environment has already been finalized.

The routine is equivalent to a call to MPI_Finalized.

Returns
true if the MPI environment has been finalized.
static bool Feel::Application::initialized ( )
inlinestatic

Determine if the MPI environment has already been initialized.

This routine is equivalent to a call to MPI_Initialized.

Returns
true if the MPI environment has been initialized.
static bool Feel::Application::initialized ( )
inlinestatic

Determine if the MPI environment has already been initialized.

This routine is equivalent to a call to MPI_Initialized.

Returns
true if the MPI environment has been initialized.
bool Feel::Application::isMPIInitialized ( ) const
inline
Returns
true if MPI is initialized, false otherwise
bool Feel::Application::isMPIInitialized ( ) const
inline
Returns
true if MPI is initialized, false otherwise
uint16_type Feel::Application::nProcess ( )
inline
Returns
the number of processes
size_type Feel::Application::nSimgets ( ) const
inline
Returns
the number of simgets
po::options_description const& Feel::Application::optionsDescription ( ) const
inline

get the options description

Returns
the options description
void Feel::Application::printStats ( std::ostream &  out,
size_type  stats = ALL 
) const

print statistics from applications

void Feel::Application::printStats ( std::ostream &  out,
std::vector< std::string > const &  keys,
size_type  stats = ALL 
) const

print statistics from applications

References end().

uint16_type Feel::Application::processId ( )
inline
Returns
the id of the current process
static std::string Feel::Application::processorName ( )
inlinestatic

Retrieve the name of this processor.

This routine returns the name of this processor. The actual form of the name is unspecified, but may be documented by the underlying MPI implementation. This routine is implemented as a call to MPI_Get_processor_name.

Returns
the name of this processor.
static std::string Feel::Application::processorName ( )
inlinestatic

Retrieve the name of this processor.

This routine returns the name of this processor. The actual form of the name is unspecified, but may be documented by the underlying MPI implementation. This routine is implemented as a call to MPI_Get_processor_name.

Returns
the name of this processor.
std::string Feel::Application::resultFileName ( ) const

result file name

References vm().

std::string Feel::Application::rootRepository ( ) const
Returns
the root of feel applications (typically $HOME/feel)
void Feel::Application::run ( const double *  X,
unsigned long  P,
double *  Y,
unsigned long  N 
)
virtual

execute the set of Simget stored in the Application following the input/output model $ Y=F(X) $. $ P$ is the number of inputs and $ N$ the number of outputs. Denote $ S $ (nSimgets()) the number of simgets stored in the Application. $ X $ and $ Y$ must be of size $ S P$ and $ S N $ respectively.

Reimplemented in Feel::OpusApp< ModelType, RM, Model >, Feel::CRBApp< ModelType >, and Feel::PFemApp< ModelType >.

void Feel::Application::setDimension ( int  dim)

set the dimension of the problem

void Feel::Application::setH ( double  h,
int  precision = 4 
)

h is the mesh size

void Feel::Application::setLogs ( )
protected

set log files

Parameters
prefixprefix for log filenames
void Feel::Application::setName1 ( std::string const &  name1)

name1 represents the first level name

void Feel::Application::setName2 ( std::string const &  name2)

name2 represents the second level name

void Feel::Application::setStats ( std::vector< std::string > const &  keys)

set statistics to be printed

int Feel::Application::unknownArgc ( ) const
inline
Returns
the number of options unrecognized by boost::program_options
char ** Feel::Application::unknownArgv ( ) const
Returns
the char** of unrecognized options

References about().

bool Feel::Application::verbose ( ) const
inline
Returns
true if the verbose command line/config option is used, false otherwise
po::variables_map const& Feel::Application::vm ( ) const
inline

get the variable map

Returns
the variable map

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

Generated on Sun Oct 20 2013 08:25:07 for Feel++ by doxygen 1.8.4