Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
49a5af48
Commit
49a5af48
authored
Aug 09, 2017
by
Mark OLESEN
Browse files
Merge branch 'feature-robuster-ioobjectlist-construction' into 'develop'
Feature robuster IOobjectList construction See merge request
!134
parents
dafb232e
9923ec96
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/db/IOobjectList/IOobjectList.C
View file @
49a5af48
...
...
@@ -154,14 +154,14 @@ Foam::IOobjectList::IOobjectList
}
// Create a list of file names in this directory
fileNameList
objNames
=
const
auto
objNames
=
readDir
(
db
.
path
(
newInstance
,
db
.
dbDir
()
/
local
),
fileName
::
FILE
);
for
All
(
objNames
,
i
)
for
(
const
auto
&
objName
:
objNames
)
{
IOobject
*
objectPtr
=
new
IOobject
(
objName
s
[
i
]
,
objName
,
newInstance
,
local
,
db
,
...
...
@@ -170,8 +170,23 @@ Foam::IOobjectList::IOobjectList
registerObject
);
// Use object with local scope
if
(
objectPtr
->
typeHeaderOk
<
IOList
<
label
>>
(
false
))
bool
ok
=
false
;
const
bool
throwingIOerr
=
FatalIOError
.
throwExceptions
();
try
{
// Use object with local scope and current instance (no searching)
ok
=
objectPtr
->
typeHeaderOk
<
IOList
<
label
>>
(
false
,
false
);
}
catch
(
Foam
::
IOerror
&
err
)
{
Warning
<<
err
<<
nl
<<
endl
;
}
FatalIOError
.
throwExceptions
(
throwingIOerr
);
if
(
ok
)
{
insert
(
objectPtr
->
name
(),
objectPtr
);
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment