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

Fix broken ParserUBB

parent b2f8b539
...@@ -63,7 +63,7 @@ public: ...@@ -63,7 +63,7 @@ public:
{ {
public: public:
inline Parser( const Config::BlockHandle & config ); inline Parser( const Config::BlockHandle & config );
inline Parser( std::array< std::string, 3 > & equations ); inline Parser( const std::array< std::string, 3 > & equations );
Vector3< real_t > operator()( const Vector3< real_t > & x, const real_t t ) const; Vector3< real_t > operator()( const Vector3< real_t > & x, const real_t t ) const;
Vector3< real_t > operator()( const Vector3< real_t > & x ) const; Vector3< real_t > operator()( const Vector3< real_t > & x ) const;
bool isTimeDependent() const { return timeDependent_; } bool isTimeDependent() const { return timeDependent_; }
...@@ -207,7 +207,7 @@ inline ParserUBB<LatticeModel_T, flag_t, AdaptVelocityToExternalForce, StoreForc ...@@ -207,7 +207,7 @@ inline ParserUBB<LatticeModel_T, flag_t, AdaptVelocityToExternalForce, StoreForc
} }
template< typename LatticeModel_T, typename flag_t, bool AdaptVelocityToExternalForce, bool StoreForce> template< typename LatticeModel_T, typename flag_t, bool AdaptVelocityToExternalForce, bool StoreForce>
inline ParserUBB<LatticeModel_T, flag_t, AdaptVelocityToExternalForce, StoreForce>::Parser::Parser( std::array< std::string, 3 > & equations ) inline ParserUBB<LatticeModel_T, flag_t, AdaptVelocityToExternalForce, StoreForce>::Parser::Parser( const std::array< std::string, 3 > & equations )
: parsers_(), equations_( equations ), timeDependent_( false ) : parsers_(), equations_( equations ), timeDependent_( false )
{ {
if( equations_[0].length() > 0 ) if( equations_[0].length() > 0 )
...@@ -370,7 +370,7 @@ inline void ParserUBB< LatticeModel_T, flag_t, AdaptVelocityToExternalForce, Sto ...@@ -370,7 +370,7 @@ inline void ParserUBB< LatticeModel_T, flag_t, AdaptVelocityToExternalForce, Sto
if( p.isTimeDependent() ) if( p.isTimeDependent() )
{ {
parserField_->get( x, y, z ) = make_shared<Parser>(p); parserField_->get( x, y, z ) = make_shared<Parser>( p.equations() );
} }
else else
{ {
...@@ -404,7 +404,7 @@ inline void ParserUBB< LatticeModel_T, flag_t, AdaptVelocityToExternalForce, Sto ...@@ -404,7 +404,7 @@ inline void ParserUBB< LatticeModel_T, flag_t, AdaptVelocityToExternalForce, Sto
if( p.isTimeDependent() ) if( p.isTimeDependent() )
{ {
auto shared_p = make_shared<Parser>(p); auto shared_p = make_shared<Parser>( p.equations() );
for( auto cell = parserField_->beginSliceXYZ( cells ); cell != parserField_->end(); ++cell ) for( auto cell = parserField_->beginSliceXYZ( cells ); cell != parserField_->end(); ++cell )
*cell = shared_p; *cell = shared_p;
} }
......
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