|
TRUST 1.9.8
HPC thermohydraulic platform
|
Cache of discretized domains. Avoid repeating the discretize operation when not necessary. More...
#include <Domaine_dis_cache.h>
Public Member Functions | |
| Domaine_dis_base & | 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. | |
| Domaine_dis_base & | build_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_cache & | Get_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_base & | Build_or_get (const Nom &type, const Domaine &dom, const Discretisation_base *disc=nullptr) |
| static Domaine_dis_base & | Build_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 () |
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.
|
static |
Definition at line 119 of file Domaine_dis_cache.cpp.
| 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.
|
static |
Definition at line 124 of file Domaine_dis_cache.cpp.
| 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.
|
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.
|
inlineoverridevirtual |
Implements TClearable.
Definition at line 46 of file Domaine_dis_cache.h.
|
static |
Get the unique instance of the cache.
Definition at line 25 of file Domaine_dis_cache.cpp.