Commit 525325b3 authored by Michael Kuron's avatar Michael Kuron
Browse files

make FieldTest compile

parent 168d2749
......@@ -418,11 +418,6 @@ class Field<T, fSize_> : public Field<T> {
{
Field<T>::resize(xSize, ySize, zSize, fSize_);
}
template<typename ...Args>
Field<T, fSize_> * getSlicedField( const CellInterval & interval ) const;
FlattenedField * flattenedShallowCopy() const;
};
......
......@@ -112,7 +112,7 @@ namespace field {
inline GhostLayerField<T> * clone() const;
inline GhostLayerField<T> * cloneUninitialized() const;
inline GhostLayerField<T> * cloneShallowCopy() const;
inline FlattenedField * flattenedShallowCopy() const;
inline FlattenedField * flattenedShallowCopy() const override;
//@}
//****************************************************************************************************************
......@@ -201,7 +201,7 @@ namespace field {
//** Slicing ****************************************************************************************************
/*! \name Slicing */
//@{
GhostLayerField<T> * getSlicedField( const CellInterval & interval ) const;
GhostLayerField<T> * getSlicedField( const CellInterval & interval ) const override;
void slice ( const CellInterval & interval ) override;
void shiftCoordinates( cell_idx_t cx, cell_idx_t cy, cell_idx_t cz ) override;
//@}
......@@ -228,6 +228,10 @@ namespace field {
friend class GhostLayerField;
};
#ifdef WALBERLA_CXX_COMPILER_IS_CLANG
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wsign-conversion"
#endif
template<typename T, uint_t fSize_>
class GhostLayerField<T, fSize_> : public GhostLayerField<T> {
public:
......@@ -256,9 +260,10 @@ namespace field {
{
GhostLayerField<T>::resize(xSize, ySize, zSize, fSize_);
}
FlattenedField * flattenedShallowCopy() const;
};
#ifdef WALBERLA_CXX_COMPILER_IS_CLANG
#pragma clang diagnostic pop
#endif
} // namespace field
} // namespace walberla
......
......@@ -387,7 +387,7 @@ void sliceTest(field::Layout layout)
auto sliced = shared_ptr<Field<int,fSize> > ( field.getSlicedField(sliceInterval) );
auto sliced = field.getSlicedField(sliceInterval);
WALBERLA_CHECK_EQUAL ( sliced->xSize(), sliceInterval.xSize() );
WALBERLA_CHECK_EQUAL ( sliced->ySize(), sliceInterval.ySize() );
......@@ -592,7 +592,7 @@ void flattenTest()
field( x,y,z,f )[g] = val;
}
shared_ptr<Field<uint_t, 3*fSize>> flattened(field.flattenedShallowCopy());
auto flattened(field.flattenedShallowCopy());
Field<uint_t, 3*fSize> cmp ( 2,2,1 );
WALBERLA_CHECK_EQUAL(cmp.xSize(), flattened->xSize());
......@@ -638,7 +638,7 @@ void ghostFlattenTest()
field( x,y,z,f )[g] = val;
}
shared_ptr<GhostLayerField<uint_t, 3*fSize>> flattened(field.flattenedShallowCopy());
auto flattened(field.flattenedShallowCopy());
GhostLayerField<uint_t, 3*fSize> cmp ( 2,2,1, 1 );
WALBERLA_CHECK_EQUAL(cmp.xSize(), flattened->xSize());
......
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