Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openfoam
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
openfoam
Commits
8f15184b
Commit
8f15184b
authored
14 years ago
by
mattijs
Browse files
Options
Downloads
Patches
Plain Diff
ENH: redistributeMeshPar : make it work with master-reading of dictionaries
parent
9afbd680
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
applications/utilities/parallelProcessing/redistributeMeshPar/redistributeMeshPar.C
+44
-20
44 additions, 20 deletions
...allelProcessing/redistributeMeshPar/redistributeMeshPar.C
with
44 additions
and
20 deletions
applications/utilities/parallelProcessing/redistributeMeshPar/redistributeMeshPar.C
+
44
−
20
View file @
8f15184b
...
@@ -86,33 +86,55 @@ autoPtr<fvMesh> createMesh
...
@@ -86,33 +86,55 @@ autoPtr<fvMesh> createMesh
if
(
!
haveMesh
)
if
(
!
haveMesh
)
{
{
// Create dummy mesh. Only used on procs that don't have mesh.
// Create dummy mesh. Only used on procs that don't have mesh.
// WIP: how to avoid parallel comms when loading IOdictionaries?
// For now just give error message.
// Switch timeStamp checking to one which does not do any
if
// parallel sync
(
regIOobject
::
fileCheckTypes
oldCheckType
=
regIOobject
::
fileModificationChecking
regIOobject
::
fileModificationChecking
;
==
regIOobject
::
timeStampMaster
regIOobject
::
fileModificationChecking
=
regIOobject
::
timeStamp
;
||
regIOobject
::
fileModificationChecking
==
regIOobject
::
inotifyMaster
)
{
{
FatalErrorIn
(
"createMesh(..)"
)
IOdictionary
fvSolution
<<
"Cannot use 'fileModificationChecking' mode "
(
<<
regIOobject
::
fileCheckTypesNames
IOobject
[
(
regIOobject
::
fileModificationChecking
"fvSolution"
,
]
runTime
.
system
(),
<<
" since this uses parallel communication."
runTime
,
<<
exit
(
FatalError
);
IOobject
::
NO_READ
,
IOobject
::
NO_WRITE
)
);
Pout
<<
"Writing dummy "
<<
fvSolution
.
objectPath
()
<<
endl
;
fvSolution
.
regIOobject
::
write
();
}
{
IOdictionary
fvSchemes
(
IOobject
(
"fvSchemes"
,
runTime
.
system
(),
runTime
,
IOobject
::
NO_READ
,
IOobject
::
NO_WRITE
)
);
fvSchemes
.
add
(
"divSchemes"
,
dictionary
());
fvSchemes
.
add
(
"gradSchemes"
,
dictionary
());
fvSchemes
.
add
(
"laplacianSchemes"
,
dictionary
());
Pout
<<
"Writing dummy "
<<
fvSchemes
.
objectPath
()
<<
endl
;
fvSchemes
.
regIOobject
::
write
();
}
}
Pout
<<
"Creating dummy mesh from "
<<
io
.
objectPath
()
<<
endl
;
fvMesh
dummyMesh
fvMesh
dummyMesh
(
(
IOobject
IOobject
(
(
regionN
ame
,
io
.
n
ame
()
,
i
nstDir
,
i
o
.
instance
()
,
runTime
,
io
.
db
()
,
IOobject
::
NO_READ
IOobject
::
NO_READ
),
),
xferCopy
(
pointField
()),
xferCopy
(
pointField
()),
...
@@ -124,6 +146,8 @@ autoPtr<fvMesh> createMesh
...
@@ -124,6 +146,8 @@ autoPtr<fvMesh> createMesh
Pout
<<
"Writing dummy mesh to "
<<
dummyMesh
.
polyMesh
::
objectPath
()
Pout
<<
"Writing dummy mesh to "
<<
dummyMesh
.
polyMesh
::
objectPath
()
<<
endl
;
<<
endl
;
dummyMesh
.
write
();
dummyMesh
.
write
();
regIOobject
::
fileModificationChecking
=
oldCheckType
;
}
}
Pout
<<
"Reading mesh from "
<<
io
.
objectPath
()
<<
endl
;
Pout
<<
"Reading mesh from "
<<
io
.
objectPath
()
<<
endl
;
...
...
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