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

Model base class. More...

+ Inheritance diagram for Feel::FeelModels::ModelBase:
+ Collaboration diagram for Feel::FeelModels::ModelBase:

Public Types

using worldcomm_ptr_t = std::shared_ptr< WorldComm >
 
using worldcomm_t = WorldComm
 
using worldscomm_ptr_t = std::vector< std::shared_ptr< WorldComm > >
 
- Public Types inherited from Feel::JournalWatcher
using function_update_information_type = std::function< void(nl::json &)>
 
using notify_type = nl::json
 

Public Member Functions

void addParameterInModelProperties (std::string const &symbolName, double value)
 
void addTimerTool (std::string const &s, std::string const &fileName) const
 
po::variables_map const & clovm () const
 return variables map from command line options
 
virtual void createWorldsComm ()
 
bool hasModelProperties () const
 
void initModelProperties ()
 
bool isUpdatedForUse () const
 
std::string const & keyword () const
 keyword
 
worldscomm_ptr_t & localNonCompositeWorldsComm ()
 
worldscomm_ptr_t const & localNonCompositeWorldsComm () const
 
void log (std::string const &_className, std::string const &_functionName, std::string const &_msg) const
 
bool manageParameterValues () const
 
bool manageParameterValuesOfModelProperties () const
 
 ModelBase (ModelBase &&app)=default
 
 ModelBase (ModelBase const &app)=default
 
 ModelBase (std::string const &prefix, std::string const &keyword, worldcomm_ptr_t const &worldComm=Environment::worldCommPtr(), std::string const &subPrefix="", ModelBaseRepository const &modelRep=ModelBaseRepository(), ModelBaseCommandLineOptions const &modelCmdLineOpt=ModelBaseCommandLineOptions())
 
 ModelBase (std::string const &prefix, worldcomm_ptr_t const &worldComm=Environment::worldCommPtr(), std::string const &subPrefix="", ModelBaseRepository const &modelRep=ModelBaseRepository(), ModelBaseCommandLineOptions const &modelCmdLineOpt=ModelBaseCommandLineOptions())
 
ModelProperties & modelProperties ()
 
ModelProperties const & modelProperties () const
 
std::shared_ptr< ModelProperties > modelPropertiesPtr () const
 
std::string const & prefix () const
 
void printAndSaveInfo () const
 
void printInfo () const
 
ModelBaseRepository const & repository () const
 
std::string const & rootRepository () const
 
void saveInfo () const
 
std::string scalabilityFilename () const
 
std::string scalabilityPath () const
 
bool scalabilityReinitSaveFile () const
 
bool scalabilitySave () const
 
void setIsUpdatedForUse (bool b)
 
void setLocalNonCompositeWorldsComm (worldscomm_ptr_t &_worldsComm)
 
void setManageParameterValues (bool b)
 
void setManageParameterValuesOfModelProperties (bool b)
 
void setModelProperties (nl::json const &j)
 Set the Model Properties object from a json struct the json may come from python. More...
 
void setModelProperties (std::shared_ptr< ModelProperties > modelProps)
 
void setModelProperties (std::string const &filename)
 Set the Model Properties object from a filename. More...
 
void setScalabilityFilename (std::string const &s)
 
void setScalabilityPath (std::string const &s)
 
void setScalabilitySave (bool b)
 
void setWorldsComm (worldscomm_ptr_t &_worldsComm)
 
std::string const & subPrefix () const
 
auto symbolsExprParameter () const
 
tabulate_informations_ptr_t tabulateInformations () const
 
virtual tabulate_informations_ptr_t tabulateInformations (nl::json const &jsonInfo, TabulateInformationProperties const &tabInfoProp) const
 
TimerToolBase & timerTool (std::string const &s) const
 
void updateInformationObject (nl::json &p) const override
 
ModelBaseUpload const & upload () const
 
void upload (std::string const &dataPath) const
 
bool verbose () const
 
bool verboseAllProc () const
 
worldcomm_t & worldComm ()
 
worldcomm_t const & worldComm () const
 
worldcomm_ptr_t & worldCommPtr ()
 
worldcomm_ptr_t const & worldCommPtr () const
 
worldscomm_ptr_t & worldsComm ()
 
worldscomm_ptr_t const & worldsComm () const
 
- Public Member Functions inherited from Feel::JournalWatcher
 JournalWatcher (std::string const &category="", std::string const &name="", bool connect=JournalManager::journalAutoMode())
 Constructors. More...
 
 JournalWatcher (std::string const &category, bool useDefaultName, bool connect=JournalManager::journalAutoMode())
 
 JournalWatcher (function_update_information_type const &func, std::string const &category="", std::string const &name="", bool useDefaultNameIfEmpty=true, bool connect=JournalManager::journalAutoMode())
 
 JournalWatcher (JournalWatcher const &jw)
 Copy constructor.
 
virtual ~JournalWatcher ()
 Default destructor. The (inherited) object is always disconnected from the journal during the destruction.
 
bool journalIsConnected () const
 GettersCheck if the object is connected to the journal. More...
 
std::string const & journalWatcherInstanceName () const
 Return the full instance name for this watched object. The name is composed with the base name and a suffix index corresponding to the nth call. More...
 
nl::json::json_pointer journalSection () const
 Return the section into the journal as json_pointer.
 
nl::json const & informationObject () const
 Return the information into property tree.
 
void journalConnect ()
 Setters. More...
 
void journalDisconnect ()
 Disconnect the derived object from the simulation info manager. The disconnection is safe.
 
void setInformationObject (nl::json const &informationObject)
 set information object
 
void putInformationObject (nl::json const &informationObject)
 put information object
 
void addInformationObject (nl::json const &informationObject)
 add information object
 
void journalFinalize ()
 finalize journal publication
 

Additional Inherited Members

- Protected Member Functions inherited from Feel::JournalWatcher
void applyUpdateInformationObject ()
 Protected Methods.
 

Detailed Description

Model base class.

Constructor & Destructor Documentation

◆ ModelBase()

Feel::FeelModels::ModelBase::ModelBase ( std::string const &  prefix,
std::string const &  keyword,
worldcomm_ptr_t const &  worldComm = Environment::worldCommPtr(),
std::string const &  subPrefix = "",
ModelBaseRepository const &  modelRep = ModelBaseRepository(),
ModelBaseCommandLineOptions const &  modelCmdLineOpt = ModelBaseCommandLineOptions() 
)
Parameters
worldcommcommunicator

The worldcomm must be allocated via shared_ptr. The WorldComm can be retrieved via shared_from_this()

Member Function Documentation

◆ setModelProperties() [1/2]

void Feel::FeelModels::ModelBase::setModelProperties ( nl::json const &  j)

Set the Model Properties object from a json struct the json may come from python.

Parameters
jjson data structure

References clovm(), and Feel::expr().

◆ setModelProperties() [2/2]

void Feel::FeelModels::ModelBase::setModelProperties ( std::string const &  filename)

Set the Model Properties object from a filename.

Parameters
filenamefile name

◆ tabulateInformations()

tabulate_informations_ptr_t Feel::FeelModels::ModelBase::tabulateInformations ( nl::json const &  jsonInfo,
TabulateInformationProperties const &  tabInfoProp 
) const
virtual

◆ updateInformationObject()

void Feel::FeelModels::ModelBase::updateInformationObject ( nl::json &  p) const
overridevirtual

Reimplemented from Feel::JournalWatcher.