Commit 7e8ee63d authored by Markus Holzer's avatar Markus Holzer
Browse files

Fix Small problem

parent 1b885ca4
Pipeline #38684 failed with stages
in 20 minutes and 1 second
......@@ -417,38 +417,44 @@ class Field<T, fSize_> : public Field<T> {
: Field<T>::Field(xSize, ySize, zSize, fSize_, fValues, layout, alloc){}
template<typename ...Args>
void init(uint_t xSize, uint_t ySize, uint_t zSize, Args&&... args)
void init(uint_t xSize, uint_t ySize, uint_t zSize, const Layout & layout = zyxf,
shared_ptr<FieldAllocator<T> > alloc = shared_ptr<FieldAllocator<T> >(),
uint_t innerGhostLayerSizeForAlignedAlloc = 0)
{
Field<T>::init(xSize, ySize, zSize, fSize_, std::forward<Args>(args)...);
Field<T>::init(xSize, ySize, zSize, fSize_, layout, alloc, innerGhostLayerSizeForAlignedAlloc);
}
virtual void resize(uint_t xSize, uint_t ySize, uint_t zSize, uint_t /*fSize*/)
void resize( uint_t _xSize, uint_t _ySize, uint_t _zSize, uint_t /*_fSize*/ ) override
{
Field<T>::resize(xSize, ySize, zSize, fSize_);
Field<T>::resize(_xSize, _ySize, _zSize, fSize_);
}
Field<T, fSize_> * getSlicedField( const CellInterval & interval ) const
virtual void resize( uint_t _xSize, uint_t _ySize, uint_t _zSize )
{
Field<T>::resize(_xSize, _ySize, _zSize, fSize_);
}
Field<T, fSize_> * getSlicedField( const CellInterval & interval ) const override
{
return static_cast<Field<T, fSize_>* > (Field<T>::getSlicedField( interval ));
}
virtual Field<T, fSize_> * clone() const
Field<T, fSize_> * clone() const override
{
return static_cast<Field<T, fSize_>* > (Field<T>::clone());
}
virtual Field<T, fSize_> * cloneUninitialized() const
Field<T, fSize_> * cloneUninitialized() const override
{
return static_cast<Field<T, fSize_>* > (Field<T>::cloneUninitialized());
}
virtual Field<T, fSize_> * cloneShallowCopy() const
Field<T, fSize_> * cloneShallowCopy() const override
{
return static_cast<Field<T, fSize_>* > (Field<T>::cloneShallowCopy());
}
virtual FlattenedField* flattenedShallowCopy() const
FlattenedField* flattenedShallowCopy() const override
{
return static_cast<FlattenedField* > (Field<T>::flattenedShallowCopy());
}
......
......@@ -298,15 +298,26 @@ class GhostLayerField<T, fSize_> : public Field<T, fSize_> {
}
void resize( uint_t _xSize, uint_t _ySize, uint_t _zSize, uint_t /*fSize*/ ) override
void resize( uint_t _xSize, uint_t _ySize, uint_t _zSize ) override
{
if ( _xSize == this->xSize() && _ySize == this->ySize() && _zSize == this->zSize() )
return;
Field<T, fSize_>::resize( _xSize+2*gl_, _ySize+2*gl_, _zSize+2*gl_, fSize_);
Field<T, fSize_>::setOffsets( gl_, _xSize, gl_, _ySize, gl_, _zSize );
Field<T,fSize_>::resize( _xSize+2*gl_, _ySize+2*gl_, _zSize+2*gl_);
Field<T,fSize_>::setOffsets( gl_, _xSize, gl_, _ySize, gl_, _zSize );
}
void resize( uint_t _xSize, uint_t _ySize, uint_t _zSize, uint_t _gl ) override
{
if ( _xSize == this->xSize() && _ySize == this->ySize() && _zSize == this->zSize() && _gl == gl_ )
return;
gl_ = _gl;
Field<T,fSize_>::resize( _xSize+2*gl_, _ySize+2*gl_, _zSize+2*gl_);
Field<T,fSize_>::setOffsets( gl_, _xSize, gl_, _ySize, gl_, _zSize );
}
Field<T, fSize_> * cloneShallowCopyInternal() const override
{
return new GhostLayerField<T,fSize_>(*this);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment