20 #ifndef __BASE_TENSOR_HPP_
21 #define __BASE_TENSOR_HPP_
26 #include "headcpp.hpp"
30 #define CARTESIAN_BASIS 0
31 #define SPHERICAL_BASIS 1
82 #ifdef TENSOR_MOVE_SEMANTIC
void swap(Array< T > &so)
Swaps contents between the two arrays (beware when using it with arrays of allocated pointers).
reference set(const Index &pos)
Read/write of an element.
int get_size(int i) const
Returns the size of a given dimension.
void save(FILE *fd, Array_ordering order=last_index) const
Save in a file.
Describes the tensorial basis used by the various tensors.
Base_tensor(const Space &sp, FILE *fd)
Constructor from a file.
Base_tensor(const Base_tensor &so)
Copy constructor.
friend bool operator!=(const Base_tensor &, const Base_tensor &)
Tests the difference of two basis.
Base_tensor(const Space &sp, int bb)
Constructor where the basis is the same everywhere.
int get_basis(int nd) const
Read only the basis in a given domain.
const Space & get_space() const
void save(FILE *fd) const
Saving function.
Array< int > basis
The basis in each Domain.
void swap(Base_tensor &so)
Sylvain's stuff.
Base_tensor(const Space &sp)
Constructor, does not affect anything.
void operator=(const Base_tensor &)
Affectation operator.
friend bool operator==(const Base_tensor &, const Base_tensor &)
Tests equality of two basis.
int & set_basis(int nd)
Read/write the basis in a given domain.
const Space & space
The associated Space.
friend ostream & operator<<(ostream &, const Base_tensor &)
Display.
virtual ~Base_tensor()=default
Destructor.
The Space class is an ensemble of domains describing the whole space of the computation.