Domaine_dis_cache#

#include <Domaine_dis_cache.h>

Cache of discretized domains. Avoid repeating the discretize operation when not necessary.

How to cite this class in this doc#

:ref:`Domaine\_dis\_cache <class-domaine-dis-cache>`
[Domaine\_dis\_cache](#class-domaine-dis-cache)

Detailed description#

This is a singleton class.

Inherits from#

List of Public Static Methods#

List of Public Methods#

List of Private Methods#

Complete Member Function Documentation#

Build_or_get
Domaine_dis_base & Domaine_dis_cache::Build_or_get(const Nom &type, const Domaine &dom)
References
Referenced By
How to cite in this doc:
:ref:`Domaine_dis_base & Domaine_dis_cache::Build_or_get(const Nom &type, const Domaine &dom) <public-static-domaine-dis-base-ref-domaine-dis-cache-build-or-get-const-nom-ref-type-const-domaine-ref-dom>`
[Domaine_dis_base & Domaine_dis_cache::Build_or_get(const Nom &type, const Domaine &dom)](#public-static-domaine-dis-base-ref-domaine-dis-cache-build-or-get-const-nom-ref-type-const-domaine-ref-dom)
Build_or_get_poly_post
Domaine_dis_base & Domaine_dis_cache::Build_or_get_poly_post(const Nom &type, const Domaine &dom)
References
How to cite in this doc:
:ref:`Domaine_dis_base & Domaine_dis_cache::Build_or_get_poly_post(const Nom &type, const Domaine &dom) <public-static-domaine-dis-base-ref-domaine-dis-cache-build-or-get-poly-post-const-nom-ref-type-const-domaine-ref-dom>`
[Domaine_dis_base & Domaine_dis_cache::Build_or_get_poly_post(const Nom &type, const Domaine &dom)](#public-static-domaine-dis-base-ref-domaine-dis-cache-build-or-get-poly-post-const-nom-ref-type-const-domaine-ref-dom)
Clear
void Domaine_dis_cache::Clear()

Clear the content of the cache. Useful to exit nicely making sure everything is deallocated.

References
How to cite in this doc:
:ref:`void Domaine_dis_cache::Clear() <public-static-void-domaine-dis-cache-clear>`
[void Domaine_dis_cache::Clear()](#public-static-void-domaine-dis-cache-clear)
Get_instance
Domaine_dis_cache & Domaine_dis_cache::Get_instance()

Get the unique instance of the cache.

References
Referenced By
How to cite in this doc:
:ref:`Domaine_dis_cache & Domaine_dis_cache::Get_instance() <public-static-domaine-dis-cache-ref-domaine-dis-cache-get-instance>`
[Domaine_dis_cache & Domaine_dis_cache::Get_instance()](#public-static-domaine-dis-cache-ref-domaine-dis-cache-get-instance)
build_or_get
Domaine_dis_base & Domaine_dis_cache::build_or_get(const Nom &type, const Domaine &dom)

Get a discretized domain from the cache, building it and recording it if not there yet.

Process is as follows: type might start with “NO_FACE_” indicating that we just need a simplified discretisation. (see Domaine_dis_base::discretiser_no_face() ) Otherwise we want the full discretisation. The full discr can be used in place of a “NO_FACE”, but not the inverse. In the cache, we save both the full and the NO_FACE if the full was requested. Otherwise just the NO_FACE is saved. The cache key also uses the current interpretor address to handle weird cases like: domaine dom probleme pb Discretize pb dis { Domaine dom Probleme pb Discretize pb dis Lire pb { … } } Lire pb { … }

References
Referenced By
How to cite in this doc:
:ref:`Domaine_dis_base & Domaine_dis_cache::build_or_get(const Nom &type, const Domaine &dom) <public-domaine-dis-base-ref-domaine-dis-cache-build-or-get-const-nom-ref-type-const-domaine-ref-dom>`
[Domaine_dis_base & Domaine_dis_cache::build_or_get(const Nom &type, const Domaine &dom)](#public-domaine-dis-base-ref-domaine-dis-cache-build-or-get-const-nom-ref-type-const-domaine-ref-dom)
build_or_get_poly_post
Domaine_dis_base & Domaine_dis_cache::build_or_get_poly_post(const Nom &type, const Domaine &dom)
References
Referenced By
How to cite in this doc:
:ref:`Domaine_dis_base & Domaine_dis_cache::build_or_get_poly_post(const Nom &type, const Domaine &dom) <public-domaine-dis-base-ref-domaine-dis-cache-build-or-get-poly-post-const-nom-ref-type-const-domaine-ref-dom>`
[Domaine_dis_base & Domaine_dis_cache::build_or_get_poly_post(const Nom &type, const Domaine &dom)](#public-domaine-dis-base-ref-domaine-dis-cache-build-or-get-poly-post-const-nom-ref-type-const-domaine-ref-dom)
clear
void Domaine_dis_cache::clear() override

Reimplements:

How to cite in this doc:
:ref:`void Domaine_dis_cache::clear() override <public-void-domaine-dis-cache-clear-override>`
[void Domaine_dis_cache::clear() override](#public-void-domaine-dis-cache-clear-override)
Domaine_dis_cache
Domaine_dis_cache::Domaine_dis_cache()
How to cite in this doc:
:ref:`Domaine_dis_cache::Domaine_dis_cache() <private-domaine-dis-cache-domaine-dis-cache>`
[Domaine_dis_cache::Domaine_dis_cache()](#private-domaine-dis-cache-domaine-dis-cache)

Attributes Documentation#

cache_ (private)
std::map<std::string, TRUST_Deriv<Domaine_dis_base>> Domaine_dis_cache::cache_

The actual cache hodling the true Domaine_dis objects. Store them as shared_ptr since we need easy duplication, notably for NO_FACE_ discretisations. See build_or_get() method.