CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Object registry problem (https://www.cfd-online.com/Forums/openfoam-solving/140661-object-registry-problem.html)

hchen August 20, 2014 10:03

Object registry problem
 
Hi,

I want to define a boundary condition for a subset mesh motion.

I collect the boundary points by:
Code:

        pointVectorField& PointDisplacement =  const_cast<pointVectorField&>
            (
            subset1Mesh_.subMesh().objectRegistry::lookupObject<pointVectorField>
            (
            "pointDisplacement"
            )
            );

            pointField & subset1Boundary  =  refCast<pointField>(PointDisplacement.boundaryField()[patchIndex]);

where subset1Mesh is the subset-Mesh region that I want to move.

when I run the case, the error shows that:


Code:

    --> FOAM FATAL ERROR:
     
          request for pointVectorField pointDisplacement from object Registry motionSubset failed
          available objects of type pointVectorField are
     
      0
      (
      )
     
          From function objectRegistry::lookupObject<Type>(const      word&) const
          in file      /home/hchen/foam/foam-extend-3.1/src/foam/lnInclude/objectRegistryTemplates.C      at line 139.
     
      FOAM aborting

I suspect that is due to something like the hierarchy of the object registry.It can not find the file pointDisplacement in the sub-directory motionSubset under the main directory 0.There might be something wrong withsubset1Mesh_.subMesh()....

Anybody could help me? Thanks very much!

Best regards
Hao

hchen August 21, 2014 05:31

Hi,

I solve that problem..

The file Pointlaplacian dissappeared...just add it and it is ok.


All times are GMT -4. The time now is 05:29.