Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tnl-dev
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
TNL
tnl-dev
Commits
70372c2e
There was an error fetching the commit references. Please try again later.
Commit
70372c2e
authored
6 years ago
by
Jakub Klinkovský
Committed by
Tomáš Oberhuber
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Removed deprecated type names from tnl-view and tnl-diff
parent
c9288854
No related branches found
No related tags found
1 merge request
!29
Revision
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Tools/tnl-diff.h
+7
-15
7 additions, 15 deletions
src/Tools/tnl-diff.h
src/Tools/tnl-view.h
+7
-19
7 additions, 19 deletions
src/Tools/tnl-view.h
with
14 additions
and
34 deletions
src/Tools/tnl-diff.h
+
7
−
15
View file @
70372c2e
...
...
@@ -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
];
...
...
This diff is collapsed.
Click to expand it.
src/Tools/tnl-view.h
+
7
−
19
View file @
70372c2e
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment