Commit 005a9cb5 authored by Michael Kuron's avatar Michael Kuron 🔬

clean up flattened fields code

parent c75f4390
Pipeline #22491 passed with stages
in 393 minutes and 18 seconds
......@@ -70,7 +70,7 @@ namespace field {
typedef typename std::conditional<VectorTrait<T>::F_SIZE!=0,
GhostLayerField<typename VectorTrait<T>::OutputType, VectorTrait<T>::F_SIZE*fSize_>,
GhostLayerField<T, fSize_>
>::type FlattenedGhostLayerField;
>::type FlattenedField;
//@}
//****************************************************************************************************************
......@@ -102,7 +102,7 @@ namespace field {
const shared_ptr<FieldAllocator<T> > &alloc = shared_ptr<FieldAllocator<T> >() );
virtual void resize( uint_t xSize, uint_t ySize, uint_t zSize ) override;
virtual void resize( uint_t xSize, uint_t ySize, uint_t zSize );
void resize( uint_t xSize, uint_t ySize, uint_t zSize, uint_t gl );
using Field<T,fSize_>::resize;
......@@ -110,7 +110,7 @@ namespace field {
inline GhostLayerField<T,fSize_> * clone() const;
inline GhostLayerField<T,fSize_> * cloneUninitialized() const;
inline GhostLayerField<T,fSize_> * cloneShallowCopy() const;
inline FlattenedGhostLayerField * flattenedShallowCopy() const;
inline FlattenedField * flattenedShallowCopy() const;
//@}
//****************************************************************************************************************
......@@ -200,8 +200,8 @@ namespace field {
/*! \name Slicing */
//@{
GhostLayerField<T,fSize_> * getSlicedField( const CellInterval & interval ) const;
virtual void slice ( const CellInterval & interval ) override;
virtual void shiftCoordinates( cell_idx_t cx, cell_idx_t cy, cell_idx_t cz ) override;
virtual void slice ( const CellInterval & interval );
virtual void shiftCoordinates( cell_idx_t cx, cell_idx_t cy, cell_idx_t cz );
//@}
//****************************************************************************************************************
......@@ -214,8 +214,8 @@ namespace field {
//** Shallow Copy ************************************************************************************************
/*! \name Shallow Copy */
//@{
virtual Field<T,fSize_> * cloneShallowCopyInternal() const override;
virtual typename Field<T,fSize_>::FlattenedField * flattenedShallowCopyInternal() const override;
virtual Field<T,fSize_> * cloneShallowCopyInternal() const;
virtual typename Field<T,fSize_>::FlattenedField * flattenedShallowCopyInternal() const;
GhostLayerField(const GhostLayerField<T,fSize_> & other);
template <typename T2, uint_t fSize2>
GhostLayerField(const GhostLayerField<T2, fSize2> & other);
......
......@@ -724,7 +724,7 @@ namespace field {
template<typename T, uint_t fSize_>
typename Field<T,fSize_>::FlattenedField * GhostLayerField<T,fSize_>::flattenedShallowCopyInternal() const
{
return new GhostLayerField<T,fSize_>::FlattenedGhostLayerField(*this);
return new GhostLayerField<T,fSize_>::FlattenedField(*this);
}
......@@ -747,9 +747,9 @@ namespace field {
}
template<typename T, uint_t fSize_>
typename GhostLayerField<T,fSize_>::FlattenedGhostLayerField * GhostLayerField<T,fSize_>::flattenedShallowCopy() const
typename GhostLayerField<T,fSize_>::FlattenedField * GhostLayerField<T,fSize_>::flattenedShallowCopy() const
{
return dynamic_cast<GhostLayerField<T,fSize_>::FlattenedGhostLayerField* > (Field<T,fSize_>::flattenedShallowCopy() );
return dynamic_cast<GhostLayerField<T,fSize_>::FlattenedField* > (Field<T,fSize_>::flattenedShallowCopy() );
}
template<typename T, uint_t fSize_>
......
......@@ -542,7 +542,7 @@ private:
template< typename Field_T >
class FlattenedShallowCopyBlockDataHandling : public blockforest::AlwaysInitializeBlockDataHandling< typename Field_T::FlattenedGhostLayerField >
class FlattenedShallowCopyBlockDataHandling : public blockforest::AlwaysInitializeBlockDataHandling< typename Field_T::FlattenedField >
{
public:
......@@ -550,7 +550,7 @@ public:
fieldToClone_( fieldToClone )
{}
typename Field_T::FlattenedGhostLayerField * initialize( IBlock * const block )
typename Field_T::FlattenedField * initialize( IBlock * const block )
{
const Field_T * toClone = block->template getData< Field_T >( fieldToClone_ );
return toClone->flattenedShallowCopy();
......
......@@ -49,7 +49,7 @@ int main( int argc, char ** argv )
{
VectorField * field = blockIt->getData<VectorField>( fieldID );
for( auto cellIt = field->beginXYZ(); cellIt != field->end(); ++cellIt )
for( auto cellIt = field->beginWithGhostLayerXYZ(); cellIt != field->end(); ++cellIt )
{
for( uint_t f = 0; f < 3; ++f)
{
......@@ -67,7 +67,7 @@ int main( int argc, char ** argv )
FlattenedField * flattened = blockIt->getData<FlattenedField>( flattenedID );
VectorField * copy = blockIt->getData<VectorField>( copyID );
for( auto cellIt = field->beginXYZ(); cellIt != field->end(); ++cellIt )
for( auto cellIt = field->beginWithGhostLayerXYZ(); cellIt != field->end(); ++cellIt )
{
for( uint_t f = 0; f < 3; ++f)
{
......
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