Loading src/functions/tnlMeshFunction.h +8 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,14 @@ class tnlMeshFunction : Vector& data, const IndexType& offset = 0 ); static tnlString getType(); tnlString getTypeVirtual() const; static tnlString getSerializationType(); virtual tnlString getSerializationTypeVirtual() const; static void configSetup( tnlConfigDescription& config, const tnlString& prefix = "" ); Loading src/functions/tnlMeshFunction_impl.h +54 −6 Original line number Diff line number Diff line Loading @@ -55,6 +55,54 @@ tnlMeshFunction( const MeshType& mesh, this->bind( mesh, data, offset ); } template< typename Mesh, int MeshEntityDimensions, typename Real > tnlString tnlMeshFunction< Mesh, MeshEntityDimensions, Real >:: getType() { return tnlString( "tnlMeshFunction< " ) + Mesh::getType() + ", " + tnlString( MeshEntityDimensions ) + ", " + ::getType< Real >() + " >"; }; template< typename Mesh, int MeshEntityDimensions, typename Real > tnlString tnlMeshFunction< Mesh, MeshEntityDimensions, Real >:: getTypeVirtual() const { return this->getType(); }; template< typename Mesh, int MeshEntityDimensions, typename Real > tnlString tnlMeshFunction< Mesh, MeshEntityDimensions, Real >:: getSerializationType() { return tnlString( "tnlMeshFunction< " ) + Mesh::getSerializationType() + ", " + tnlString( MeshEntityDimensions ) + ", " + ::getType< Real >() + " >"; }; template< typename Mesh, int MeshEntityDimensions, typename Real > tnlString tnlMeshFunction< Mesh, MeshEntityDimensions, Real >:: getSerializationTypeVirtual() const { return this->getSerializationType(); }; template< typename Mesh, int MeshEntityDimensions, typename Real > Loading Loading @@ -275,8 +323,8 @@ bool tnlMeshFunction< Mesh, MeshEntityDimensions, Real >:: save( tnlFile& file ) const { //if( ! tnlObject::save( file ) ) // return false; if( ! tnlObject::save( file ) ) return false; return this->data.save( file ); } Loading @@ -287,8 +335,8 @@ bool tnlMeshFunction< Mesh, MeshEntityDimensions, Real >:: load( tnlFile& file ) { //if( ! tnlObject::load( file ) ) // return false; if( ! tnlObject::load( file ) ) return false; return this->data.load( file ); } Loading @@ -299,8 +347,8 @@ bool tnlMeshFunction< Mesh, MeshEntityDimensions, Real >:: boundLoad( tnlFile& file ) { //if( ! tnlObject::load( file ) ) // return false; if( ! tnlObject::load( file ) ) return false; return this->data.boundLoad( file ); } Loading src/mesh/grids/tnlNeighbourGridEntityGetter3D_impl.h +16 −13 Original line number Diff line number Diff line Loading @@ -645,33 +645,36 @@ class tnlNeighbourGridEntityGetter< __cuda_callable__ inline NeighbourGridEntityType getEntity() const { tnlAssert( ( ( !! stepX ) == ( !! entity.getOrientation().x() ) ) && /*tnlAssert( ( ( !! stepX ) == ( !! entity.getOrientation().x() ) ) && ( ( !! stepY ) == ( !! entity.getOrientation().y() ) ) && ( ( !! stepZ ) == ( !! entity.getOrientation().z() ) ), cerr << "( stepX, stepY, stepZ ) cannot be perpendicular to entity coordinates: stepX = " << stepX << " stepY = " << stepY << " stepZ = " << stepZ << " entity.getOrientation() = " << entity.getOrientation() ); << " entity.getOrientation() = " << entity.getOrientation() );*/ tnlAssert( entity.getCoordinates() >= CoordinatesType( 0, 0, 0 ) && entity.getCoordinates() < entity.getMesh().getDimensions() + entity.getOrientation(), cerr << "entity.getCoordinates() = " << entity.getCoordinates() << " entity.getMesh().getDimensions() + entity.getOrientation() = " << entity.getMesh().getDimensions() + entity.getOrientation() << " EntityDimensions = " << EntityDimensions ); tnlAssert( entity.getCoordinates() + CoordinatesType( stepX - ( stepX > 0 ), stepY - ( stepY > 0 ), stepZ - ( stepZ > 0 ) ) >= CoordinatesType( 0, 0, 0 ) && CoordinatesType( stepX - ( stepX > 0 ) * ( entity.getOrientation().x() != 0.0 ), stepY - ( stepY > 0 ) * ( entity.getOrientation().y() != 0.0 ), stepZ - ( stepZ > 0 ) * ( entity.getOrientation().z() != 0.0 ) ) >= CoordinatesType( 0, 0, 0 ) && entity.getCoordinates() + CoordinatesType( stepX - ( stepX > 0 ), stepY - ( stepY > 0 ), stepZ - ( stepZ > 0 ) ) < entity.getMesh().getDimensions(), cerr << "entity.getCoordinates() + CoordinatesType( stepX + ( stepX < 0 ), stepY + ( stepY < 0 ), stepZ + ( stepZ < 0 ) ) = " << entity.getCoordinates() + CoordinatesType( stepX + ( stepX < 0 ), stepY + ( stepY < 0 ), stepZ + ( stepZ < 0 ) ) CoordinatesType( stepX - ( stepX > 0 ) * ( entity.getOrientation().x() != 0.0 ), stepY - ( stepY > 0 ) * ( entity.getOrientation().y() != 0.0 ), stepZ - ( stepZ > 0 ) * ( entity.getOrientation().z() != 0.0 ) ) < entity.getMesh().getDimensions(), cerr << "entity.getCoordinates() + CoordinatesType( stepX + ( stepX < 0 ) * ( entity.getOrientation().x() != 0.0 ), stepY + ( stepY < 0 ) * ( entity.getOrientation().y() != 0.0 ), stepZ + ( stepZ < 0 ) * ( entity.getOrientation().z() != 0.0 ) ) = " << entity.getCoordinates() + CoordinatesType( stepX + ( stepX < 0 ) * ( entity.getOrientation().x() != 0.0 ), stepY + ( stepY < 0 ) * ( entity.getOrientation().y() != 0.0 ), stepZ + ( stepZ < 0 ) * ( entity.getOrientation().z() != 0.0 ) ) << " entity.getMesh().getDimensions() = " << entity.getMesh().getDimensions() << " EntityDimensions = " << EntityDimensions ); return NeighbourGridEntityType( entity.getMesh(), CoordinatesType( entity.getCoordinates().x() + stepX - ( stepX > 0 ), entity.getCoordinates().y() + stepY - ( stepY > 0 ), entity.getCoordinates().z() + stepZ - ( stepZ > 0 ) ) ); CoordinatesType( entity.getCoordinates().x() + stepX - ( stepX > 0 ) * ( entity.getOrientation().x() != 0.0 ), entity.getCoordinates().y() + stepY - ( stepY > 0 ) * ( entity.getOrientation().y() != 0.0 ), entity.getCoordinates().z() + stepZ - ( stepZ > 0 ) * ( entity.getOrientation().z() != 0.0 ) ) ); } template< int stepX, int stepY, int stepZ > Loading tests/unit-tests/operators/geometric/tnlCoFVMGradientNormTest.h +4 −4 Original line number Diff line number Diff line Loading @@ -36,13 +36,13 @@ class tnlPDEOperatorEocTestResult< { public: static Real getL1Eoc() { return ( Real ) 0.0; }; static Real getL1Tolerance() { return ( Real ) 0.05; }; static Real getL1Tolerance() { return ( Real ) 1.05; }; static Real getL2Eoc() { return ( Real ) 0.5; }; static Real getL2Tolerance() { return ( Real ) 0.05; }; static Real getL2Tolerance() { return ( Real ) 1.05; }; static Real getMaxEoc() { return ( Real ) 1.0; }; static Real getMaxTolerance() { return ( Real ) 0.05; }; static Real getMaxTolerance() { return ( Real ) 1.05; }; }; Loading Loading @@ -109,7 +109,7 @@ bool setGrid() int main( int argc, char* argv[] ) { const int meshSize( 32 ); const bool writeFunctions( false ); const bool writeFunctions( true ); const bool verbose( true ); #ifdef HAVE_CPPUNIT return setGrid< tnlHost, meshSize, writeFunctions, verbose >(); Loading tools/src/tnl-view.cpp +0 −6 Original line number Diff line number Diff line Loading @@ -24,12 +24,6 @@ #include <mesh/tnlDummyMesh.h> #include <mesh/tnlGrid.h> // TODO: Remove /*#include <mesh/tnlMesh.h> #include <mesh/tnlMeshWriterNetgen.h> #include <mesh/config/tnlMeshConfigBase.h> #include <mesh/topologies/tnlMeshTriangleTopology.h>*/ void setupConfig( tnlConfigDescription& config ) { config.addDelimiter ( "General settings:" ); Loading Loading
src/functions/tnlMeshFunction.h +8 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,14 @@ class tnlMeshFunction : Vector& data, const IndexType& offset = 0 ); static tnlString getType(); tnlString getTypeVirtual() const; static tnlString getSerializationType(); virtual tnlString getSerializationTypeVirtual() const; static void configSetup( tnlConfigDescription& config, const tnlString& prefix = "" ); Loading
src/functions/tnlMeshFunction_impl.h +54 −6 Original line number Diff line number Diff line Loading @@ -55,6 +55,54 @@ tnlMeshFunction( const MeshType& mesh, this->bind( mesh, data, offset ); } template< typename Mesh, int MeshEntityDimensions, typename Real > tnlString tnlMeshFunction< Mesh, MeshEntityDimensions, Real >:: getType() { return tnlString( "tnlMeshFunction< " ) + Mesh::getType() + ", " + tnlString( MeshEntityDimensions ) + ", " + ::getType< Real >() + " >"; }; template< typename Mesh, int MeshEntityDimensions, typename Real > tnlString tnlMeshFunction< Mesh, MeshEntityDimensions, Real >:: getTypeVirtual() const { return this->getType(); }; template< typename Mesh, int MeshEntityDimensions, typename Real > tnlString tnlMeshFunction< Mesh, MeshEntityDimensions, Real >:: getSerializationType() { return tnlString( "tnlMeshFunction< " ) + Mesh::getSerializationType() + ", " + tnlString( MeshEntityDimensions ) + ", " + ::getType< Real >() + " >"; }; template< typename Mesh, int MeshEntityDimensions, typename Real > tnlString tnlMeshFunction< Mesh, MeshEntityDimensions, Real >:: getSerializationTypeVirtual() const { return this->getSerializationType(); }; template< typename Mesh, int MeshEntityDimensions, typename Real > Loading Loading @@ -275,8 +323,8 @@ bool tnlMeshFunction< Mesh, MeshEntityDimensions, Real >:: save( tnlFile& file ) const { //if( ! tnlObject::save( file ) ) // return false; if( ! tnlObject::save( file ) ) return false; return this->data.save( file ); } Loading @@ -287,8 +335,8 @@ bool tnlMeshFunction< Mesh, MeshEntityDimensions, Real >:: load( tnlFile& file ) { //if( ! tnlObject::load( file ) ) // return false; if( ! tnlObject::load( file ) ) return false; return this->data.load( file ); } Loading @@ -299,8 +347,8 @@ bool tnlMeshFunction< Mesh, MeshEntityDimensions, Real >:: boundLoad( tnlFile& file ) { //if( ! tnlObject::load( file ) ) // return false; if( ! tnlObject::load( file ) ) return false; return this->data.boundLoad( file ); } Loading
src/mesh/grids/tnlNeighbourGridEntityGetter3D_impl.h +16 −13 Original line number Diff line number Diff line Loading @@ -645,33 +645,36 @@ class tnlNeighbourGridEntityGetter< __cuda_callable__ inline NeighbourGridEntityType getEntity() const { tnlAssert( ( ( !! stepX ) == ( !! entity.getOrientation().x() ) ) && /*tnlAssert( ( ( !! stepX ) == ( !! entity.getOrientation().x() ) ) && ( ( !! stepY ) == ( !! entity.getOrientation().y() ) ) && ( ( !! stepZ ) == ( !! entity.getOrientation().z() ) ), cerr << "( stepX, stepY, stepZ ) cannot be perpendicular to entity coordinates: stepX = " << stepX << " stepY = " << stepY << " stepZ = " << stepZ << " entity.getOrientation() = " << entity.getOrientation() ); << " entity.getOrientation() = " << entity.getOrientation() );*/ tnlAssert( entity.getCoordinates() >= CoordinatesType( 0, 0, 0 ) && entity.getCoordinates() < entity.getMesh().getDimensions() + entity.getOrientation(), cerr << "entity.getCoordinates() = " << entity.getCoordinates() << " entity.getMesh().getDimensions() + entity.getOrientation() = " << entity.getMesh().getDimensions() + entity.getOrientation() << " EntityDimensions = " << EntityDimensions ); tnlAssert( entity.getCoordinates() + CoordinatesType( stepX - ( stepX > 0 ), stepY - ( stepY > 0 ), stepZ - ( stepZ > 0 ) ) >= CoordinatesType( 0, 0, 0 ) && CoordinatesType( stepX - ( stepX > 0 ) * ( entity.getOrientation().x() != 0.0 ), stepY - ( stepY > 0 ) * ( entity.getOrientation().y() != 0.0 ), stepZ - ( stepZ > 0 ) * ( entity.getOrientation().z() != 0.0 ) ) >= CoordinatesType( 0, 0, 0 ) && entity.getCoordinates() + CoordinatesType( stepX - ( stepX > 0 ), stepY - ( stepY > 0 ), stepZ - ( stepZ > 0 ) ) < entity.getMesh().getDimensions(), cerr << "entity.getCoordinates() + CoordinatesType( stepX + ( stepX < 0 ), stepY + ( stepY < 0 ), stepZ + ( stepZ < 0 ) ) = " << entity.getCoordinates() + CoordinatesType( stepX + ( stepX < 0 ), stepY + ( stepY < 0 ), stepZ + ( stepZ < 0 ) ) CoordinatesType( stepX - ( stepX > 0 ) * ( entity.getOrientation().x() != 0.0 ), stepY - ( stepY > 0 ) * ( entity.getOrientation().y() != 0.0 ), stepZ - ( stepZ > 0 ) * ( entity.getOrientation().z() != 0.0 ) ) < entity.getMesh().getDimensions(), cerr << "entity.getCoordinates() + CoordinatesType( stepX + ( stepX < 0 ) * ( entity.getOrientation().x() != 0.0 ), stepY + ( stepY < 0 ) * ( entity.getOrientation().y() != 0.0 ), stepZ + ( stepZ < 0 ) * ( entity.getOrientation().z() != 0.0 ) ) = " << entity.getCoordinates() + CoordinatesType( stepX + ( stepX < 0 ) * ( entity.getOrientation().x() != 0.0 ), stepY + ( stepY < 0 ) * ( entity.getOrientation().y() != 0.0 ), stepZ + ( stepZ < 0 ) * ( entity.getOrientation().z() != 0.0 ) ) << " entity.getMesh().getDimensions() = " << entity.getMesh().getDimensions() << " EntityDimensions = " << EntityDimensions ); return NeighbourGridEntityType( entity.getMesh(), CoordinatesType( entity.getCoordinates().x() + stepX - ( stepX > 0 ), entity.getCoordinates().y() + stepY - ( stepY > 0 ), entity.getCoordinates().z() + stepZ - ( stepZ > 0 ) ) ); CoordinatesType( entity.getCoordinates().x() + stepX - ( stepX > 0 ) * ( entity.getOrientation().x() != 0.0 ), entity.getCoordinates().y() + stepY - ( stepY > 0 ) * ( entity.getOrientation().y() != 0.0 ), entity.getCoordinates().z() + stepZ - ( stepZ > 0 ) * ( entity.getOrientation().z() != 0.0 ) ) ); } template< int stepX, int stepY, int stepZ > Loading
tests/unit-tests/operators/geometric/tnlCoFVMGradientNormTest.h +4 −4 Original line number Diff line number Diff line Loading @@ -36,13 +36,13 @@ class tnlPDEOperatorEocTestResult< { public: static Real getL1Eoc() { return ( Real ) 0.0; }; static Real getL1Tolerance() { return ( Real ) 0.05; }; static Real getL1Tolerance() { return ( Real ) 1.05; }; static Real getL2Eoc() { return ( Real ) 0.5; }; static Real getL2Tolerance() { return ( Real ) 0.05; }; static Real getL2Tolerance() { return ( Real ) 1.05; }; static Real getMaxEoc() { return ( Real ) 1.0; }; static Real getMaxTolerance() { return ( Real ) 0.05; }; static Real getMaxTolerance() { return ( Real ) 1.05; }; }; Loading Loading @@ -109,7 +109,7 @@ bool setGrid() int main( int argc, char* argv[] ) { const int meshSize( 32 ); const bool writeFunctions( false ); const bool writeFunctions( true ); const bool verbose( true ); #ifdef HAVE_CPPUNIT return setGrid< tnlHost, meshSize, writeFunctions, verbose >(); Loading
tools/src/tnl-view.cpp +0 −6 Original line number Diff line number Diff line Loading @@ -24,12 +24,6 @@ #include <mesh/tnlDummyMesh.h> #include <mesh/tnlGrid.h> // TODO: Remove /*#include <mesh/tnlMesh.h> #include <mesh/tnlMeshWriterNetgen.h> #include <mesh/config/tnlMeshConfigBase.h> #include <mesh/topologies/tnlMeshTriangleTopology.h>*/ void setupConfig( tnlConfigDescription& config ) { config.addDelimiter ( "General settings:" ); Loading