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)
Sets the number of components of the field.
void nommer(const Nom &) override
Gives a name to the field.
const Nom & nom_compo(int) const
Returns the name of the i-th component of the field.
virtual const Noms & fixer_noms_compo(const Noms &)
Sets the names of the field components.
virtual void add_synonymous(const Nom &nom)
FixedVector(int i, int j, int k)
std::shared_ptr< IJK_Field_template< double, TRUSTArray< double > > > data_[N]
: 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
Writes the object to an output stream. Virtual method to override.
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
Gives a name to the field.
Entree & readOn(Entree &is) override
Reads an Objet_U from an input stream. Virtual method to override.
const std::shared_ptr< IJK_Field_template< T, TRUSTArray< T > > > & get_ptr(int i) const
int duplique() const override
class Nom: a character string for naming TRUST objects.
An array of character strings (VECT(Nom)).
int numero() const
Returns the index of the object in Memoire::data.
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Base class for output streams.
Represents a an array of int/int64/double/... values.