29#include "../math/aslVectors.h"
33 class VectorOfElements;
48 inline explicit Box(
unsigned int nd);
98 inline const unsigned int nD(
const Block & b);
120 unsigned int n(
s.getSize());
123 for (
unsigned int i = 0; i < n - 1; ++i)
152 position(V(
s.getSize())),
165 if (p.getSize() !=
s.getSize())
166 errorMessage (
"Block::Block() Size and Position dimensionalities are different");
172 position(b.position),
174 c2iTransformVector(b.c2iTransformVector)
192 if (c.getSize() != n)
193 errorMessage(
"Block::c2i() - The input vector size does not correspond to the block dimensionality");
220 inline const unsigned int nD(
const Block & b)
226 inline const bool in(
const Block & b,
AVec<> a)
232 inline const bool in(
const Block & b, AVec<int>
a)
The class represents several Element.
const unsigned int & getSize() const
acl::VectorOfElements getACLPositionDiscrete()
const DV & getSize() const
AVec< int > DV
Discrete Vector.
const V getBPosition() const
const DV & getSize() const
Block(const DV &s, double dx, const V &p)
const V getBPosition() const
acl::VectorOfElements initACLPosition()
void setSize(const DV &s)
Block(const DV &s, double dx=1)
Block()
the size is taken 1, the position is taken to be 0
int c2i(const Block::DV &c) const
defines convertion rule of 1D/2D/3D index i into container one
const Block & operator=(const Block &b)
acl::VectorOfElements getACLPosition()
acl::VectorOfElements initACLPositionDiscrete()
AVec V
Type of the position.
Box(unsigned int nd)
the size and position are taken 0
const unsigned int nD(const Block &b)
SPDataWrapperACLData generateDataContainerACL_SP(const Block &b, unsigned int n=1)
generates pointer to ACL Data field with n components
const Block offset(const Block &bl, int a=1)
acl::VectorOfElements dx(const TemplateVE &a)
differential operator
void errorMessage(cl_int status, const char *errorMessage)
Prints errorMessage and exits depending on the status.
Advanced Computational Language.
Advanced Simulation Library.
bool in(const T &xx, const T &x1, const T &x2)
Checks the belonging to a closed interval [x1,x2], .
AVec< int > castTransformVector(AVec< int > s)
const AVec< int > continiousToDiscret(const Block &b, AVec<> a)
const bool positive(const AVec< T > &a)