16#ifndef Champ_Fonc_MED_included
17#define Champ_Fonc_MED_included
19#include <Domaine_VF_inst.h>
20#include <TRUSTArray.h>
24#include <medcoupling++.h>
26#include <MEDCouplingFieldDouble.hxx>
27using MEDCoupling::MEDCouplingField;
44 int creer(
const Nom&,
const Domaine& dom,
const Motcle& localisation,ArrOfDouble& temps_sauv);
46 const Domaine&
domaine()
const override {
return mon_dom; }
47 virtual void lire(
double tps,
int given_iteration=-1);
50 inline DoubleTab&
valeurs()
override;
51 inline const DoubleTab&
valeurs()
const override;
53 inline DoubleTab&
valeur_aux_elems(
const DoubleTab& positions,
const IntVect& les_polys, DoubleTab&
valeurs)
const override;
54 inline DoubleVect&
valeur_aux_elems_compo(
const DoubleTab& positions,
const IntVect& les_polys, DoubleVect&
valeurs,
int ncomp)
const override;
57 inline DoubleVect&
valeur_a(
const DoubleVect& position, DoubleVect&
valeurs)
const override;
59 inline DoubleVect&
valeur_a_elem(
const DoubleVect& position, DoubleVect&
valeurs,
int le_poly)
const override ;
67 ArrOfDouble lire_temps_champ(
const std::string& fileName,
const std::string& fieldName);
68 virtual void lire_donnees_champ(
const std::string& fileName,
const std::string& meshName,
const std::string& fieldName,
69 ArrOfDouble& temps_sauv,
int& size,
int& nbcomp,
Nom& type_champ);
70 MCAuto<MEDCoupling::MEDCouplingField> lire_champ(
const std::string& fileName,
const std::string& meshName,
const std::string& fieldName,
const int iteration,
const int order);
89 med_entity_type type_ent;
90 med_geometry_type type_geo;
92 INTERP_KERNEL::NormalizedCellType cell_type;
93 MEDCoupling::TypeOfField field_type = MEDCoupling::ON_CELLS;
94 std::vector< std::pair<int,int> > time_steps_;
109 Cerr<<
"Champ_Fonc_MED::associer_domaine_dis_base does nothing"<<finl;
113 return vrai_champ_.valeur();
118 return vrai_champ_.valeur();
137 domaine.chercher_elements(position, le_poly);
DoubleTab & valeurs() override
Overrides Champ_base::valeurs() Returns the array of values.
class Champ_Fonc_MED Load a field from a MED file for a given time.
const Domaine & domaine() const override
const ArrOfDouble & get_saved_times() const
std::vector< trustIdType > filter
const Domaine_VF & domaine_vf() const override
virtual void lire(double tps, int given_iteration=-1)
DoubleTab & valeur_aux_sommets(const Domaine &, DoubleTab &) const override
Returns the values at the vertices of the Domain dom.
MCAuto< MEDCouplingField > ffield_
void associer_domaine_dis_base(const Domaine_dis_base &) override
void readOn_old_syntax(Entree &is, Nom &chaine_lue, bool &nom_decoup_lu)
DoubleTab & valeurs() override
Overrides Champ_base::valeurs() Returns the array of values.
int creer(const Nom &, const Domaine &dom, const Motcle &localisation, ArrOfDouble &temps_sauv)
void mettre_a_jour(double) override
Time update of the field.
DoubleTab & valeur_aux_elems(const DoubleTab &positions, const IntVect &les_polys, DoubleTab &valeurs) const override
Causes an error! Must be overridden by derived classes.
DoubleVect & valeur_aux_sommets_compo(const Domaine &, DoubleVect &, int) const override
Returns the compo-th value at the vertices of dom.
Domaine_VF_inst domainebidon_inst
const Domaine_dis_base & domaine_dis_base() const override
OWN_PTR(Champ_Fonc_base) vrai_champ_
DoubleVect & valeur_a_elem(const DoubleVect &position, DoubleVect &valeurs, int le_poly) const override
Causes an error! Must be overridden by derived classes.
virtual const Champ_Fonc_base & le_champ() const
DoubleVect & valeur_a(const DoubleVect &position, DoubleVect &valeurs) const override
Computes the "values" of the field at the point with coordinates "pos".
virtual void set_param(Param ¶m) const override
Nom nom_champ_dans_fichier_med_
bool use_existing_domain_
int remplir_coord_noeuds_et_polys(DoubleTab &, IntVect &) const override
DOES NOTHING TO override in derived classes.
DoubleTab & remplir_coord_noeuds(DoubleTab &) const override
DOES NOTHING TO override in derived classes.
DoubleVect & valeur_aux_elems_compo(const DoubleTab &positions, const IntVect &les_polys, DoubleVect &valeurs, int ncomp) const override
Causes an error! Must be overridden by derived classes.
class Champ_Fonc_base Base class of fields that are functions of a calculated quantity
virtual int remplir_coord_noeuds_et_polys(DoubleTab &, IntVect &) const
DOES NOTHING TO override in derived classes.
virtual DoubleTab & remplir_coord_noeuds(DoubleTab &) const
DOES NOTHING TO override in derived classes.
virtual DoubleVect & valeur_a(const DoubleVect &position, DoubleVect &valeurs) const
Computes the "values" of the field at the point with coordinates "pos".
virtual DoubleVect & valeur_aux_elems_compo(const DoubleTab &positions, const IntVect &les_polys, DoubleVect &valeurs, int ncomp) const
Causes an error! Must be overridden by derived classes.
virtual DoubleVect & valeur_aux_sommets_compo(const Domaine &, DoubleVect &, int) const
Returns the compo-th value at the vertices of dom.
virtual DoubleTab & valeur_aux_elems(const DoubleTab &positions, const IntVect &les_polys, DoubleTab &valeurs) const
Causes an error! Must be overridden by derived classes.
virtual DoubleVect & valeur_a_elem(const DoubleVect &position, DoubleVect &valeurs, int le_poly) const
Causes an error! Must be overridden by derived classes.
virtual DoubleTab & valeur_aux_sommets(const Domaine &, DoubleTab &) const
Returns the values at the vertices of the Domain dom.
class Domaine_dis_base This class is the base of the hierarchy of discretized domains.
Class defining operators and methods for all reading operation in an input flow (file,...
A character string (Nom) in uppercase.
class Nom: a character string for naming TRUST objects.
Helper class to factorize the readOn method of Objet_U classes.