Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::CaseMng Class Reference

Case manager. More...

Inheritance diagram for Arcane::CaseMng:
Collaboration diagram for Arcane::CaseMng:

Classes

class  OptionsReader
class  ErrorInfo
class  CaseOptionsFilterUsed

Public Member Functions

 CaseMng (ISubDomain *)
ITraceMngtraceMng () override
 Trace manager.
IMeshMngmeshMng () const override
 Associated mesh manager.
ISubDomainsubDomain () override
 Sub-domain manager.
IApplicationapplication () override
 Associated application.
IPhysicalUnitSystemphysicalUnitSystem () const override
 Associated unit system.
ICaseDocumentcaseDocument () override
 XML document of the dataset (can be null if no dataset).
ICaseDocumentFragmentcaseDocumentFragment () override
 Fragment of the XML Document associated with the dataset (can be null if no dataset).
ICaseDocumentreadCaseDocument (const String &filename, ByteConstArrayView bytes) override
 Reads the XML document of the dataset.
void readFunctions () override
 Reads the dataset tables.
void readOptions (bool is_phase1) override
 Reads the dataset options corresponding to the used modules.
void printOptions () override
 Prints the option values.
void registerOptions (ICaseOptions *) override
 Registers a list of dataset options.
void unregisterOptions (ICaseOptions *) override
 Unregisters a list of dataset options.
ICaseFunctionfindFunction (const String &name) const override
 Returns the function by name name or nullptr if none exists.
void updateOptions (Real current_time, Real current_deltat, Integer current_iteration) override
 Updates the options based on a time-marching table.
CaseFunctionCollection functions () override
 Returns the list of tables.
void removeFunction (ICaseFunction *func, bool dofree) override
 Deletes a function.
void removeFunction (ICaseFunction *func) override
 Deletes a function.
void addFunction (ICaseFunction *func) override
 Adds the function func.
void addFunction (Ref< ICaseFunction > func) override
 Adds the function func.
CaseOptionsCollection blocks () const override
 Collection of option blocks.
void setTreatWarningAsError (bool v) override
 Sets the way warnings are treated.
bool isTreatWarningAsError () const override
 Indicates whether warnings in the dataset should be treated as errors and cause the code to stop.
void setAllowUnkownRootElelement (bool v) override
 Sets the permission for unknown elements at the document root.
bool isAllowUnkownRootElelement () const override
 Indicates whether unknown elements at the document root are allowed.
IObservableobservable (eCaseMngEventType type) override
 Observable on the instance.
Ref< ICaseFunctionfindFunctionRef (const String &name) const
Ref< ICaseMngtoReference () override
ICaseMngInternal_internalImpl () override
 Internal implementation.
void internalReadOneOption (ICaseOptions *opt, bool is_phase1) override
 Implementation via ICaseMngInternal.
ICaseDocumentFragmentcreateDocumentFragment (IXmlDocumentHolder *document) override
 Creates a fragment.
const ParameterListWithCaseOptionparameters () const
 List of parameters that can override the dataset.
String msgClassName () const
Public Member Functions inherited from Arcane::ICaseMng
virtual ~ICaseMng ()=default
 Frees resources.
Public Member Functions inherited from Arcane::TraceAccessor
 TraceAccessor (ITraceMng *m)
 Constructs an accessor via the trace manager m.
 TraceAccessor (const TraceAccessor &rhs)
 Copy constructor.
TraceAccessoroperator= (const TraceAccessor &rhs)
 Copy assignment operator.
virtual ~TraceAccessor ()
 Frees resources.
ITraceMngtraceMng () const
 Trace manager.
TraceMessage info () const
 Flow for an information message.
TraceMessage pinfo () const
 Flow for a parallel information message.
TraceMessage info (char category) const
 Flow for an information message of a given category.
TraceMessage pinfo (char category) const
 Flow for a parallel information message of a given category.
TraceMessage info (bool v) const
 Flow for an information message.
TraceMessage warning () const
 Flow for a warning message.
TraceMessage pwarning () const
TraceMessage error () const
 Flow for an error message.
TraceMessage perror () const
TraceMessage log () const
 Flow for a log message.
TraceMessage plog () const
 Flow for a log message.
TraceMessage logdate () const
 Flow for a log message preceded by the date.
TraceMessage fatal () const
 Flow for a fatal error message.
TraceMessage pfatal () const
 Flow for a parallel fatal error message.
TraceMessageDbg debug (Trace::eDebugLevel=Trace::Medium) const
 Flow for a debug message.
Trace::eDebugLevel configDbgLevel () const
 Debug level of the configuration file.
TraceMessage info (Int32 verbose_level) const
 Flow for an information message of a given level.
TraceMessage linfo () const
 Flow for an information message with the local information level of this instance.
TraceMessage linfo (Int32 relative_level) const
 Flow for an information message with the local information level of this instance.
void fatalMessage (const StandaloneTraceMessage &o) const

Private Member Functions

 ARCCORE_DEFINE_REFERENCE_COUNTED_INCLASS_METHODS ()
ErrorInfo _readOneTable (const XmlNode &func_elem)
ErrorInfo _checkValidFunction (const XmlNode &func_elem, CaseFunctionBuildInfo &cfbi)
void _readOptions (bool is_phase1)
void _readFunctions ()
void _readCaseDocument (const String &filename, ByteConstArrayView bytes)
void _printErrors (ICaseDocumentFragment *doc, bool is_phase1)
void _checkTranslateDocument ()
void _removeFunction (ICaseFunction *func, bool do_delete)
void _searchInvalidOptions ()
 Searches for invalid data set options.
ICaseDocument_noNullCaseDocument ()
void _readOneDotNetFunction (const String &assembly_name, const String &class_name)
Private Member Functions inherited from Arcane::ReferenceCounterImpl
void addReference ()
void removeReference ()
void _internalAddReference ()
bool _internalRemoveReference ()

Private Attributes

ISubDomainm_sub_domain
 Sub-domain manager.
ScopedPtrT< ICaseDocumentm_case_document
CaseFunctionList m_functions
 List of functions.
CaseOptionsList m_case_options_list
 List of case options.
List< CaseOptionBase * > m_options_with_function
bool m_treat_warning_as_error = false
bool m_allow_unknown_root_element = true
ObservablePool< eCaseMngEventTypem_observables
bool m_is_function_read = false
 Indicates if functions have already been read.
Ref< ICaseFunctionDotNetProviderm_dotnet_provider
ParameterListWithCaseOption m_parameters

Additional Inherited Members

Protected Member Functions inherited from Arcane::TraceAccessor
void _setLocalVerboseLevel (Int32 v)
Int32 _localVerboseLevel () const

Detailed Description

Case manager.

Definition at line 76 of file CaseMng.cc.

Constructor & Destructor Documentation

◆ CaseMng()

Arcane::CaseMng::CaseMng ( ISubDomain * sub_domain)
explicit

Definition at line 306 of file CaseMng.cc.

◆ ~CaseMng()

Arcane::CaseMng::~CaseMng ( )
override

Definition at line 326 of file CaseMng.cc.

Member Function Documentation

◆ _checkTranslateDocument()

void Arcane::CaseMng::_checkTranslateDocument ( )
private

Definition at line 381 of file CaseMng.cc.

◆ _checkValidFunction()

CaseMng::ErrorInfo Arcane::CaseMng::_checkValidFunction ( const XmlNode & func_elem,
CaseFunctionBuildInfo & cfbi )
private

Definition at line 553 of file CaseMng.cc.

◆ _internalImpl()

ICaseMngInternal * Arcane::CaseMng::_internalImpl ( )
inlineoverridevirtual

Internal implementation.

Implements Arcane::ICaseMng.

Definition at line 217 of file CaseMng.cc.

◆ _noNullCaseDocument()

ICaseDocument * Arcane::CaseMng::_noNullCaseDocument ( )
inlineprivate

Definition at line 259 of file CaseMng.cc.

◆ _printErrors()

void Arcane::CaseMng::_printErrors ( ICaseDocumentFragment * doc,
bool is_phase1 )
private

Definition at line 401 of file CaseMng.cc.

◆ _readCaseDocument()

void Arcane::CaseMng::_readCaseDocument ( const String & filename,
ByteConstArrayView bytes )
private

Definition at line 970 of file CaseMng.cc.

◆ _readFunctions()

void Arcane::CaseMng::_readFunctions ( )
private

Definition at line 487 of file CaseMng.cc.

◆ _readOneDotNetFunction()

void Arcane::CaseMng::_readOneDotNetFunction ( const String & assembly_name,
const String & class_name )
private

Definition at line 726 of file CaseMng.cc.

◆ _readOneTable()

CaseMng::ErrorInfo Arcane::CaseMng::_readOneTable ( const XmlNode & func_elem)
private

Definition at line 639 of file CaseMng.cc.

◆ _readOptions()

void Arcane::CaseMng::_readOptions ( bool is_phase1)
private

Definition at line 808 of file CaseMng.cc.

◆ _removeFunction()

void Arcane::CaseMng::_removeFunction ( ICaseFunction * func,
bool do_delete )
private

Definition at line 923 of file CaseMng.cc.

◆ _searchInvalidOptions()

◆ addFunction() [1/2]

void Arcane::CaseMng::addFunction ( ICaseFunction * func)
inlineoverridevirtual

Adds the function func.

Addition can only be done during initialization. The caller remains the owner of the func instance and must remove it via removeFunction().

Implements Arcane::ICaseMng.

Definition at line 194 of file CaseMng.cc.

References addFunction(), and Arcane::makeRef().

Referenced by addFunction().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addFunction() [2/2]

void Arcane::CaseMng::addFunction ( Ref< ICaseFunction > func)
overridevirtual

Adds the function func.

Addition can only be done during initialization.

Implements Arcane::ICaseMng.

Definition at line 945 of file CaseMng.cc.

References m_functions.

◆ application()

IApplication * Arcane::CaseMng::application ( )
inlineoverridevirtual

Associated application.

Implements Arcane::ICaseMng.

Definition at line 171 of file CaseMng.cc.

References m_sub_domain.

Referenced by readCaseDocument().

Here is the caller graph for this function:

◆ blocks()

CaseOptionsCollection Arcane::CaseMng::blocks ( ) const
inlineoverridevirtual

Collection of option blocks.

Implements Arcane::ICaseMng.

Definition at line 200 of file CaseMng.cc.

References m_case_options_list.

◆ caseDocument()

ICaseDocument * Arcane::CaseMng::caseDocument ( )
inlineoverridevirtual

XML document of the dataset (can be null if no dataset).

Implements Arcane::ICaseMng.

Definition at line 173 of file CaseMng.cc.

Referenced by caseDocumentFragment().

Here is the caller graph for this function:

◆ caseDocumentFragment()

ICaseDocumentFragment * Arcane::CaseMng::caseDocumentFragment ( )
inlineoverridevirtual

Fragment of the XML Document associated with the dataset (can be null if no dataset).

Implements Arcane::ICaseMng.

Definition at line 174 of file CaseMng.cc.

References caseDocument(), and Arcane::ICaseDocument::fragment().

Here is the call graph for this function:

◆ createDocumentFragment()

ICaseDocumentFragment * Arcane::CaseMng::createDocumentFragment ( IXmlDocumentHolder * document)
inlineoverridevirtual

Creates a fragment.

The returned instance must be destroyed by calling delete. The returned instance becomes the owner of document and will be responsible for destroying it.

Implements Arcane::ICaseMngInternal.

Definition at line 222 of file CaseMng.cc.

References traceMng().

Here is the call graph for this function:

◆ findFunction()

ICaseFunction * Arcane::CaseMng::findFunction ( const String & name) const
overridevirtual

Returns the function by name name or nullptr if none exists.

Implements Arcane::ICaseMng.

Definition at line 896 of file CaseMng.cc.

◆ findFunctionRef()

Ref< ICaseFunction > Arcane::CaseMng::findFunctionRef ( const String & name) const

Definition at line 884 of file CaseMng.cc.

◆ functions()

CaseFunctionCollection Arcane::CaseMng::functions ( )
inlineoverridevirtual

Returns the list of tables.

The returned pointer is no longer valid as soon as the list of tables changes.

Implements Arcane::ICaseMng.

Definition at line 190 of file CaseMng.cc.

References m_functions.

◆ internalReadOneOption()

void Arcane::CaseMng::internalReadOneOption ( ICaseOptions * opt,
bool is_phase1 )
overridevirtual

Implementation via ICaseMngInternal.

Implements Arcane::ICaseMngInternal.

Definition at line 1016 of file CaseMng.cc.

References ARCANE_CHECK_POINTER, and Arcane::ICaseDocumentFragment::clearErrorsAndWarnings().

Here is the call graph for this function:

◆ isAllowUnkownRootElelement()

bool Arcane::CaseMng::isAllowUnkownRootElelement ( ) const
inlineoverridevirtual

Indicates whether unknown elements at the document root are allowed.

Implements Arcane::ICaseMng.

Definition at line 206 of file CaseMng.cc.

◆ isTreatWarningAsError()

bool Arcane::CaseMng::isTreatWarningAsError ( ) const
inlineoverridevirtual

Indicates whether warnings in the dataset should be treated as errors and cause the code to stop.

Implements Arcane::ICaseMng.

Definition at line 203 of file CaseMng.cc.

◆ meshMng()

IMeshMng * Arcane::CaseMng::meshMng ( ) const
inlineoverridevirtual

Associated mesh manager.

Implements Arcane::ICaseMng.

Definition at line 169 of file CaseMng.cc.

References m_sub_domain.

◆ msgClassName()

String Arcane::CaseMng::msgClassName ( ) const
inline

Definition at line 231 of file CaseMng.cc.

◆ observable()

IObservable * Arcane::CaseMng::observable ( eCaseMngEventType type)
inlineoverridevirtual

Observable on the instance.

The type of the observable is given by type

Implements Arcane::ICaseMng.

Definition at line 208 of file CaseMng.cc.

◆ parameters()

const ParameterListWithCaseOption & Arcane::CaseMng::parameters ( ) const
inlinevirtual

List of parameters that can override the dataset.

Implements Arcane::ICaseMngInternal.

Definition at line 226 of file CaseMng.cc.

◆ physicalUnitSystem()

IPhysicalUnitSystem * Arcane::CaseMng::physicalUnitSystem ( ) const
inlineoverridevirtual

Associated unit system.

Implements Arcane::ICaseMng.

Definition at line 172 of file CaseMng.cc.

References m_sub_domain.

◆ printOptions()

void Arcane::CaseMng::printOptions ( )
overridevirtual

Prints the option values.

Implements Arcane::ICaseMng.

Definition at line 838 of file CaseMng.cc.

References Arcane::TraceAccessor::info(), m_case_options_list, and traceMng().

Here is the call graph for this function:

◆ readCaseDocument()

ICaseDocument * Arcane::CaseMng::readCaseDocument ( const String & filename,
ByteConstArrayView bytes )
overridevirtual

Reads the XML document of the dataset.

Implements Arcane::ICaseMng.

Definition at line 954 of file CaseMng.cc.

References application(), Arcane::IApplication::parallelSuperMng(), and Arcane::IParallelSuperMng::threadMng().

Here is the call graph for this function:

◆ readFunctions()

void Arcane::CaseMng::readFunctions ( )
overridevirtual

Reads the dataset tables.

Implements Arcane::ICaseMng.

Definition at line 434 of file CaseMng.cc.

References Arcane::ISubDomain::application(), Arcane::TraceAccessor::info(), m_is_function_read, Arcane::AbstractArray< T >::size(), subDomain(), and traceMng().

Referenced by readOptions().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readOptions()

void Arcane::CaseMng::readOptions ( bool is_phase1)
overridevirtual

Reads the dataset options corresponding to the used modules.

Implements Arcane::ICaseMng.

Definition at line 346 of file CaseMng.cc.

References Arcane::BeginReadOptionsPhase1, Arcane::BeginReadOptionsPhase2, Arcane::ICaseDocumentFragment::clearErrorsAndWarnings(), Arcane::TraceAccessor::info(), Arcane::ICaseDocumentFragment::language(), m_case_options_list, readFunctions(), and traceMng().

Here is the call graph for this function:

◆ registerOptions()

void Arcane::CaseMng::registerOptions ( ICaseOptions * )
overridevirtual

Registers a list of dataset options.

Implements Arcane::ICaseMng.

Definition at line 466 of file CaseMng.cc.

References Arcane::TraceAccessor::log(), m_case_options_list, Arcane::ICaseOptions::rootTagName(), and traceMng().

Here is the call graph for this function:

◆ removeFunction() [1/2]

void Arcane::CaseMng::removeFunction ( ICaseFunction * func)
overridevirtual

Deletes a function.

Deletes the function func. If this function is not in this list, nothing is done.

Implements Arcane::ICaseMng.

Definition at line 905 of file CaseMng.cc.

◆ removeFunction() [2/2]

void Arcane::CaseMng::removeFunction ( ICaseFunction * func,
bool dofree )
overridevirtual

Deletes a function.

Deletes the function func. If this function is not in this list, nothing is done. If dofree is true, the delete operator is called on this function.

Implements Arcane::ICaseMng.

Definition at line 914 of file CaseMng.cc.

◆ setAllowUnkownRootElelement()

void Arcane::CaseMng::setAllowUnkownRootElelement ( bool v)
inlineoverridevirtual

Sets the permission for unknown elements at the document root.

Implements Arcane::ICaseMng.

Definition at line 205 of file CaseMng.cc.

◆ setTreatWarningAsError()

void Arcane::CaseMng::setTreatWarningAsError ( bool v)
inlineoverridevirtual

Sets the way warnings are treated.

See also
isTreatWarningAsError().

Implements Arcane::ICaseMng.

Definition at line 202 of file CaseMng.cc.

◆ subDomain()

ISubDomain * Arcane::CaseMng::subDomain ( )
inlineoverridevirtual

Sub-domain manager.

Implements Arcane::ICaseMng.

Definition at line 170 of file CaseMng.cc.

References m_sub_domain.

Referenced by readFunctions().

Here is the caller graph for this function:

◆ toReference()

Ref< ICaseMng > Arcane::CaseMng::toReference ( )
inlineoverridevirtual

Implements Arcane::ICaseMng.

Definition at line 215 of file CaseMng.cc.

◆ traceMng()

ITraceMng * Arcane::CaseMng::traceMng ( )
inlineoverridevirtual

Trace manager.

Implements Arcane::ICaseMng.

Definition at line 168 of file CaseMng.cc.

References Arcane::TraceAccessor::traceMng().

Referenced by createDocumentFragment(), printOptions(), readFunctions(), readOptions(), registerOptions(), and updateOptions().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unregisterOptions()

void Arcane::CaseMng::unregisterOptions ( ICaseOptions * )
overridevirtual

Unregisters a list of dataset options.

Implements Arcane::ICaseMng.

Definition at line 478 of file CaseMng.cc.

References m_case_options_list.

◆ updateOptions()

void Arcane::CaseMng::updateOptions ( Real current_time,
Real current_deltat,
Integer current_iteration )
overridevirtual

Updates the options based on a time-marching table.

For each option dependent on a marching table, updates its value using the current_time parameter if it is a marching table with a real parameter, or current_iteration if it is a marching table with an integer parameter. If the option function has a non-zero coefficient ICaseFunction::deltatCoef(), the time used is equal to current_time + coef*current_deltat.

Parameters
current_timetime used as parameter for the function
current_deltatdeltat used as parameter for the function
current_iterationiteration used as parameter for the function

Implements Arcane::ICaseMng.

Definition at line 864 of file CaseMng.cc.

References Arcane::ICaseFunction::deltatCoef(), Arcane::math::isZero(), and traceMng().

Here is the call graph for this function:

Member Data Documentation

◆ m_allow_unknown_root_element

bool Arcane::CaseMng::m_allow_unknown_root_element = true
private

Definition at line 241 of file CaseMng.cc.

◆ m_case_document

ScopedPtrT<ICaseDocument> Arcane::CaseMng::m_case_document
private

Definition at line 236 of file CaseMng.cc.

◆ m_case_options_list

CaseOptionsList Arcane::CaseMng::m_case_options_list
private

List of case options.

Definition at line 238 of file CaseMng.cc.

Referenced by _searchInvalidOptions(), blocks(), printOptions(), readOptions(), registerOptions(), and unregisterOptions().

◆ m_dotnet_provider

Ref<ICaseFunctionDotNetProvider> Arcane::CaseMng::m_dotnet_provider
private

Definition at line 245 of file CaseMng.cc.

◆ m_functions

CaseFunctionList Arcane::CaseMng::m_functions
private

List of functions.

Definition at line 237 of file CaseMng.cc.

Referenced by addFunction(), and functions().

◆ m_is_function_read

bool Arcane::CaseMng::m_is_function_read = false
private

Indicates if functions have already been read.

Definition at line 244 of file CaseMng.cc.

Referenced by readFunctions().

◆ m_observables

ObservablePool<eCaseMngEventType> Arcane::CaseMng::m_observables
private

Definition at line 242 of file CaseMng.cc.

◆ m_options_with_function

List<CaseOptionBase*> Arcane::CaseMng::m_options_with_function
private

Definition at line 239 of file CaseMng.cc.

◆ m_parameters

ParameterListWithCaseOption Arcane::CaseMng::m_parameters
private

Definition at line 246 of file CaseMng.cc.

◆ m_sub_domain

ISubDomain* Arcane::CaseMng::m_sub_domain
private

Sub-domain manager.

Definition at line 235 of file CaseMng.cc.

Referenced by application(), meshMng(), physicalUnitSystem(), and subDomain().

◆ m_treat_warning_as_error

bool Arcane::CaseMng::m_treat_warning_as_error = false
private

Definition at line 240 of file CaseMng.cc.


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