Feel++ 0.111.0-preview.14
Finite Element Embedded Library in C++
Feel::Application Class Reference

provides information about the Application More...

+ Inheritance diagram for Feel::Application:
+ Collaboration diagram for Feel::Application:

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
}
 
Application & changeRepository (boost::format)
 change to Simulation Repository
 
WorldComm & comm ()
 
WorldComm const & comm () const
 
void barrier ()
 
void add (Simget *simget)
 add a new simget to the application
 
virtual void run ()
 execute the set of Simget stored in the Application
 
virtual void run (const double *X, unsigned long P, double *Y, unsigned long N)
 execute the set of Simget stored in the Application following the input/output model \( Y=F(X) \). More...
 
void setStats (std::vector< std::string > const &keys)
 set statistics to be printed
 
void storeStats (std::string const &n, ptree::ptree const &s)
 store statistics s in statistics map entry with key n
 
void printStats (std::ostream &out, size_type stats=ALL) const
 print statistics from applications
 
void printStats (std::ostream &out, std::vector< std::string > const &keys, size_type stats=ALL) const
 print statistics from applications
 
std::string resultFileName () const
 result file name
 
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)
 
static mpi::communicator const & comm ()
 
static void barrier ()
 
void doOptions (int argc, char **argv)
 parse and store application options from cmdline More...
 
void processGenericOptions ()
 
void parseAndStoreOptions (po::command_line_parser parser, bool extra_parser=false)
 
void setLogs ()
 set log files More...
 

Typedefs

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

Constructors, destructor

 Application ()
 
 Application (AboutData const &ad)
 Construct an MPI Application. More...
 
 Application (AboutData const &ad, po::options_description const &od)
 Construct an MPI Application. More...
 
 Application (int argc, char **argv, AboutData const &ad) FEELPP_DEPRECATED
 Construct an MPI Application. More...
 
 Application (int argc, char **argv, AboutData const &ad, po::options_description const &od) FEELPP_DEPRECATED
 Construct an MPI Application. More...
 
 Application (Application const &app)
 copy constructor More...
 
virtual ~Application ()
 
 Application (int argc, char **argv, AboutData const &ad)
 Construct an MPI Application. More...
 
 Application (int argc, char **argv, AboutData const &ad, po::options_description const &od)
 Construct an MPI Application. More...
 
 ~Application ()
 

Accessors

po::options_description const & optionsDescription () const
 get the options description More...
 
po::variables_map const & vm () const
 get the variable map More...
 
AboutData const & about () const
 get the about data of the application More...
 
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 ()
 Determine if the MPI environment has already been initialized. More...
 
static bool finalized ()
 Determine if the MPI environment has already been finalized. More...
 
static std::string processorName ()
 Retrieve the name of this processor. More...
 
static bool initialized ()
 Determine if the MPI environment has already been initialized. More...
 
static bool finalized ()
 Determine if the MPI environment has already been finalized. More...
 
static std::string processorName ()
 Retrieve the name of this processor. More...
 

Mutators

void setName1 (std::string const &name1)
 name1 represents the first level name
 
void setName2 (std::string const &name2)
 name2 represents the second level name
 
void setH (double h, int precision=4)
 h is the mesh size
 
void setDimension (int dim)
 set the dimension of the problem
 

Detailed Description

provides information about the Application

MPI Application.

Author
Christophe Prud'homme
Christophe Prud'homme
See also

Constructor & Destructor Documentation

◆ Application() [1/7]

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

Construct an MPI Application.

Parameters
adAboutData structure for this Application
CommMPI communicator

◆ Application() [2/7]

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

◆ Application() [3/7]

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
Warning
this function is marked deprecated and should not be used anymore, use the Environment class instead to initialize the Feel++

◆ Application() [4/7]

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
Warning
this function is marked deprecated and should not be used anymore, use the Environment class instead to initialize the Feel++

◆ Application() [5/7]

Feel::Application::Application ( Application const &  app)

copy constructor

Parameters
appApplication to be copy constructed

◆ Application() [6/7]

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

◆ Application() [7/7]

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

Member Function Documentation

◆ about()

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

get the about data of the application

Returns
the about data ofthe application
See also
AboutData

◆ barrier() [1/2]

void Feel::Application::barrier ( )
Returns
the barrier

◆ barrier() [2/2]

static void Feel::Application::barrier ( )
static
Returns
the barrier

◆ begin()

simget_iterator Feel::Application::begin ( )
Returns
the begin() iterator

◆ comm() [1/3]

WorldComm & Feel::Application::comm ( )
Returns
the communicator

◆ comm() [2/3]

static mpi::communicator const & Feel::Application::comm ( )
static
Returns
the communicator

◆ comm() [3/3]

WorldComm const & Feel::Application::comm ( ) const
Returns
the communicator

◆ doOptions()

void Feel::Application::doOptions ( int  argc,
char **  argv 
)
protected

parse and store application options from cmdline

Parameters
argcnumber of arguments
argvarguments

◆ end()

simget_iterator Feel::Application::end ( )
Returns
the end() iterator

Referenced by printStats().

◆ finalized() [1/2]

static bool Feel::Application::finalized ( )
static

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.

◆ finalized() [2/2]

static bool Feel::Application::finalized ( )
static

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.

◆ initialized() [1/2]

static bool Feel::Application::initialized ( )
static

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.

◆ initialized() [2/2]

static bool Feel::Application::initialized ( )
static

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.

◆ isMPIInitialized() [1/2]

bool Feel::Application::isMPIInitialized ( ) const
Returns
true if MPI is initialized, false otherwise

◆ isMPIInitialized() [2/2]

bool Feel::Application::isMPIInitialized ( ) const
Returns
true if MPI is initialized, false otherwise

◆ nProcess()

uint16_type Feel::Application::nProcess ( )
Returns
the number of processes

◆ nSimgets()

size_type Feel::Application::nSimgets ( ) const
Returns
the number of simgets

◆ optionsDescription()

po::options_description const & Feel::Application::optionsDescription ( ) const

get the options description

Returns
the options description

◆ processId()

uint16_type Feel::Application::processId ( )
Returns
the id of the current process

◆ processorName() [1/2]

static std::string Feel::Application::processorName ( )
static

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.

◆ processorName() [2/2]

static std::string Feel::Application::processorName ( )
static

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.

◆ rootRepository()

std::string Feel::Application::rootRepository ( ) const
Returns
the root of feel applications (typically $HOME/feel)

References Feel::Environment::rootRepository().

◆ run()

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.

◆ setLogs()

void Feel::Application::setLogs ( )
protected

set log files

Parameters
prefixprefix for log filenames

◆ unknownArgc()

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

◆ unknownArgv()

char ** Feel::Application::unknownArgv ( ) const
Returns
the char** of unrecognized options

◆ verbose()

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

◆ vm()

po::variables_map const & Feel::Application::vm ( ) const

get the variable map

Returns
the variable map

Referenced by resultFileName().