Skip to content
Snippets Groups Projects
Commit 70372c2e authored by Jakub Klinkovský's avatar Jakub Klinkovský Committed by Tomáš Oberhuber
Browse files

Removed deprecated type names from tnl-view and tnl-diff

parent c9288854
No related branches found
No related tags found
1 merge request!29Revision
......@@ -434,11 +434,9 @@ bool computeDifferenceOfVectors( const MeshPointer& meshPointer, const Config::P
template< typename MeshPointer, typename Value, typename Real, typename Index >
bool computeDifference( const MeshPointer& meshPointer, const String& objectType, const Config::ParameterContainer& parameters )
{
if( objectType == "Functions::MeshFunction" ||
objectType == "tnlMeshFunction" ) // TODO: remove deprecated type name
if( objectType == "Functions::MeshFunction" )
return computeDifferenceOfMeshFunctions< MeshPointer, Value, Real, Index >( meshPointer, parameters );
if( objectType == "Containers::Vector" ||
objectType == "tnlVector" || objectType == "tnlSharedVector" ) // TODO: remove deprecated type name
if( objectType == "Containers::Vector" )
return computeDifferenceOfVectors< MeshPointer, Value, Real, Index >( meshPointer, parameters );
std::cerr << "Unknown object type " << objectType << "." << std::endl;
return false;
......@@ -452,15 +450,12 @@ bool setIndexType( const MeshPointer& meshPointer,
const Config::ParameterContainer& parameters )
{
String indexType;
if( parsedObjectType[ 0 ] == "Containers::Vector" ||
parsedObjectType[ 0 ] == "tnlSharedVector" || // TODO: remove deprecated type names
parsedObjectType[ 0 ] == "tnlVector" ) //
if( parsedObjectType[ 0 ] == "Containers::Vector" )
indexType = parsedObjectType[ 3 ];
if( parsedObjectType[ 0 ] == "Functions::MeshFunction" ||
parsedObjectType[ 0 ] == "tnlMeshFunction" ) // TODO: remove deprecated type names
if( parsedObjectType[ 0 ] == "Functions::MeshFunction" )
return computeDifference< MeshPointer, Value, Real, typename MeshPointer::ObjectType::IndexType >( meshPointer, parsedObjectType[ 0 ], parameters );
if( indexType == "int" )
return computeDifference< MeshPointer, Value, Real, int >( meshPointer, parsedObjectType[ 0 ], parameters );
if( indexType == "long-int" )
......@@ -528,12 +523,9 @@ bool setValueType( const MeshPointer& meshPointer,
{
String elementType;
if( parsedObjectType[ 0 ] == "Functions::MeshFunction" ||
parsedObjectType[ 0 ] == "tnlMeshFunction" ) // TODO: remove deprecated type names
if( parsedObjectType[ 0 ] == "Functions::MeshFunction" )
elementType = parsedObjectType[ 3 ];
if( parsedObjectType[ 0 ] == "Containers::Vector" ||
parsedObjectType[ 0 ] == "tnlSharedVector" || // TODO: remove deprecated type names
parsedObjectType[ 0 ] == "tnlVector" ) //
if( parsedObjectType[ 0 ] == "Containers::Vector" )
elementType = parsedObjectType[ 1 ];
......
......@@ -250,9 +250,7 @@ bool convertObject( const MeshPointer& meshPointer,
std::cout << " writing to " << outputFileName << " ... " << std::flush;
if( parsedObjectType[ 0 ] == "Containers::Vector" ||
parsedObjectType[ 0 ] == "tnlSharedVector" || // TODO: remove deprecated type names
parsedObjectType[ 0 ] == "tnlVector" ) //
if( parsedObjectType[ 0 ] == "Containers::Vector" )
{
using MeshType = typename MeshPointer::ObjectType;
// FIXME: why is MeshType::GlobalIndexType not the same as Index?
......@@ -273,9 +271,7 @@ bool setDimension( const MeshPointer& meshPointer,
const Config::ParameterContainer& parameters )
{
int dimensions( 0 );
if( parsedObjectType[ 0 ] == "Containers::Vector" ||
parsedObjectType[ 0 ] == "tnlVector" || // TODO: remove deprecated type names
parsedObjectType[ 0 ] == "tnlSharedVector" ) //
if( parsedObjectType[ 0 ] == "Containers::Vector" )
dimensions = 1;
switch( dimensions )
{
......@@ -297,9 +293,7 @@ bool setIndexType( const MeshPointer& meshPointer,
const Config::ParameterContainer& parameters )
{
String indexType;
if( parsedObjectType[ 0 ] == "Containers::Vector" ||
parsedObjectType[ 0 ] == "tnlSharedVector" || // TODO: remove deprecated type names
parsedObjectType[ 0 ] == "tnlVector" ) //
if( parsedObjectType[ 0 ] == "Containers::Vector" )
indexType = parsedObjectType[ 3 ];
if( indexType == "int" )
......@@ -370,9 +364,7 @@ bool setValueType( const MeshPointer& meshPointer,
String elementType;
// TODO: Fix this even for arrays
if( parsedObjectType[ 0 ] == "Containers::Vector" ||
parsedObjectType[ 0 ] == "tnlSharedVector" || // TODO: remove deprecated type names
parsedObjectType[ 0 ] == "tnlVector" ) //
if( parsedObjectType[ 0 ] == "Containers::Vector" )
elementType = parsedObjectType[ 1 ];
if( elementType == "float" )
......@@ -394,8 +386,7 @@ bool setValueType( const MeshPointer& meshPointer,
std::cerr << "Unable to parse object type " << elementType << "." << std::endl;
return false;
}
if( parsedValueType[ 0 ] == "Containers::StaticVector" ||
parsedValueType[ 0 ] == "Containers::StaticVector" ) // TODO: remove deprecated type names
if( parsedValueType[ 0 ] == "Containers::StaticVector" )
return setTupleType< MeshPointer >( meshPointer, inputFileName, parsedObjectType, parsedValueType, parameters );
std::cerr << "Unknown element type " << elementType << "." << std::endl;
......@@ -468,12 +459,9 @@ struct FilesProcessor
error = true;
continue;
}
if( parsedObjectType[ 0 ] == "Containers::Vector" ||
parsedObjectType[ 0 ] == "tnlSharedVector" || // TODO: remove deprecated type names
parsedObjectType[ 0 ] == "tnlVector" ) //
if( parsedObjectType[ 0 ] == "Containers::Vector" )
setValueType< MeshPointer >( meshPointer, inputFiles[ i ], parsedObjectType, parameters );
if( parsedObjectType[ 0 ] == "Functions::MeshFunction" ||
parsedObjectType[ 0 ] == "tnlMeshFunction" ) // TODO: remove deprecated type names
if( parsedObjectType[ 0 ] == "Functions::MeshFunction" )
setMeshFunction< MeshPointer >( meshPointer, inputFiles[ i ], parsedObjectType, parameters );
if( parsedObjectType[ 0 ] == "Functions::VectorField" )
setVectorFieldSize< MeshPointer >( meshPointer, inputFiles[ i ], parsedObjectType, parameters );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment