15#ifndef IJK_Field_vector_included
16#define IJK_Field_vector_included
19#include <FixedVector.h>
21#include <Field_base.h>
23#include <Champ_Generique_base.h>
47template<
class T,
int N>
65 nature_ = Nature_du_champ::vectoriel;
67 loc_ = Entity::ELEMENT;
73 const char *compos[] = {
"_X",
"_Y",
"_Z"};
76 for (
int i=0; i<N; i++)
88 const char *compos[] = {
"_X",
"_Y",
"_Z"};
89 for (
int i=0; i<N; i++)
99 return *this->
data_[i];
105 return *this->
data_[i];
108 std::shared_ptr<IJK_Field_template<T,TRUSTArray<T>>>&
get_ptr(
int i)
111 return this->
data_[i];
114 const std::shared_ptr<IJK_Field_template<T,TRUSTArray<T>>>&
get_ptr(
int i)
const
117 return this->
data_[i];
122 for (
int i = 0; i < N; i++)
128 return this->
data_[0]->get_domaine();
135template<
class T,
int N>
139 for (
int i = 0; i < N; i++)
140 resu[i] = v1[i] - v2[i];
144template<
class T,
int N>
148 for (
int i = 0; i < N; i++)
149 resu[i] = v1[i] + v2[i];
153template<
class T,
int N>
157 for (
int i = 0; i < N; i++)
158 resu[i] = v1[i] * v2[i];
162template<
class T,
int N>
166 for (
int i = 0; i < N; i++)
171template<
class T,
int N>
174 for (
int i = 0; i < N; i++)
179template<
class T,
int N>
183 for (
int i = 0; i < N; i++)
184 resu += v1[i] * v2[i];
188template<
class T,
int N>
192 for (
int i = 0; i < N; i++)
193 resu += v1[i] * v2[0];
198template<
class T,
int N>
202 for (
int i = 0; i < N; i++)
208template<
class T,
int N>
211 for (
int i = 0; i < N; i++)
216template<
class T,
int N>
219 for (
int i = 0; i < N; i++)
This class encapsulates all the information related to the eulerian mesh for TrioIJK.
Class defining operators and methods for all reading operation in an input flow (file,...
virtual void fixer_nb_comp(int i)
Fixe le nombre de composantes du champ.
void nommer(const Nom &) override
Donne un nom au champ.
const Nom & nom_compo(int) const
Renvoie le nom de la ieme composante du champ.
virtual const Noms & fixer_noms_compo(const Noms &)
Fixe le nom des composantes du champ.
virtual void add_synonymous(const Nom &nom)
FixedVector(int i, int j, int k)
: This class is an IJK_Field_local with parallel informations.
The class IJK_Field_vector is a fixed array of polymorphic IJK fields.
Sortie & printOn(Sortie &os) const override
Ecriture de l'objet sur un flot de sortie Methode a surcharger.
const IJK_Field_template< T, TRUSTArray< T > > & operator[](int i) const
void add_synonymous(const Nom &nam) override
std::shared_ptr< IJK_Field_template< T, TRUSTArray< T > > > & get_ptr(int i)
IJK_Field_template< T, TRUSTArray< T > > & operator[](int i)
const Domaine_IJK & get_domaine() const
void echange_espace_virtuel()
const Entity & localisation() const
unsigned taille_memoire() const override
void nommer(const Nom &nam) override
Donne un nom au champ.
Entree & readOn(Entree &is) override
Lecture d'un Objet_U sur un flot d'entree Methode a surcharger.
const std::shared_ptr< IJK_Field_template< T, TRUSTArray< T > > > & get_ptr(int i) const
int duplique() const override
class Nom Une chaine de caractere pour nommer les objets de TRUST
Un tableau de chaine de caracteres (VECT(Nom)).
int numero() const
Renvoie l'indice de l'objet dans Memoire::data.
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.
Classe de base des flux de sortie.
Represents a an array of int/int64/double/... values.