1 #ifndef EMM_RealField_H 2 #define EMM_RealField_H 325 return dot(sigma,*
this,F);
350 if (q==1)
return dot(*
this,G);
352 return dot(q,*
this,G);
372 if (q==1)
return dot(w,*
this,G);
373 return dot(q,w,*
this,G);
480 virtual void add(
const tReal& alpha,
This class is a base class of E-MicromM core package.
Definition: EMM_Object.h:21
virtual tBoolean pointDataToCellData(const EMM_Grid3D &mesh)=0
turn the field from point data to cll data
virtual tBoolean cellDataToPointData(const EMM_Grid3D &mesh)=0
turn the field from cell data to point data
This class describes a grid3d mesh.
Definition: EMM_Grid3D.h:48
virtual tUIndex getSize() const =0
return the size of the field
virtual tBoolean saveToStream(ofstream &stream) const =0
save the array into stream and indicators the stream will contain the values of the field...
static const tDimension Y
Definition: EMM_Object.h:34
tDimension mDimension
Definition: EMM_RealField.h:31
virtual void fitToSize()=0
fit the memory size to the size
virtual tReal dot(const tUInt &q, const EMM_RealArray &w, const EMM_RealField &G) const
compute the
Definition: EMM_RealField.h:369
virtual void wedge(const EMM_RealField &X, EMM_RealField &Y) const =0
compute the vectorial product of two fields This & X Y=This ^ X
static const tDimension X
Definition: EMM_Object.h:33
virtual tReal norm(const tUIndex &index) const =0
compute the norm at point at index i
virtual tReal distanceMax(const EMM_RealField &B, tUIndex &k) const =0
compute the Max_i ||this[i]-B[i]||
DEFINE_SPTR(EMM_RealField)
EMM_RealField & operator-=(const EMM_RealField &f)
sub a field This-=f
Definition: EMM_RealField.h:101
EMM_RealField & operator=(const EMM_RealField &f)
copy the real steady field
Definition: EMM_RealField.h:81
EMM_RealField & operator=(const tReal f[4])
init the field to the vector f
Definition: EMM_RealField.h:73
virtual void setFieldByReference(const tUIndex &from, const tUIndex &to, EMM_RealField &X)=0
set the field by reference
EMM_RealField & operator*=(const EMM_RealArray &f)
multiply a vector field by a scalar field to obtain a real field : for all i in [0,N[ for all d in [0,3[, This[i][d]*=f[i]
Definition: EMM_RealField.h:127
virtual tBoolean getValues(tUIndex &size, const long double *&values) const
get the values
Definition: EMM_RealField.h:603
This class is a I/O output class for VTK / Paraviwe file.
Definition: EMM_VTK.h:25
#define tUSInt
Definition: types.h:28
#define tBoolean
Definition: types.h:139
void dotArray(const tUInt &q, const EMM_RealField &G, EMM_RealArray &R) const
compute the array
Definition: EMM_RealField.h:449
virtual void dotArray(const tUInt &q, const EMM_RealArray &w, const EMM_RealField &F, const EMM_RealField &G, EMM_RealArray &R) const =0
compute the array
virtual tReal normMax(tUIndex &index) const =0
compute the point where the norm is max
tBoolean loadFromFile(const tString &fileName)
load the steady array from file
Definition: EMM_RealField.cpp:313
virtual void mean(tReal *mean) const =0
compute the mean of each direction
tBoolean saveToFile(const tString &fileName) const
save the steady array into file
Definition: EMM_RealField.cpp:288
#define tDimension
Definition: EMM_Types.h:10
void dotArray(const EMM_RealArray &w, const EMM_RealField &G, EMM_RealArray &R) const
compute the array
Definition: EMM_RealField.h:460
virtual ~EMM_RealField(void)
destroy the interface
Definition: EMM_RealField.cpp:13
virtual tBoolean getValues(tUIndex &size, double *&values)
get the values
Definition: EMM_RealField.h:621
virtual tBoolean getValues(tUIndex &size, long double *&values)
get the values
Definition: EMM_RealField.h:630
void dotArray(const EMM_RealField &G, EMM_RealArray &R) const
compute the array
Definition: EMM_RealField.h:470
virtual tString toString() const
return the string representation of the field
Definition: EMM_RealField.h:725
virtual SP::EMM_RealField NewInstance() const =0
create a new instance of real field with the same dimension and size
virtual tReal dot(const EMM_RealField &F) const
compute the scalar product
Definition: EMM_RealField.h:315
virtual tBoolean getValues(tUIndex &size, float *&values)
get the values
Definition: EMM_RealField.h:612
virtual tBoolean saveToVTKStream(ofstream &file, EMM_VTK &vtk, const EMM_RealArray &weight, const tString &name) const =0
save the field in vtk
#define tSInt
Definition: types.h:30
virtual void initField(const tReal &f)=0
init the field to uniform value in each direction
DEFINE_SVPTR(EMM_RealField)
virtual void divideBy(const tReal &f)=0
compute This/=f
#define tUInt
Definition: types.h:33
EMM_RealField()
create the interface
Definition: EMM_RealField.cpp:7
virtual tBoolean getValues(tUIndex &size, const float *&values) const
get the values
Definition: EMM_RealField.h:585
#define tUIndex
Definition: types.h:126
This class describes a real array.
Definition: EMM_RealArray.h:16
const tDimension & getDimension() const
get the dimension
Definition: EMM_RealField.h:553
EMM_RealField & operator/=(const tReal &f)
divide with respect of a real
Definition: EMM_RealField.h:110
virtual void unmagnetized(const EMM_Grid3D &mesh)=0
unmagnetized the field in the mesh
virtual tBoolean loadFromStream(ifstream &f, const tUSInt &dim)=0
load the steady array from stream
virtual tReal dot(const EMM_RealArray &sigma, const EMM_RealField &F) const
compute the scalar product
Definition: EMM_RealField.h:324
virtual void multiplyBy(const tReal &f)=0
compute This*=f
virtual void copy(const EMM_RealField &f)=0
copy the real vector
tReal dot(const tUInt &q, const EMM_RealField &G) const
compute the
Definition: EMM_RealField.h:348
#define tString
Definition: types.h:135
void dotArray(const tUInt &q, const EMM_RealArray &w, const EMM_RealField &G, EMM_RealArray &R) const
compute the array
Definition: EMM_RealField.h:437
EMM_RealField & operator+=(const EMM_RealField &f)
add a field This+=f
Definition: EMM_RealField.h:93
virtual tULLInt getMemorySize() const =0
return the memory size in bytes
virtual void normalize()=0
normalize the field
void setValue(const tUIndex &i, const tDimension &k, const tReal &v)
set the value at point i and for coordinate k
Definition: EMM_RealField.h:253
EMM_RealField & operator*=(const tReal &f)
multiply the field by f
Definition: EMM_RealField.h:118
virtual void sub(const EMM_RealField &f)=0
compute This-=f
virtual tString getTypeToString() const =0
return the pointer to the values
void initField(const EMM_RealField &f)
init the field to uniform value in each direction
Definition: EMM_RealField.h:178
tReal getValue(const tUIndex &i, const tDimension &k) const
get the value at point i and for coordinate k
Definition: EMM_RealField.h:563
void setDimension(const tDimension &d)
set the dimension
Definition: EMM_RealField.h:158
#define tULLInt
Definition: types.h:45
EMM_RealField & operator=(const tReal &f)
init the field to uniform value in each direction
Definition: EMM_RealField.h:65
This class describes a real field.
Definition: EMM_RealField.h:21
virtual tBoolean getValues(tUIndex &size, const double *&values) const
get the values
Definition: EMM_RealField.h:594
virtual void setSize(const tUIndex &n)=0
set the size
EMM_RealField & operator/=(const EMM_RealArray &f)
Definition: EMM_RealField.h:136
#define tReal
Definition: types.h:118
void initField(const tReal &fx, const tReal &fy, const tReal &fz)
init the field to the 3D vector
Definition: EMM_RealField.h:224
virtual void add(const tReal &alpha, const EMM_RealField &X)=0
compute This += alpha. X