43 #ifndef MESHVECTORFIELD_HPP
44 #define MESHVECTORFIELD_HPP 1
83 void check_definition();
147 double fscale,
const std::string &filename );
257 Vec3D origo,
double h );
298 void set( int32_t i,
const Vec3D &v );
302 void set( int32_t i, int32_t j,
const Vec3D &v );
306 void set( int32_t i, int32_t j, int32_t k,
const Vec3D &v );
315 void save(
const std::string &filename )
const;
319 void save( std::ostream &os )
const;
const Vec3D operator()(int32_t i) const
Operator for getting elements of the field mesh.
MeshVectorField & operator*=(double x)
Scaling operator for field values.
Abstract base class for vector field.
Definition: vectorfield.hpp:53
void rotate_y(double a)
Rotate solid around y-axis.
void reset_transformation(void)
Set transformation to unity.
MeshVectorField & operator+=(const MeshVectorField &f)
Accumulation operator.
Mesh geometry definion.
Definition: mesh.hpp:67
Vec3D origo(void) const
Returns origo vector of geometry.
Definition: mesh.hpp:128
geom_mode_e
Geometry mode enum.
Definition: types.hpp:59
field_extrpl_e
Field extrapolation mode.
Definition: types.hpp:76
void translate(const Vec3D &dx)
Translate field.
MeshVectorField & operator=(const MeshVectorField &f)
Copy operator.
void rotate_x(double a)
Rotate solid around x-axis.
MeshVectorField()
Default constructor.
void save(const std::string &filename) const
Saves data to a new file filename.
void reset(geom_mode_e geom_mode, const bool fout[3], Int3D size, Vec3D origo, double h)
Resets the field geometry.
double h(void) const
Returns mesh cell size.
Definition: mesh.hpp:146
void set(int32_t i, const Vec3D &v)
Operator for setting element (i) of the field mesh.
virtual ~MeshVectorField()
Destructor.
void set_extrapolation(const field_extrpl_e extrpl[6])
Set the behaviour of field interpolation outside mesh points (extrapolation).
Definition: meshvectorfield.hpp:206
void debug_print(std::ostream &os) const
Print debugging information to stream os.
Vec3D max(void) const
Returns vector pointing to the last mesh point opposite of origo.
Definition: mesh.hpp:137
3D Integer vector class.
Definition: vec3d.hpp:289
Mesh based vector field.
Definition: meshvectorfield.hpp:71
Rectangular mesh definition.
void get_defined_components(bool fout[3]) const
Get which field components are defined.
void scale(const Vec3D &sx)
Scale field.
void clear()
Clears the field.
Int3D size(void) const
Returns size array of geometry.
Definition: mesh.hpp:116
MeshVectorField & operator/=(double x)
Inverse scaling operator.
void get_minmax(double &min, double &max) const
Search minimum and maximum vector length values of vector field.
Three dimensional vector.
Definition: vec3d.hpp:58
void rotate_z(double a)
Rotate solid around z-axis.
geom_mode_e geom_mode(void) const
Returns geometry mode.
Definition: mesh.hpp:108
void set_transformation(const Transformation &T)
Set transformation as a copy of T.