24 #ifndef ASLDATAWITHGHOSTNODES_H 25 #define ASLDATAWITHGHOSTNODES_H 38 class AbstractDataWithGhostNodes:
public AbstractData
43 unsigned int ghostBorder;
45 bool bordersDataAcces;
46 inline AbstractDataWithGhostNodes();
47 inline AbstractDataWithGhostNodes(
const Block & b,
int nGN = 1,
bool bDA =
true);
49 inline int getSubContainerOffset()
const;
50 inline unsigned int getSubContainerSize()
const;
51 inline const Block & getInternalBlock()
const;
52 inline const unsigned int getGhostBorder()
const;
57 template <
typename V>
class DataWithGhostNodes:
public AbstractDataWithGhostNodes
62 inline DataWithGhostNodes();
63 inline DataWithGhostNodes(
const Block & b,
int nGN = 1,
bool bDA =
true);
64 inline DataWithGhostNodes(DataWrapper<V> & d,
int nGN = 1);
68 inline void setContainer(
const V & cont);
69 inline V & getContainer();
82 SPDataWithGhostNodesACLData
clone(SPDataWithGhostNodesACLData d);
86 SPDataWithGhostNodesACLData
clone(SPDataWithGhostNodesACLData d,
unsigned int n);
93 AbstractDataWithGhostNodes::AbstractDataWithGhostNodes()
97 AbstractDataWithGhostNodes::AbstractDataWithGhostNodes(
const Block & b,
int nGN,
bool bDA):
98 AbstractData (
offset(b, nGN)),
101 bordersDataAcces(bDA)
111 AbstractDataWithGhostNodes (b,nGN,bDA),
117 AbstractDataWithGhostNodes (
offset(d.getBlock(), -nGN), nGN, true),
135 int nD(b.getSize().getSize());
142 int nD(b.getSize().getSize());
149 dw.setContainer (cont);
154 return dw.getContainer();
160 Block b(
offset(d->getBlock(),newGN));
162 nd(
new DataWithGhostNodes<V>(b, 0));
163 nd->setContainer(d->getContainer());
170 #endif // ASLDATAWITHGHOSTNODES_H int getSubContainerOffset() const
Advanced Simulation Library.
std::shared_ptr< DataWithGhostNodesACLData > SPDataWithGhostNodesACLData
std::shared_ptr< DataWithGhostNodes< V > > resizeGhostNodes(std::shared_ptr< DataWithGhostNodes< V >> d, unsigned int newGN)
void setContainer(const V &cont)
const unsigned int nD(const Block &b)
The class represents several ElementData.
DataWithGhostNodes< acl::VectorOfElementsData > DataWithGhostNodesACLData
unsigned int getSubContainerSize() const
const Block offset(const Block &bl, int a=1)
The class represents several Element.
const Block & getInternalBlock() const
unsigned int ghostBorder
num of cells within the border
SPDataWithGhostNodesACLData clone(SPDataWithGhostNodesACLData d, unsigned int n)
std::shared_ptr< AbstractDataWithGhostNodes > SPAbstractDataWithGhostNodes
DataWithGhostNodes< acl::VectorOfElements > DataWithGhostNodesACL
std::shared_ptr< DataWithGhostNodesACL > SPDataWithGhostNodesACL
const unsigned int getGhostBorder() const