|
[Sponsors] |
July 26, 2013, 09:04 |
New.C
|
#1 |
New Member
klemen
Join Date: Aug 2012
Location: Slovenia
Posts: 26
Rep Power: 13 |
Hello everybody,
I am looking at source code of the engineMesh class utility, and i noticed that there is also the engineMeshNew.C - I am not sure what is its purpose. I would like to undestand how the moveEngineMesh utility works. I ran it in debug mode and i noticesd it calls some functions within engineMeshNew.C. But when i checked the source, i could not find any #include "engineMeshNew.C" instruction. Can someone please explain to me how did this engineMeshNew.C get into the compiled code? What is this "Foam::autoPtr<Foam::engineMesh > New"? Regards Klemen |
|
July 26, 2013, 17:53 |
|
#2 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
Have a look at the Make/files for the engine library, and you see that enginypeyMeshNew.C is compiled. engineMeshNew.C contains the run time construction mechanism, which allows the the engine mesh type to be specified at run time rather than at compilation of the library/solver. In the engineFoam solver, you will see that createEngineMesh.C is included, which is in the lnInclude folder. There, it calls the constructor defined in engineMeshNew.C. Hope this clears it up.
|
|
July 29, 2013, 08:29 |
|
#3 |
New Member
klemen
Join Date: Aug 2012
Location: Slovenia
Posts: 26
Rep Power: 13 |
Ok, i see, thank you.
Now i tried to compile the source inside the engine folder, to test how it goes, because this is what i will also have to do when i will try to compile my own code. I ran wclan and wmake, but it does not compile the code. Some files are missing (see below). BTW, I already successfully compiled the whole source using Allwmake. Why can't i compile just one part of the code. Should i look for all the missing files and include them in Make/options? klemen@klemen-VirtualBox:~/OpenFOAM/OpenFOAM-2.2.0/src/engine$ wclean klemen@klemen-VirtualBox:~/OpenFOAM/OpenFOAM-2.2.0/src/engine$ wmake Making dependency list for source file engineTime/engineTime.C Making dependency list for source file ignition/ignition.C Making dependency list for source file ignition/ignitionIO.C could not open file engineTime.H for source file ignition/ignitionIO.C Making dependency list for source file ignition/ignitionSite.C Making dependency list for source file ignition/ignitionSiteIO.C could not open file engineTime.H for source file ignition/ignitionSiteIO.C Making dependency list for source file engineValve/engineValve.C could not open file engineTime.H for source file engineValve/engineValve.C Making dependency list for source file enginePiston/enginePiston.C could not open file engineTime.H for source file enginePiston/enginePiston.C Making dependency list for source file engineMesh/engineMesh/engineMesh.C could not open file engineTime.H for source file engineMesh/engineMesh/engineMesh.C Making dependency list for source file engineMesh/engineMesh/engineMeshNew.C could not open file engineTime.H for source file engineMesh/engineMesh/engineMeshNew.C Making dependency list for source file engineMesh/staticEngineMesh/staticEngineMesh.C could not open file engineMesh.H for source file engineMesh/staticEngineMesh/staticEngineMesh.C Making dependency list for source file engineMesh/layeredEngineMesh/layeredEngineMesh.C could not open file engineMesh.H for source file engineMesh/layeredEngineMesh/layeredEngineMesh.C Making dependency list for source file engineMesh/fvMotionSolverEngineMesh/fvMotionSolverEngineMesh.C could not open file engineMesh.H for source file engineMesh/fvMotionSolverEngineMesh/fvMotionSolverEngineMesh.C SOURCE=engineTime/engineTime.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O0 -fdefault-inline -ggdb3 -DFULLDEBUG -DNoRepository -ftemplate-depth-100 -I/home/klemen/OpenFOAM/OpenFOAM-2.2.0/src/finiteVolume/lnInclude -I/home/klemen/OpenFOAM/OpenFOAM-2.2.0/src/meshTools/lnInclude -I/home/klemen/OpenFOAM/OpenFOAM-2.2.0/src/dynamicMesh/lnInclude -I/home/klemen/OpenFOAM/OpenFOAM-2.2.0/src/fvMotionSolver/lnInclude -IlnInclude -I. -I/home/klemen/OpenFOAM/OpenFOAM-2.2.0/src/OpenFOAM/lnInclude -I/home/klemen/OpenFOAM/OpenFOAM-2.2.0/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPDebug/engineTime.o SOURCE=ignition/ignition.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O0 -fdefault-inline -ggdb3 -DFULLDEBUG -DNoRepository -ftemplate-depth-100 -I/home/klemen/OpenFOAM/OpenFOAM-2.2.0/src/finiteVolume/lnInclude -I/home/klemen/OpenFOAM/OpenFOAM-2.2.0/src/meshTools/lnInclude -I/home/klemen/OpenFOAM/OpenFOAM-2.2.0/src/dynamicMesh/lnInclude -I/home/klemen/OpenFOAM/OpenFOAM-2.2.0/src/fvMotionSolver/lnInclude -IlnInclude -I. -I/home/klemen/OpenFOAM/OpenFOAM-2.2.0/src/OpenFOAM/lnInclude -I/home/klemen/OpenFOAM/OpenFOAM-2.2.0/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPDebug/ignition.o SOURCE=ignition/ignitionIO.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O0 -fdefault-inline -ggdb3 -DFULLDEBUG -DNoRepository -ftemplate-depth-100 -I/home/klemen/OpenFOAM/OpenFOAM-2.2.0/src/finiteVolume/lnInclude -I/home/klemen/OpenFOAM/OpenFOAM-2.2.0/src/meshTools/lnInclude -I/home/klemen/OpenFOAM/OpenFOAM-2.2.0/src/dynamicMesh/lnInclude -I/home/klemen/OpenFOAM/OpenFOAM-2.2.0/src/fvMotionSolver/lnInclude -IlnInclude -I. -I/home/klemen/OpenFOAM/OpenFOAM-2.2.0/src/OpenFOAM/lnInclude -I/home/klemen/OpenFOAM/OpenFOAM-2.2.0/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPDebug/ignitionIO.o ignition/ignitionIO.C:26:24: fatal error: engineTime.H: No such file or directory compilation terminated. make: *** [Make/linuxGccDPDebug/ignitionIO.o] Error 1 |
|
July 29, 2013, 13:13 |
|
#4 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
engine is a library, so you need to run wmake libso for it to compile.
|
|
|
|