|
|
template<typename Observer > |
| static void | addDeleteObserver (Observer const &obs) |
| |
|
template<typename Observer > |
| static void | addDeleteObserver (std::shared_ptr< Observer > const &obs) |
| |
| static void | addTimer (std::string const &msg, std::pair< double, int > const &t, std::string const &uiname) |
| | Return the timerstable pointer. More...
|
| |
|
static void | clearSomeMemory () |
| |
| static std::string | expand (std::string const &expr) |
| | expand feel++ pathes in a string More...
|
| |
| static std::string | findFileRemotely (std::string const &fname, std::string const &subdir="") |
| | try find remotely the file fname More...
|
| |
| static MemoryUsage | logMemoryUsage (std::string const &message) |
| | print resident memory usage as well as PETSc malloc usage in log file More...
|
| |
| static int | logVerbosityLevel () |
| | get variables_map from options_description desc More...
|
| |
|
template<typename ... Ts> |
| static std::pair< std::string, po::variable_value > | option (Ts &&... v) |
| |
|
static void | saveTimers (bool save) |
| | display and save timers
|
| |
|
static void | saveTimersMD (std::ostream &os) |
| |
| static FEELPP_DEPRECATED const fs::path & | scratchDirectory () |
| |
| static FEELPP_DEPRECATED void | setLogs (std::string const &prefix) |
| | set log files More...
|
| |
|
static void | setLogVerbosityLevel (int logVerbosity) |
| | set the verbosity level of the VLOG macro
|
| |
| static void | startLogging (std::string decorate) |
| | start logging. More...
|
| |
| static void | stopLogging (bool remove=false) |
| | stop logging in Feel++. More...
|
| |
|
template<typename ... Ts> |
| static po::variable_value | vm (Ts &&... v) |
| |
| static void | setJournalFilename (const std::string &name) |
| | Setters. More...
|
| |
| static void | setJournalAutoMode (bool b) |
| | Set the journal mode. More...
|
| |
|
static void | setJournalEnable (bool m) |
| | Activate or deactivate the journal.
|
| |
| static const std::string & | journalFilename () |
| | Getters. More...
|
| |
|
static nl::json & | journalData () |
| |
| static const bool | journalAutoMode () |
| | Get the current journal mode status. More...
|
| |
| static const bool | journalEnabled () |
| | Get the journal status. More...
|
| |
| static const uint32_type | journalCurrentCheckpoint () |
| | Get the current checkpoint counter. More...
|
| |
| static decltype(auto) | journalSignal () |
| | Get the journal underlying static signal. More...
|
| |
| static notify_type const & | journalPull () |
| | Journal gather/save. More...
|
| |
|
static void | journalSave (std::string const &filename="") |
| | Save the global property tree into a json file.
|
| |
| static void | journalCheckpoint (bool save=true, const std::string &filename="") |
| | Generate a checkpoint. More...
|
| |
|
static void | journalFinalize () |
| | Create the journal.
|
| |
| static void | journalSetDBName (const std::string &dbname="feelpp") |
| | Setters. More...
|
| |
|
static void | journalSetDBHost (const std::string &host="localhost") |
| | Set the mongodb host.
|
| |
|
static void | journalSetDBUsername (const std::string &user="") |
| | Set the mongodb user name.
|
| |
|
static void | journalSetDBPassword (const std::string &password="") |
| | Set the mongodb user password.
|
| |
|
static void | journalSetDBPort (const std::string &port="27017") |
| | Set the mongodb port.
|
| |
|
static void | journalSetDBAuthsrc (const std::string &authsrc="admin") |
| | Set the collection used to authenticate.
|
| |
|
static void | journalSetDBCollection (const std::string &dbname="journal") |
| | Set mongodb collection to use for the journal.
|
| |
|
static void | journalDBConfig (const MongoConfig &mc) |
| | Set mongodb collection to use for the journal.
|
| |
|
| | Environment () |
| | Initialize the Feel environment. More...
|
| |
| | Environment (int &argc, char **&argv) |
| | Initialize the Feel environment. More...
|
| |
| | Environment (int argc, char **argv, mpi::threading::level lvl, po::options_description const &desc, po::options_description const &desc_lib, AboutData const &about, Repository::Config const &config) |
| | Construct a new Environment object. More...
|
| |
|
| Environment (NA::arguments< typename na::argc::template required_as_t< int >, typename na::argv::template required_as_t< char ** >, typename na::threading::template required_as_t< mpi::threading::level >, typename na::desc::template required_as_t< po::options_description const & >, typename na::desc_lib::template required_as_t< po::options_description const & >, typename na::about::template required_as_t< AboutData const & >, typename na::config::template required_as_t< Repository::Config const & > > &&args) |
| |
|
template<typename ... Ts, typename = typename std::enable_if_t< sizeof...(Ts) != 0 && ( NA::is_named_argument_v<Ts> && ...) >> |
| | Environment (Ts &&... v) |
| |
| | ~Environment () override |
| | Shuts down the Feel environment. 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 bool | aborted () |
| | Determine if the MPI environment has already been aborted. More...
|
| |
| static std::shared_ptr< WorldComm > const & | worldCommPtr () |
| |
|
static WorldComm & | worldComm () |
| | return the worldcomm (static)
|
| |
|
static WorldComm & | worldCommSeq () |
| |
|
static worldcomm_ptr_t & | worldCommSeqPtr () |
| |
|
static worldscomm_ptr_t & | worldsComm (int n) |
| | return n sub world communicators
|
| |
|
static worldscomm_ptr_t & | worldsCommSeq (int n) |
| |
|
static worldscomm_ptr_t & | worldsCommGroupBySubspace (int n) |
| |
|
static worldcomm_t & | masterWorldComm (int n) |
| | return master world comm associated with a color map of size n
|
| |
|
static int | numberOfProcessors () |
| | return number of processors
|
| |
|
static rank_type | rank () |
| | return the rank in global mpi communicator
|
| |
|
static rank_type | masterRank () |
| | return master rank in mpi communicator
|
| |
| static mpi::threading::level | threadLevel () |
| | get the thread level that could be set The thread level resquested to mpi may not be supported. More...
|
| |
| static bool | isMainThread () |
| | Are we in the main thread? this function may be useful e.g. More...
|
| |
| static void | abort (int errcode) |
| | Abort all MPI processes. More...
|
| |
| static bool | isSequential () |
| |
| static bool | isParallel () |
| |
| static bool | isMasterRank () |
| | rank 0 process is considered the master process More...
|
| |
|
static std::string | logMpiMode () |
| |
|
static bool | shouldLog () |
| |
|
static po::command_line_parser const & | commandLineParser () |
| |
|
static std::vector< std::tuple< std::string, std::istringstream > > & | configFiles () |
| |
| static void | setConfigFiles (std::vector< std::string > const &filenames) |
| | Set the Configuration from a list of files. More...
|
| |
| static void | setConfigFile (std::string const &filename) |
| | Set the Configuration from a File. More...
|
| |
|
static po::variables_map const & | vm () |
| | return variables_map
|
| |
|
template<typename T > |
| static void | setOptionValue (std::string s, T val) |
| |
|
static AboutData const & | about () |
| |
|
static void | olLoadInGmsh (std::string filename) |
| | Adds a file to automatically load in Gmsh with Onelab.
|
| |
|
static po::options_description const & | optionsDescription () |
| | return options description data structure
|
| |
|
static po::options_description const & | optionsDescriptionApplication () |
| | return options description data structure
|
| |
|
static po::options_description const & | optionsDescriptionLibrary () |
| | return the options description for the Feel++ library
|
| |
| static void | addOptions (po::options_description const &desc) |
| | Lazily register and parse options owned by an instantiated component. More...
|
| |
|
|
template<typename ... Ts> |
| static void | changeRepository (Ts &&... v) |
| |
| static fs::path const & | rootRepository () |
| |
| static std::string | findFile (std::string const &filename, std::vector< std::string > paths={}) |
| | Find a file. More...
|
| |
| static std::vector< std::string > | geoPathList () |
| |
| static std::string | localGeoRepository () |
| |
| static boost::tuple< std::string, bool > | systemGeoRepository () |
| |
| static std::string | localConfigRepository () |
| |
| static boost::tuple< std::string, bool > | systemConfigRepository () |
| |
|
static std::string | appRepository () |
| | the application directory, application results are stored there the directory is controlled by changeRepository
|
| |
|
static std::string | appRepositoryWithoutNumProc () |
| | the application directory without np, application results are stored there the directory is controlled by changeRepository
|
| |
|
static std::string | exprRepository () |
| | the expressions repository is typically a sub-directory of the appRepository() that contains the expressions generated using Ginac
|
| |
|
static std::string | logsRepository () |
| | the logfiles repository is a subdirectory of the appRepository containing the logfiles
|
| |
|
static std::string | exportsRepository () |
| | the exports repository is a subdirectory of the appRepository containing the results exported during the application execution
|
| |
|
static std::string | downloadsRepository () |
| | the downloads repository is a subdirectory of the appRepository containing the files downloaded during the application execution
|
| |
| static uuids::uuid | randomUUID (bool parallel=true) |
| | Generate a random UUID. More...
|
| |
|
static uuids::uuid | nameUUID (uuids::uuid const &dns_namespace_uuid, std::string const &name) |
| | Generate a UUID from a namespace UUID and a name.
|
| |
Initialize, finalize, and query the Feel++ environment.
The Environment class is used to initialize, finalize, and query the Feel++ environment. It will typically be used in the main() function of a program, which will create a single instance of Environment initialized with the arguments passed to the program:
int main(int argc, char* argv[])
{
}
Environment()
Initialize the Feel environment.
Definition: environment.cpp:298
-*- mode: c++; coding: utf-8; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; show-trailing-w...
Definition: about.cpp:37
or more commonly
int main(int argc, char* argv[])
{
po::options_description myoptions( "Laplacian options" );
myoptions.add_options()
( "mu", po::value<double>()->default_value( 1.0 ), "coeff" );
_desc=myoptions,
_about=about(_name="myapp",
_author="Feel++ Consortium",
_email="feelpp-devel@feelpp.org"));
}
The instance of Environment will initialize Feel++ (by calling MPI, PETSc, SLEPc or Logging initialization routines) in its constructor and finalize in its destructor.
- Author
- Christophe Prud'homme
- See also
- Application