Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Julia Docampo Sanchez
Nektar
Commits
ec3d866d
Commit
ec3d866d
authored
Jul 11, 2017
by
Kilian Lackhove
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adjusted InputPts to new FieldUtils structure
parent
08375931
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
45 deletions
+8
-45
library/FieldUtils/InputModules/InputPts.cpp
library/FieldUtils/InputModules/InputPts.cpp
+8
-45
No files found.
library/FieldUtils/InputModules/InputPts.cpp
View file @
ec3d866d
...
...
@@ -83,63 +83,26 @@ InputPts::~InputPts()
*/
void
InputPts
::
Process
(
po
::
variables_map
&
vm
)
{
if
(
m_f
->
m_verbose
)
{
if
(
m_f
->
m_comm
->
TreatAsRankZero
())
{
cout
<<
"Processing input pts file"
<<
endl
;
}
}
string
inFile
=
m_config
[
"infile"
].
as
<
string
>
();
string
ptsending
;
// Determine appropriate field input
if
(
m_f
->
m_inputfiles
.
count
(
"pts"
)
!=
0
)
{
ptsending
=
"pts"
;
LibUtilities
::
CsvIOSharedPtr
csvIO
=
MemoryManager
<
LibUtilities
::
CsvIO
>::
AllocateSharedPtr
(
m_f
->
m_comm
);
csvIO
->
Import
(
inFile
,
m_f
->
m_fieldPts
);
}
else
if
(
m_f
->
m_inputfiles
.
count
(
"csv"
)
!=
0
)
{
ptsending
=
"csv"
;
LibUtilities
::
PtsIOSharedPtr
ptsIO
=
MemoryManager
<
LibUtilities
::
PtsIO
>::
AllocateSharedPtr
(
m_f
->
m_comm
);
ptsIO
->
Import
(
inFile
,
m_f
->
m_fieldPts
);
}
else
{
ASSERTL0
(
false
,
"n
o
input file
found
"
);
ASSERTL0
(
false
,
"
unknow
n input file
type
"
);
}
string
inFile
=
m_config
[
"infile"
].
as
<
string
>
();
LibUtilities
::
PtsIOSharedPtr
ptsIO
;
if
(
m_f
->
m_session
)
{
if
(
!
ptsending
.
compare
(
"pts"
))
{
ptsIO
=
MemoryManager
<
LibUtilities
::
PtsIO
>::
AllocateSharedPtr
(
m_f
->
m_session
->
GetComm
());
}
else
{
ptsIO
=
MemoryManager
<
LibUtilities
::
CsvIO
>::
AllocateSharedPtr
(
m_f
->
m_session
->
GetComm
());
}
}
else
// serial communicator
{
LibUtilities
::
CommSharedPtr
c
=
LibUtilities
::
GetCommFactory
().
CreateInstance
(
"Serial"
,
0
,
0
);
if
(
!
ptsending
.
compare
(
"pts"
))
{
ptsIO
=
MemoryManager
<
LibUtilities
::
PtsIO
>::
AllocateSharedPtr
(
c
);
}
else
{
ptsIO
=
MemoryManager
<
LibUtilities
::
CsvIO
>::
AllocateSharedPtr
(
c
);
}
}
ptsIO
->
Import
(
inFile
,
m_f
->
m_fieldPts
);
// save field names
for
(
int
j
=
0
;
j
<
m_f
->
m_fieldPts
->
GetNFields
();
++
j
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment