View Issue Details

IDProjectCategoryView StatusLast Update
0003785OpenFOAMContributionpublic2022-01-17 11:59
Reportercgoessni Assigned Tohenry  
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionno change required 
PlatformUnixOSOtherOS Version(please specify)
Product Versiondev 
Summary0003785: move initialisiation of topoChanger, distributor and mover in fvMesh down
DescriptionI want to be able to access the fully initialised fvMesh inside the constructor of the fvMover. With the current design of the fvMesh constructor, that is not possible. However, a simple delay of the inititialisation makes it possible, see attached patch. Would that be acceptable for the OF project?
TagsNo tags attached.

Activities

cgoessni

2022-01-17 11:47

reporter  

diff_fvMesh.C.txt (1,205 bytes)   
--- src/finiteVolume/fvMesh/fvMesh.C	2022-01-17 12:42:52.162492195 +0100
+++ src/finiteVolume/fvMesh/fvMesh.C.new	2022-01-17 12:42:47.585614802 +0100
@@ -264,24 +264,9 @@
     fvSolution(static_cast<const objectRegistry&>(*this)),
     data(static_cast<const objectRegistry&>(*this)),
     boundary_(*this, boundaryMesh()),
-    topoChanger_
-    (
-        changers
-      ? fvMeshTopoChanger::New(*this)
-      : autoPtr<fvMeshTopoChanger>(nullptr)
-    ),
-    distributor_
-    (
-        changers
-      ? fvMeshDistributor::New(*this)
-      : autoPtr<fvMeshDistributor>(nullptr)
-    ),
-    mover_
-    (
-        changers
-      ? fvMeshMover::New(*this)
-      : autoPtr<fvMeshMover>(nullptr)
-    ),
+    topoChanger_(autoPtr<fvMeshTopoChanger>(nullptr)),
+    distributor_(autoPtr<fvMeshDistributor>(nullptr)),
+    mover_(autoPtr<fvMeshMover>(nullptr)),
     lduPtr_(nullptr),
     curTimeIndex_(time().timeIndex()),
     VPtr_(nullptr),
@@ -336,6 +321,13 @@
             *this
         );
     }
+
+    if (changers)
+    {
+        topoChanger_ = fvMeshTopoChanger::New(*this);
+        distributor_ = fvMeshDistributor::New(*this);
+        mover_ = fvMeshMover::New(*this);
+    }
 }
 
 
diff_fvMesh.C.txt (1,205 bytes)   

henry

2022-01-17 11:59

manager   ~0012414

This part of the code is under active development and the details of the design and implementation may change. If you want to get involved in this work so that it suits your purpose better please contact CFD Direct.

Issue History

Date Modified Username Field Change
2022-01-17 11:47 cgoessni New Issue
2022-01-17 11:47 cgoessni File Added: diff_fvMesh.C.txt
2022-01-17 11:59 henry Note Added: 0012414
2022-01-17 11:59 henry Assigned To => henry
2022-01-17 11:59 henry Status new => closed
2022-01-17 11:59 henry Resolution open => no change required