Commit d4f5f173 authored by Michael Kuron's avatar Michael Kuron
Browse files

Clearer warning that BlockForest::addBlockData(boost::function, ...) cannot be used with refinement

parent 5298876a
...@@ -357,8 +357,7 @@ public: ...@@ -357,8 +357,7 @@ public:
inline BlockDataID addBlockData( boost::function< T* ( IBlock* const block ) > function, inline BlockDataID addBlockData( boost::function< T* ( IBlock* const block ) > function,
const std::string & identifier = std::string(), const std::string & identifier = std::string(),
const Set<SUID> & requiredSelectors = Set<SUID>::emptySet(), const Set<SUID> & requiredSelectors = Set<SUID>::emptySet(),
const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() ) const Set<SUID> & incompatibleSelectors = Set<SUID>::emptySet() );
{ return BlockStorage::addBlockData( function, identifier, requiredSelectors, incompatibleSelectors ); }
BlockDataID addBlockData( const domain_decomposition::internal::SelectableBlockDataHandlingWrapper & dataHandling, const std::string& identifier = std::string() ) BlockDataID addBlockData( const domain_decomposition::internal::SelectableBlockDataHandlingWrapper & dataHandling, const std::string& identifier = std::string() )
{ return BlockStorage::addBlockData( dataHandling, identifier ); } { return BlockStorage::addBlockData( dataHandling, identifier ); }
...@@ -876,6 +875,17 @@ inline BlockDataID BlockForest::addBlockData( const shared_ptr< T > & dataHandli ...@@ -876,6 +875,17 @@ inline BlockDataID BlockForest::addBlockData( const shared_ptr< T > & dataHandli
template< typename T >
inline BlockDataID BlockForest::addBlockData( boost::function< T* ( IBlock* const block ) > function, const std::string & identifier,
const Set<SUID> & requiredSelectors, const Set<SUID> & incompatibleSelectors )
{
WALBERLA_ASSERT_EQUAL( getDepth(), 0, "addBlockData(function<T*>, ...) cannot be used with refinement, use addBlockData(shared_ptr<T>, ...) instead" );
return BlockStorage::addBlockData( function, identifier, requiredSelectors, incompatibleSelectors );
}
template< typename T > template< typename T >
inline BlockDataID BlockForest::loadBlockData( const std::string & file, const shared_ptr< T > & dataHandling, const std::string & identifier, inline BlockDataID BlockForest::loadBlockData( const std::string & file, const shared_ptr< T > & dataHandling, const std::string & identifier,
const Set<SUID> & requiredSelectors, const Set<SUID> & incompatibleSelectors ) const Set<SUID> & requiredSelectors, const Set<SUID> & incompatibleSelectors )
......
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