TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Domaine_dis_cache Class Reference

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

#include <Domaine_dis_cache.h>

Inheritance diagram for Domaine_dis_cache:
[legend]
Collaboration diagram for Domaine_dis_cache:
[legend]

Public Member Functions

Domaine_dis_basebuild_or_get (const Nom &type, const Domaine &dom, const Discretisation_base *disc=nullptr)
 Get a discretized domain from the cache, building it and recording it if not there yet.
Domaine_dis_basebuild_or_get_poly_post (const Nom &type, const Domaine &dom)
void clear () override
Public Member Functions inherited from TClearable
virtual ~TClearable ()

Static Public Member Functions

static Domaine_dis_cacheGet_instance ()
 Get the unique instance of the cache.
static void Clear ()
 Clear the content of the cache. Useful to exit nicely making sure everything is deallocated.
static Domaine_dis_baseBuild_or_get (const Nom &type, const Domaine &dom, const Discretisation_base *disc=nullptr)
static Domaine_dis_baseBuild_or_get_poly_post (const Nom &type, const Domaine &dom)
Static Public Member Functions inherited from TClearable
static void Register_clearable (TClearable *c)
static void Clear_all ()

Detailed Description

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

This is a singleton class.

Definition at line 34 of file Domaine_dis_cache.h.

Member Function Documentation

◆ Build_or_get()

Domaine_dis_base & Domaine_dis_cache::Build_or_get ( const Nom & type,
const Domaine & dom,
const Discretisation_base * disc = nullptr )
static

Definition at line 119 of file Domaine_dis_cache.cpp.

◆ build_or_get()

Domaine_dis_base & Domaine_dis_cache::build_or_get ( const Nom & type,
const Domaine & dom,
const Discretisation_base * disc = nullptr )

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 { ... }

Definition at line 65 of file Domaine_dis_cache.cpp.

◆ Build_or_get_poly_post()

Domaine_dis_base & Domaine_dis_cache::Build_or_get_poly_post ( const Nom & type,
const Domaine & dom )
static

Definition at line 124 of file Domaine_dis_cache.cpp.

◆ build_or_get_poly_post()

Domaine_dis_base & Domaine_dis_cache::build_or_get_poly_post ( const Nom & type,
const Domaine & dom )

Definition at line 108 of file Domaine_dis_cache.cpp.

◆ Clear()

void Domaine_dis_cache::Clear ( )
static

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

Definition at line 40 of file Domaine_dis_cache.cpp.

◆ clear()

void Domaine_dis_cache::clear ( )
inlineoverridevirtual

Implements TClearable.

Definition at line 46 of file Domaine_dis_cache.h.

◆ Get_instance()

Domaine_dis_cache & Domaine_dis_cache::Get_instance ( )
static

Get the unique instance of the cache.

Definition at line 25 of file Domaine_dis_cache.cpp.


The documentation for this class was generated from the following files:
  • /home/docs/checkouts/readthedocs.org/user_builds/cea-trust-platform/checkouts/v1.9.8/src/Kernel/Framework/Domaine_dis_cache.h
  • /home/docs/checkouts/readthedocs.org/user_builds/cea-trust-platform/checkouts/v1.9.8/src/Kernel/Framework/Domaine_dis_cache.cpp