TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Sonde Class Reference

class Sonde. This class allows tracking the evolution of a field over time. More...

#include <Sonde.h>

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

Public Member Functions

 Sonde ()
 Default constructor for a probe.
 Sonde (const Nom &)
 Constructor for a probe, given its name.
void associer_post (const Postraitement &)
 Associates the post-processing object with the probe.
virtual void initialiser ()
 Initialises the probe.
virtual void mettre_a_jour (double temps, double tinit)
 Updates the probe in time and performs the post-processing.
virtual void postraiter ()
 Performs post-processing.
void ouvrir_fichier ()
 Opens the file associated with the probe.
virtual void completer ()
void fermer_fichier ()
 Closes the file to which the probe writes.
const Champ_Generique_basele_champ () const
 Returns the associated field.
const DoubleTab & les_positions_sondes_initiales () const
 Returns the array of positions of the field that are probed.
const DoubleTab & les_positions_sondes () const
const DoubleTab & les_positions () const
const IntVect & les_poly () const
 Returns the array of elements that are probed.
void fixer_periode (double)
 Sets the period at which the field is probed.
double temps () const
 The elapsed time.
SFichierfichier ()
 Returns an output file stream pointing to the output file used by the probe.
 ~Sonde () override
 Destructor.
const Nomget_nom () const
const Nomget_type () const
const int & get_dim () const
void nommer (const Nom &n) override
 Assigns a name to the Objet_U. Virtual method to override.
virtual void ajouter_bords (const DoubleTab &coords_bords)
virtual void init_bords ()
virtual void mettre_a_jour_bords ()
void resetTime (double time)
Public Member Functions inherited from Objet_U
 ~Objet_U () override
 Destructor. Removes the object from the list of objects registered in "memory".
int numero () const
 Returns the index of the object in Memoire::data.
virtual int duplique () const =0
virtual SortieprintOn (Sortie &) const
 Writes the object to an output stream. Virtual method to override.
virtual EntreereadOn (Entree &)
 Reads an Objet_U from an input stream. Virtual method to override.
virtual unsigned taille_memoire () const =0
virtual int est_egal_a (const Objet_U &) const
 Returns 1 if x and *this are the same instance (same memory address).
virtual const Nomle_nom () const
 Returns the name of the Objet_U. Virtual method to override: returns "neant" in this implementation.
virtual int reprendre (Entree &)
 Restores an Objet_U from an input stream. Virtual method to override.
virtual int sauvegarder (Sortie &) const
 Saves an Objet_U to an output stream. Virtual method to override.
int get_object_id () const
 Returns the unique identifier of the object (object_id_).
virtual const Type_infoget_info () const
 Returns type information for the Objet_U.
const Nomque_suis_je () const
 Returns the string identifying the class.
const char * le_type () const
 Returns the type name of the Objet_U.
virtual int change_num (const int *const)
 Changes the internal number of the Objet_U.
virtual int lire_motcle_non_standard (const Motcle &motlu, Entree &is)
 Reads non-simple-type parameters of an Objet_U from an input stream.
virtual int associer_ (Objet_U &)
 Associates the Objet_U with another Objet_U. Virtual method to override.
const Interpreteinterprete () const
Interpreteinterprete ()
Public Member Functions inherited from Process
virtual ~Process ()

Protected Member Functions

virtual const Domaine & get_domaine_geom () const
virtual const Noms get_noms_champ () const
virtual int get_nb_compo_champ () const
virtual double get_temps_champ () const
virtual void validate_type (const Motcle &loc) const
virtual void validate_position () const
virtual void create_champ_generique (Entree &is, const Motcle &motlu)
virtual void fix_probe_position ()
virtual void fix_probe_position_grav ()
virtual void fill_local_values ()
virtual void update_source (double un_temps)
 OBS_PTR (Postraitement) mon_post
 OBS_PTR (Champ_Generique_base) mon_champ
 OBS_PTR (Operateur_Statistique_tps_base) operateur_statistique_
Protected Member Functions inherited from Objet_U
 Objet_U ()
 Default constructor: assigns a unique identifier to the object (object_id_) and registers the object in "memory" by giving it a num_obj number.
 Objet_U (const Objet_U &)
 Copy constructor.
const Objet_Uoperator= (const Objet_U &)
 Assignment operator: does nothing (the number and identifier are preserved).
virtual void set_param (Param &) const

Protected Attributes

Nom nom_
 the probe name
Nom nom_fichier_
 the name of the file containing the probe
int dim
 the dimension of the probe (point:0,segment:1,plan:2,volume:3)
int ncomp
DoubleTab les_positions_sondes_initiales_
 coordinates of the initial point probes
DoubleTab les_positions_sondes_
 coordinates of probes across the whole domain after displacement (master only)
DoubleTab les_positions_
 coordinates of probes local to each proc
int numero_elem_
 equals -1 if undefined, otherwise the element number on the master
IntVect elem_
 elements containing the local point probes
double periode
 sampling period
bool nodes = false
bool chsom = false
bool grav = false
bool gravcl = false
bool som = false
DoubleTab valeurs_locales
DoubleTab valeurs_sur_maitre
 valeurs_locales: values on each proc, valeurs_sur_maitre: values gathered on the master
double nb_bip
SFichier le_fichier_
Motcle nom_champ_lu_
ArrsOfInt participant
Nom type_
int orientation_faces_
ArrOfInt faces_bords_
 array containing the indices of the boundary faces hit by the probe
IntTab rang_cl_
 for a given face, index of the CL that this face bears
int nbre_points1 = -1
int nbre_points2 = -1
int nbre_points3 = -1
 used to create sonde_segment, sonde_plan, etc...

Additional Inherited Members

Static Public Member Functions inherited from Objet_U
static const Nomnom_du_cas ()
 Returns a constant reference to the case name. This method is static.
static Nomget_set_nom_du_cas ()
 Returns a non-constant reference to the case name (to allow modification). This method is static.
static const Type_infoinfo ()
 Returns type information for the Objet_U (static version).
static const Objet_Uself_cast (const Objet_U &)
 Method added for casting in Python.
static Objet_Uself_cast (Objet_U &)
Static Public Member Functions inherited from Process
static int me ()
 Returns the rank of the local processor in the current communication group. See Comm_Group::rank() and PE_Groups::current_group().
static int nproc ()
 Returns the number of processors in the current group. See Comm_Group::nproc() and PE_Groups::current_group().
static bool is_parallel ()
static void exit (int exit_code=-1)
 Exit routine for TRUST within a Kokkos region.
static double mp_sum (double)
 Computes the sum of x over all processors in the current group.
static float mp_sum (float)
static trustIdType mp_sum (trustIdType)
 Computes the sum of x over all processors in the current group.
static double mp_max (double)
static double mp_min (double)
static int mp_max (int)
 Returns the maximum value of x across all processors in the current group.
static int mp_min (int)
 Returns the minimum value of x across all processors in the current group.
static double mp_sum_as_double (int v)
static trustIdType mppartial_sum (trustIdType i)
 Computes the partial sum of x over processors 0 to me()-1 (returns 0 on processor 0).
template<typename T>
static void mp_sum_for_each (T &arg1, T &arg2)
 C++14 compatible mp_sum_for_each: combine multiple mp_sum calls into one collective operation Usage: mp_sum_for_each(a, b); mp_sum_for_each(a, b, c); mp_sum_for_each(a, b, c, d); mp_sum_for_each(a, b, c, d, e); All arguments must be of the same type (double or int) and are modified in place. Supports 2-5 parameters.
template<typename T>
static void mp_sum_for_each (T &arg1, T &arg2, T &arg3)
template<typename T>
static void mp_sum_for_each (T &arg1, T &arg2, T &arg3, T &arg4)
template<typename T>
static void mp_sum_for_each (T &arg1, T &arg2, T &arg3, T &arg4, T &arg5)
template<typename T>
static void mp_max_for_each (T &arg1, T &arg2)
 C++14 compatible mp_max_for_each: combine multiple mp_max calls into one collective operation.
template<typename T>
static void mp_max_for_each (T &arg1, T &arg2, T &arg3)
template<typename T>
static void mp_max_for_each (T &arg1, T &arg2, T &arg3, T &arg4)
template<typename T>
static void mp_max_for_each (T &arg1, T &arg2, T &arg3, T &arg4, T &arg5)
template<typename T>
static void mp_min_for_each (T &arg1, T &arg2)
 C++14 compatible mp_min_for_each: combine multiple mp_min calls into one collective operation.
template<typename T>
static void mp_min_for_each (T &arg1, T &arg2, T &arg3)
template<typename T>
static void mp_min_for_each (T &arg1, T &arg2, T &arg3, T &arg4)
template<typename T>
static void mp_min_for_each (T &arg1, T &arg2, T &arg3, T &arg4, T &arg5)
template<typename _TYPE_>
static void mp_sum_for_each_item (TRUSTArray< _TYPE_ > &x, int n=-1)
template<typename _TYPE_>
static void mp_max_for_each_item (TRUSTArray< _TYPE_ > &x, int n=-1)
template<typename _TYPE_>
static void mp_min_for_each_item (TRUSTArray< _TYPE_ > &x, int n=-1)
static bool mp_and (bool)
 Computes the logical AND of b across all processors in the current group.
static bool mp_or (bool)
static int check_int_overflow (trustIdType)
static int je_suis_maitre ()
 Returns 1 if on the master processor of the current group (i.e. me() == 0), 0 otherwise.
static KOKKOS_INLINE_FUNCTION void Kokkos_exit (const char *)
 Exit routine for TRUST within a Kokkos region.
static int node_master ()
 Returns 1 if on the NUMA node master processor, 0 otherwise.
static void exit (const Nom &message, int exit_code=-1)
static bool is_sequential ()
static void barrier ()
 Synchronizes all processors in the current group (waits until all processors have reached the barrier).
static void abort ()
 Abort routine for TRUST on a fatal error.
static SortieJournal (int message_level=0)
 Returns a static Sortie object used as an event journal.
static double ram_processeur ()
static void imprimer_ram_totale (int all_process=0)
static bool force_single_file (const int ranks, const Nom &filename)
Static Public Attributes inherited from Objet_U
static double precision_geom = 1e-10
static constexpr bool HAS_POINTER = false
static int dimension =0
static int format_precision_geom =11
static int axi =0
static int bidim_axi =0
static int DEACTIVATE_SIGINT_CATCH =0
static Type_info info_obj
static bool disable_TU =false
 Flag to disable or not the writing of the .TU files.
static bool stat_per_proc_perf_log =false
 Flag to enable the writing of the statistics detailed per processor in _csv.TU file.
Static Public Attributes inherited from Process
static int exception_sur_exit =0
static int multiple_files =5120

Detailed Description

class Sonde. This class allows tracking the evolution of a field over time.

The set of points at which the field is to be probed and
the observation period are chosen. Postraitement objects hold
probes on the fields to observe; a probe also holds a
reference to a post-processing object.
See also
Postraitement Sondes

Definition at line 40 of file Sonde.h.

Constructor & Destructor Documentation

◆ Sonde() [1/2]

Sonde::Sonde ( )

Default constructor for a probe.

Definition at line 145 of file Sonde.cpp.

◆ Sonde() [2/2]

Sonde::Sonde ( const Nom & nom)

Constructor for a probe, given its name.

Parameters
nomthe name of the probe to construct

Definition at line 132 of file Sonde.cpp.

◆ ~Sonde()

Sonde::~Sonde ( )
inlineoverride

Destructor.

Closes the file before destroying the object.

Definition at line 219 of file Sonde.h.

Member Function Documentation

◆ ajouter_bords()

void Sonde::ajouter_bords ( const DoubleTab & coords_bords)
virtual

Definition at line 1513 of file Sonde.cpp.

◆ associer_post()

void Sonde::associer_post ( const Postraitement & le_post)

Associates the post-processing object with the probe.

Parameters
(Postraitement&le_post) the post-processing object to associate

Definition at line 723 of file Sonde.cpp.

◆ completer()

void Sonde::completer ( )
virtual

Reimplemented in Sonde_IJK.

Definition at line 159 of file Sonde.cpp.

◆ create_champ_generique()

void Sonde::create_champ_generique ( Entree & is,
const Motcle & motlu )
protectedvirtual

Creation of Champ_Generique_refChamp objects needed for initializing the REF to Champ_Generique_base. If the requested field is a Champ_base known to the problem, the corresponding Champ_Generique_refChamp is created.

Reimplemented in Sonde_IJK.

Definition at line 685 of file Sonde.cpp.

◆ fermer_fichier()

void Sonde::fermer_fichier ( )
inline

Closes the file to which the probe writes.

Definition at line 149 of file Sonde.h.

◆ fichier()

SFichier & Sonde::fichier ( )
inline

Returns an output file stream pointing to the output file used by the probe.

Returns
(SFichier&) the output file used by the probe

Definition at line 209 of file Sonde.h.

◆ fill_local_values()

void Sonde::fill_local_values ( )
protectedvirtual

Fill the array 'valeurs_locales' used by each proc to store prob local values

Reimplemented in Sonde_IJK.

Definition at line 1336 of file Sonde.cpp.

◆ fix_probe_position()

virtual void Sonde::fix_probe_position ( )
inlineprotectedvirtual

Fix probe position - used by IJK

Reimplemented in Sonde_IJK.

Definition at line 90 of file Sonde.h.

◆ fix_probe_position_grav()

void Sonde::fix_probe_position_grav ( )
protectedvirtual

Fix probe position when keyword grav or gravcl is used

Reimplemented in Sonde_IJK.

Definition at line 760 of file Sonde.cpp.

◆ fixer_periode()

void Sonde::fixer_periode ( double pe)
inline

Sets the period at which the field is probed.

Parameters
(doublepe) the probing period for the field

Definition at line 159 of file Sonde.h.

◆ get_dim()

const int & Sonde::get_dim ( ) const
inline

Definition at line 66 of file Sonde.h.

◆ get_domaine_geom()

const Domaine & Sonde::get_domaine_geom ( ) const
protectedvirtual

Retrieve the domain to be used for the probe

Reimplemented in Sonde_IJK.

Definition at line 736 of file Sonde.cpp.

◆ get_nb_compo_champ()

int Sonde::get_nb_compo_champ ( ) const
protectedvirtual

Retrieve the number of component for the field - overriden in IJK

Reimplemented in Sonde_IJK.

Definition at line 746 of file Sonde.cpp.

◆ get_nom()

const Nom & Sonde::get_nom ( ) const
inline

Definition at line 64 of file Sonde.h.

◆ get_noms_champ()

const Noms Sonde::get_noms_champ ( ) const
protectedvirtual

Retrieve the field names - overriden in IJK

Reimplemented in Sonde_IJK.

Definition at line 741 of file Sonde.cpp.

◆ get_temps_champ()

double Sonde::get_temps_champ ( ) const
protectedvirtual

Retrieve the current time for the field - overriden in IJK

Reimplemented in Sonde_IJK.

Definition at line 754 of file Sonde.cpp.

◆ get_type()

const Nom & Sonde::get_type ( ) const
inline

Definition at line 65 of file Sonde.h.

◆ init_bords()

void Sonde::init_bords ( )
virtual

Definition at line 1479 of file Sonde.cpp.

◆ initialiser()

void Sonde::initialiser ( )
virtual

Initialises the probe.

Sizes the value arrays, and checks that the specified points lie within the computation domain.

Parameters
domaine_geomthe computation domain to be probed
Exceptions
probepoint outside the computation domain

Definition at line 797 of file Sonde.cpp.

◆ le_champ()

const Champ_Generique_base & Sonde::le_champ ( ) const
inline

Returns the associated field.

Returns
(Champ_base&) the associated field

Definition at line 169 of file Sonde.h.

◆ les_poly()

const IntVect & Sonde::les_poly ( ) const
inline

Returns the array of elements that are probed.

Returns
(IntVect&) the elements that are probed

Definition at line 199 of file Sonde.h.

◆ les_positions()

const DoubleTab & Sonde::les_positions ( ) const
inline

Definition at line 190 of file Sonde.h.

◆ les_positions_sondes()

const DoubleTab & Sonde::les_positions_sondes ( ) const
inline

Definition at line 185 of file Sonde.h.

◆ les_positions_sondes_initiales()

const DoubleTab & Sonde::les_positions_sondes_initiales ( ) const
inline

Returns the array of positions of the field that are probed.

Returns
(DoubleTab&) the probed positions

Definition at line 180 of file Sonde.h.

◆ mettre_a_jour()

void Sonde::mettre_a_jour ( double un_temps,
double tinit )
virtual

Updates the probe in time and performs the post-processing.

Parameters
un_tempsthe update time
tinitthe initial time of the probe

Definition at line 1305 of file Sonde.cpp.

◆ mettre_a_jour_bords()

void Sonde::mettre_a_jour_bords ( )
virtual

Definition at line 1557 of file Sonde.cpp.

◆ nommer()

void Sonde::nommer ( const Nom & nom)
inlineoverridevirtual

Assigns a name to the Objet_U. Virtual method to override.

Parameters
nomThe name to assign to the Objet_U.

Reimplemented from Objet_U.

Definition at line 67 of file Sonde.h.

◆ OBS_PTR() [1/3]

Sonde::OBS_PTR ( Champ_Generique_base )
protected

◆ OBS_PTR() [2/3]

Sonde::OBS_PTR ( Operateur_Statistique_tps_base )
protected

◆ OBS_PTR() [3/3]

Sonde::OBS_PTR ( Postraitement )
protected

◆ ouvrir_fichier()

void Sonde::ouvrir_fichier ( )

Opens the file associated with the probe.

(*.son)

Definition at line 1123 of file Sonde.cpp.

◆ postraiter()

void Sonde::postraiter ( )
virtual

Performs post-processing.

Computes field values at the requested positions and writes them to the associated file.

Definition at line 1363 of file Sonde.cpp.

◆ resetTime()

void Sonde::resetTime ( double time)
inline

Definition at line 73 of file Sonde.h.

◆ temps()

double Sonde::temps ( ) const
inline

The elapsed time.

Returns
(double) the elapsed time

Definition at line 139 of file Sonde.h.

◆ update_source()

void Sonde::update_source ( double un_temps)
protectedvirtual

Update the underlying field source if needed

Reimplemented in Sonde_IJK.

Definition at line 1292 of file Sonde.cpp.

◆ validate_position()

virtual void Sonde::validate_position ( ) const
inlineprotectedvirtual

Should exit if invalid position has been set for a probe - overriden for IJK

Reimplemented in Sonde_IJK.

Definition at line 87 of file Sonde.h.

◆ validate_type()

virtual void Sonde::validate_type ( const Motcle & loc) const
inlineprotectedvirtual

Should exit if invalid type for a probe - overriden for IJK

Reimplemented in Sonde_IJK.

Definition at line 85 of file Sonde.h.

Member Data Documentation

◆ chsom

bool Sonde::chsom = false
protected

Definition at line 116 of file Sonde.h.

◆ dim

int Sonde::dim
protected

the dimension of the probe (point:0,segment:1,plan:2,volume:3)

Definition at line 101 of file Sonde.h.

◆ elem_

IntVect Sonde::elem_
protected

elements containing the local point probes

Definition at line 111 of file Sonde.h.

◆ faces_bords_

ArrOfInt Sonde::faces_bords_
protected

array containing the indices of the boundary faces hit by the probe

Definition at line 129 of file Sonde.h.

◆ grav

bool Sonde::grav = false
protected

Definition at line 117 of file Sonde.h.

◆ gravcl

bool Sonde::gravcl = false
protected

Definition at line 118 of file Sonde.h.

◆ le_fichier_

SFichier Sonde::le_fichier_
protected

Definition at line 122 of file Sonde.h.

◆ les_positions_

DoubleTab Sonde::les_positions_
protected

coordinates of probes local to each proc

Definition at line 109 of file Sonde.h.

◆ les_positions_sondes_

DoubleTab Sonde::les_positions_sondes_
protected

coordinates of probes across the whole domain after displacement (master only)

Definition at line 108 of file Sonde.h.

◆ les_positions_sondes_initiales_

DoubleTab Sonde::les_positions_sondes_initiales_
protected

coordinates of the initial point probes

Definition at line 107 of file Sonde.h.

◆ nb_bip

double Sonde::nb_bip
protected

Definition at line 121 of file Sonde.h.

◆ nbre_points1

int Sonde::nbre_points1 = -1
protected

Definition at line 131 of file Sonde.h.

◆ nbre_points2

int Sonde::nbre_points2 = -1
protected

Definition at line 131 of file Sonde.h.

◆ nbre_points3

int Sonde::nbre_points3 = -1
protected

used to create sonde_segment, sonde_plan, etc...

Definition at line 131 of file Sonde.h.

◆ ncomp

int Sonde::ncomp
protected

Index of the component to probe. If ncomp = -1 the probe applies to all components of the field

Definition at line 106 of file Sonde.h.

◆ nodes

bool Sonde::nodes = false
protected

keys for probe typing (probes redefined at nodes or from values at vertices or at the center of gravity or at vertices)

Definition at line 115 of file Sonde.h.

◆ nom_

Nom Sonde::nom_
protected

the probe name

Definition at line 99 of file Sonde.h.

◆ nom_champ_lu_

Motcle Sonde::nom_champ_lu_
protected

Definition at line 123 of file Sonde.h.

◆ nom_fichier_

Nom Sonde::nom_fichier_
protected

the name of the file containing the probe

Definition at line 100 of file Sonde.h.

◆ numero_elem_

int Sonde::numero_elem_
protected

equals -1 if undefined, otherwise the element number on the master

Definition at line 110 of file Sonde.h.

◆ orientation_faces_

int Sonde::orientation_faces_
protected

Definition at line 126 of file Sonde.h.

◆ participant

ArrsOfInt Sonde::participant
protected

Definition at line 124 of file Sonde.h.

◆ periode

double Sonde::periode
protected

sampling period

Definition at line 112 of file Sonde.h.

◆ rang_cl_

IntTab Sonde::rang_cl_
protected

for a given face, index of the CL that this face bears

Definition at line 130 of file Sonde.h.

◆ som

bool Sonde::som = false
protected

Definition at line 119 of file Sonde.h.

◆ type_

Nom Sonde::type_
protected

Definition at line 125 of file Sonde.h.

◆ valeurs_locales

DoubleTab Sonde::valeurs_locales
protected

Definition at line 120 of file Sonde.h.

◆ valeurs_sur_maitre

DoubleTab Sonde::valeurs_sur_maitre
protected

valeurs_locales: values on each proc, valeurs_sur_maitre: values gathered on the master

Definition at line 120 of file Sonde.h.


The documentation for this class was generated from the following files:
  • /home/docs/trust-code/src/Kernel/Postraitement/Sonde.h
  • /home/docs/trust-code/src/Kernel/Postraitement/Sonde.cpp