Loading examples/heat-equation/tnl-run-heat-equation-eoc-test +19 −8 Original line number Diff line number Diff line #!/bin/bash solverName="tnl-heat-equation-eoc-test" device="host" dimensions="1D 2D 3D" sizes1D="16 32 64 128 256 512" dimensions="1D" # 2D 3D" sizes1D="16" # 32 64 128 256 512" sizes2D="16 32 64 128 256 512" sizes3D="16 32 64 128" testFunctions="exp-bump" snapshotPeriod=0.1 finalTime=1 timeDependence="linear" solverName="tnl-heat-equation-eoc-test" setupTestFunction() { Loading Loading @@ -54,7 +55,7 @@ setInitialCondition() { testFunction=$1 tnl-init --function ${testFunction} \ --output-file init.tnl \ --output-file exact-u.tnl \ --amplitude ${amplitude} \ --wave-length ${waveLength} \ --wave-length-x ${waveLengthX} \ Loading @@ -68,7 +69,10 @@ setInitialCondition() --phase-x ${phaseX} \ --phase-y ${phaseY} \ --phase-z ${phaseZ} \ --sigma ${sigma} --sigma ${sigma} \ --test-function-time-dependence ${timeDependence} \ --snapshot-period ${snapshotPeriod} \ --final-time ${finalTime} } solve() Loading @@ -76,6 +80,7 @@ solve() timeDiscretisation=$1 discreteSolver=$2 ${solverName} --mesh mesh.tnl \ --initial-condition exact-u-0000.tnl \ --time-discretisation ${timeDiscretisation} \ --discrete-solver ${discreteSolver} \ --test-function ${testFunction}\ Loading @@ -93,6 +98,7 @@ solve() --phase-y ${phaseY} \ --phase-z ${phaseZ} \ --sigma ${sigma} \ --test-function-time-dependence ${timeDependence} \ --snapshot-period ${snapshotPeriod} \ --final-time ${finalTime} } Loading Loading @@ -135,9 +141,14 @@ runTest() do mkdir -p $size cd $size if test ! -f computation-done; then touch computation-in-progress setupGrid $dim $size setInitialCondition $testFunction solve explicit merson mv computation-in-progress computation-done fi cd .. done Loading src/config/tnlConfigDelimiter.h +1 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ struct tnlConfigDelimiter : public tnlConfigEntryBase { tnlConfigDelimiter( const char* delimiter ) tnlConfigDelimiter( const tnlString& delimiter ) : tnlConfigEntryBase( "", delimiter, false ) { }; Loading src/config/tnlConfigDescription.h +16 −16 Original line number Diff line number Diff line Loading @@ -35,24 +35,24 @@ class tnlConfigDescription tnlConfigDescription(); template< typename EntryType > void addEntry( const char* name, const char* description ) void addEntry( const tnlString& name, const tnlString& description ) { currentEntry = new tnlConfigEntry< EntryType >( name, description, false ); entries.Append( currentEntry ); } template< typename EntryType > void addRequiredEntry( const char* name, const char* description ) void addRequiredEntry( const tnlString& name, const tnlString& description ) { currentEntry = new tnlConfigEntry< EntryType >( name, description, true ); entries.Append( currentEntry ); } template< typename EntryType > void addEntry( const char* name, const char* description, void addEntry( const tnlString& name, const tnlString& description, const EntryType& defaultValue ) { currentEntry = new tnlConfigEntry< EntryType >( name, Loading @@ -63,24 +63,24 @@ class tnlConfigDescription } template< typename EntryType > void addList( const char* name, const char* description ) void addList( const tnlString& name, const tnlString& description ) { currentEntry = new tnlConfigEntryList< EntryType >( name, description, false ); entries.Append( currentEntry ); } template< typename EntryType > void addRequiredList( const char* name, const char* description ) void addRequiredList( const tnlString& name, const tnlString& description ) { currentEntry = new tnlConfigEntryList< EntryType >( name, description, true ); entries.Append( currentEntry ); } template< typename EntryType > void addList( const char* name, const char* description, void addList( const tnlString& name, const tnlString& description, const EntryType& defaultValue ) { currentEntry = new tnlConfigEntryList< EntryType >( name, Loading @@ -103,13 +103,13 @@ class tnlConfigDescription ( ( tnlConfigEntry< tnlString >* ) currentEntry )->getEnumValues().Append( tnlString( entryEnum ) ); } void addDelimiter( const char* delimiter ) void addDelimiter( const tnlString& delimiter ) { entries.Append( new tnlConfigDelimiter( delimiter ) ); currentEntry = 0; } const tnlConfigEntryBase* getEntry( const char* name ) const const tnlConfigEntryBase* getEntry( const tnlString& name ) const { for( int i = 0; i < entries.getSize(); i++ ) if( entries[ i ]->name == name ) Loading @@ -122,7 +122,7 @@ class tnlConfigDescription //const tnlString getEntryType( const char* name ) const; //! Returns zero pointer if there is no default value template< class T > const T* getDefaultValue( const char* name ) const template< class T > const T* getDefaultValue( const tnlString& name ) const { int i; const int entries_num = entries. getSize(); Loading @@ -138,7 +138,7 @@ class tnlConfigDescription } //! Returns zero pointer if there is no default value template< class T > T* getDefaultValue( const char* name ) template< class T > T* getDefaultValue( const tnlString& name ) { int i; const int entries_num = entries. getSize(); Loading src/config/tnlConfigEntry.h +4 −4 Original line number Diff line number Diff line Loading @@ -29,8 +29,8 @@ struct tnlConfigEntry : public tnlConfigEntryBase public: tnlConfigEntry( const char* name, const char* description, tnlConfigEntry( const tnlString& name, const tnlString& description, bool required ) : tnlConfigEntryBase( name, description, Loading @@ -39,8 +39,8 @@ struct tnlConfigEntry : public tnlConfigEntryBase hasDefaultValue = false; } tnlConfigEntry( const char* name, const char* description, tnlConfigEntry( const tnlString& name, const tnlString& description, bool required, const EntryType& defaultValue) : tnlConfigEntryBase( name, Loading src/config/tnlConfigEntryBase.h +2 −2 Original line number Diff line number Diff line Loading @@ -28,8 +28,8 @@ struct tnlConfigEntryBase bool hasDefaultValue; tnlConfigEntryBase( const char* name, const char* description, tnlConfigEntryBase( const tnlString& name, const tnlString& description, bool required ) : name( name ), description( description ), Loading Loading
examples/heat-equation/tnl-run-heat-equation-eoc-test +19 −8 Original line number Diff line number Diff line #!/bin/bash solverName="tnl-heat-equation-eoc-test" device="host" dimensions="1D 2D 3D" sizes1D="16 32 64 128 256 512" dimensions="1D" # 2D 3D" sizes1D="16" # 32 64 128 256 512" sizes2D="16 32 64 128 256 512" sizes3D="16 32 64 128" testFunctions="exp-bump" snapshotPeriod=0.1 finalTime=1 timeDependence="linear" solverName="tnl-heat-equation-eoc-test" setupTestFunction() { Loading Loading @@ -54,7 +55,7 @@ setInitialCondition() { testFunction=$1 tnl-init --function ${testFunction} \ --output-file init.tnl \ --output-file exact-u.tnl \ --amplitude ${amplitude} \ --wave-length ${waveLength} \ --wave-length-x ${waveLengthX} \ Loading @@ -68,7 +69,10 @@ setInitialCondition() --phase-x ${phaseX} \ --phase-y ${phaseY} \ --phase-z ${phaseZ} \ --sigma ${sigma} --sigma ${sigma} \ --test-function-time-dependence ${timeDependence} \ --snapshot-period ${snapshotPeriod} \ --final-time ${finalTime} } solve() Loading @@ -76,6 +80,7 @@ solve() timeDiscretisation=$1 discreteSolver=$2 ${solverName} --mesh mesh.tnl \ --initial-condition exact-u-0000.tnl \ --time-discretisation ${timeDiscretisation} \ --discrete-solver ${discreteSolver} \ --test-function ${testFunction}\ Loading @@ -93,6 +98,7 @@ solve() --phase-y ${phaseY} \ --phase-z ${phaseZ} \ --sigma ${sigma} \ --test-function-time-dependence ${timeDependence} \ --snapshot-period ${snapshotPeriod} \ --final-time ${finalTime} } Loading Loading @@ -135,9 +141,14 @@ runTest() do mkdir -p $size cd $size if test ! -f computation-done; then touch computation-in-progress setupGrid $dim $size setInitialCondition $testFunction solve explicit merson mv computation-in-progress computation-done fi cd .. done Loading
src/config/tnlConfigDelimiter.h +1 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ struct tnlConfigDelimiter : public tnlConfigEntryBase { tnlConfigDelimiter( const char* delimiter ) tnlConfigDelimiter( const tnlString& delimiter ) : tnlConfigEntryBase( "", delimiter, false ) { }; Loading
src/config/tnlConfigDescription.h +16 −16 Original line number Diff line number Diff line Loading @@ -35,24 +35,24 @@ class tnlConfigDescription tnlConfigDescription(); template< typename EntryType > void addEntry( const char* name, const char* description ) void addEntry( const tnlString& name, const tnlString& description ) { currentEntry = new tnlConfigEntry< EntryType >( name, description, false ); entries.Append( currentEntry ); } template< typename EntryType > void addRequiredEntry( const char* name, const char* description ) void addRequiredEntry( const tnlString& name, const tnlString& description ) { currentEntry = new tnlConfigEntry< EntryType >( name, description, true ); entries.Append( currentEntry ); } template< typename EntryType > void addEntry( const char* name, const char* description, void addEntry( const tnlString& name, const tnlString& description, const EntryType& defaultValue ) { currentEntry = new tnlConfigEntry< EntryType >( name, Loading @@ -63,24 +63,24 @@ class tnlConfigDescription } template< typename EntryType > void addList( const char* name, const char* description ) void addList( const tnlString& name, const tnlString& description ) { currentEntry = new tnlConfigEntryList< EntryType >( name, description, false ); entries.Append( currentEntry ); } template< typename EntryType > void addRequiredList( const char* name, const char* description ) void addRequiredList( const tnlString& name, const tnlString& description ) { currentEntry = new tnlConfigEntryList< EntryType >( name, description, true ); entries.Append( currentEntry ); } template< typename EntryType > void addList( const char* name, const char* description, void addList( const tnlString& name, const tnlString& description, const EntryType& defaultValue ) { currentEntry = new tnlConfigEntryList< EntryType >( name, Loading @@ -103,13 +103,13 @@ class tnlConfigDescription ( ( tnlConfigEntry< tnlString >* ) currentEntry )->getEnumValues().Append( tnlString( entryEnum ) ); } void addDelimiter( const char* delimiter ) void addDelimiter( const tnlString& delimiter ) { entries.Append( new tnlConfigDelimiter( delimiter ) ); currentEntry = 0; } const tnlConfigEntryBase* getEntry( const char* name ) const const tnlConfigEntryBase* getEntry( const tnlString& name ) const { for( int i = 0; i < entries.getSize(); i++ ) if( entries[ i ]->name == name ) Loading @@ -122,7 +122,7 @@ class tnlConfigDescription //const tnlString getEntryType( const char* name ) const; //! Returns zero pointer if there is no default value template< class T > const T* getDefaultValue( const char* name ) const template< class T > const T* getDefaultValue( const tnlString& name ) const { int i; const int entries_num = entries. getSize(); Loading @@ -138,7 +138,7 @@ class tnlConfigDescription } //! Returns zero pointer if there is no default value template< class T > T* getDefaultValue( const char* name ) template< class T > T* getDefaultValue( const tnlString& name ) { int i; const int entries_num = entries. getSize(); Loading
src/config/tnlConfigEntry.h +4 −4 Original line number Diff line number Diff line Loading @@ -29,8 +29,8 @@ struct tnlConfigEntry : public tnlConfigEntryBase public: tnlConfigEntry( const char* name, const char* description, tnlConfigEntry( const tnlString& name, const tnlString& description, bool required ) : tnlConfigEntryBase( name, description, Loading @@ -39,8 +39,8 @@ struct tnlConfigEntry : public tnlConfigEntryBase hasDefaultValue = false; } tnlConfigEntry( const char* name, const char* description, tnlConfigEntry( const tnlString& name, const tnlString& description, bool required, const EntryType& defaultValue) : tnlConfigEntryBase( name, Loading
src/config/tnlConfigEntryBase.h +2 −2 Original line number Diff line number Diff line Loading @@ -28,8 +28,8 @@ struct tnlConfigEntryBase bool hasDefaultValue; tnlConfigEntryBase( const char* name, const char* description, tnlConfigEntryBase( const tnlString& name, const tnlString& description, bool required ) : name( name ), description( description ), Loading