Domaine_dis_cache#

#include <Domaine_dis_cache.h>
Brief description

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

How to reference this class#

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

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

Detailed description#

This is a singleton class.

Inherits from#

Inheritance graph#

If the image is too small, right-click and open in new tab

../../../../../_images/classDomaine__dis__cache__inherit__graph.png

List of Public Static Methods#

List of Public Methods#

List of Private Methods#

Complete Member Function Documentation#

Build_or_get#

Definition
Domaine_dis_base & Domaine_dis_cache::Build_or_get(const Nom &type, const Domaine &dom)
Brief description
Detailed description
References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`Domaine_dis_base & Domaine_dis_cache::Build_or_get(const Nom &type, const Domaine &dom) <domaine-dis-cache-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)](#domaine-dis-cache-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#

Definition
Domaine_dis_base & Domaine_dis_cache::Build_or_get_poly_post(const Nom &type, const Domaine &dom)
Brief description
Detailed description
References
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`Domaine_dis_base & Domaine_dis_cache::Build_or_get_poly_post(const Nom &type, const Domaine &dom) <domaine-dis-cache-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)](#domaine-dis-cache-public-static-domaine-dis-base-ref-domaine-dis-cache-build-or-get-poly-post-const-nom-ref-type-const-domaine-ref-dom)

Clear#

Definition
void Domaine_dis_cache::Clear()
Brief description

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

Detailed description
References
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`void Domaine_dis_cache::Clear() <domaine-dis-cache-public-static-void-domaine-dis-cache-clear>`
[void Domaine_dis_cache::Clear()](#domaine-dis-cache-public-static-void-domaine-dis-cache-clear)

Get_instance#

Definition
Domaine_dis_cache & Domaine_dis_cache::Get_instance()
Brief description

Get the unique instance of the cache.

Detailed description
References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`Domaine_dis_cache & Domaine_dis_cache::Get_instance() <domaine-dis-cache-public-static-domaine-dis-cache-ref-domaine-dis-cache-get-instance>`
[Domaine_dis_cache & Domaine_dis_cache::Get_instance()](#domaine-dis-cache-public-static-domaine-dis-cache-ref-domaine-dis-cache-get-instance)

build_or_get#

Definition
Domaine_dis_base & Domaine_dis_cache::build_or_get(const Nom &type, const Domaine &dom)
Brief description

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

Detailed description

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 reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`Domaine_dis_base & Domaine_dis_cache::build_or_get(const Nom &type, const Domaine &dom) <domaine-dis-cache-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)](#domaine-dis-cache-public-domaine-dis-base-ref-domaine-dis-cache-build-or-get-const-nom-ref-type-const-domaine-ref-dom)

build_or_get_poly_post#

Definition
Domaine_dis_base & Domaine_dis_cache::build_or_get_poly_post(const Nom &type, const Domaine &dom)
Brief description
Detailed description
References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`Domaine_dis_base & Domaine_dis_cache::build_or_get_poly_post(const Nom &type, const Domaine &dom) <domaine-dis-cache-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)](#domaine-dis-cache-public-domaine-dis-base-ref-domaine-dis-cache-build-or-get-poly-post-const-nom-ref-type-const-domaine-ref-dom)

clear#

Definition
void Domaine_dis_cache::clear() override
Brief description
Detailed description

Reimplements:

How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`void Domaine_dis_cache::clear() override <domaine-dis-cache-public-void-domaine-dis-cache-clear-override>`
[void Domaine_dis_cache::clear() override](#domaine-dis-cache-public-void-domaine-dis-cache-clear-override)

Domaine_dis_cache#

Definition
Domaine_dis_cache::Domaine_dis_cache()
Brief description
Detailed description
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`Domaine_dis_cache::Domaine_dis_cache() <domaine-dis-cache-private-domaine-dis-cache-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.