MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / write

Function write

src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C:2566–2595  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2564
2565
2566bool Foam::meshRefinement::write() const
2567{
2568 bool writeOk = mesh_.write();
2569
2570 // Make sure that any distributed surfaces (so ones which probably have
2571 // been changed) get written as well.
2572 // Note: should ideally have some 'modified' flag to say whether it
2573 // has been changed or not.
2574 searchableSurfaces& geometry =
2575 const_cast<searchableSurfaces&>(surfaces_.geometry());
2576
2577 forAll(geometry, i)
2578 {
2579 searchableSurface& s = geometry[i];
2580
2581 // Check if instance() of surface is not constant or system.
2582 // Is good hint that surface is distributed.
2583 if
2584 (
2585 s.instance() != s.time().system()
2586 && s.instance() != s.time().caseSystem()
2587 && s.instance() != s.time().constant()
2588 && s.instance() != s.time().caseConstant()
2589 )
2590 {
2591 // Make sure it gets written to current time, not constant.
2592 s.instance() = s.time().timeName();
2593 writeOk = writeOk && s.write();
2594 }
2595 }
2596
2597 return writeOk;
2598}

Callers 6

handleSnapProblemsFunction · 0.70
baffleAndSplitMeshFunction · 0.70

Calls 4

dumpIntersectionsFunction · 0.85
timeMethod · 0.80
writeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected