CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   About initilization and also compiling (https://www.cfd-online.com/Forums/openfoam-pre-processing/62288-about-initilization-also-compiling.html)

Ali (Ali) October 26, 2004 08:00

Dear all, I have a couple
 
Dear all,

I have a couple of questions:

1) About setGammaDamBreak in 'damBreak' case, it's written as this:

const vectorField& centres = mesh.C().internalField();

forAll(centres, celli)
{
if (centres[celli].x() R^2

{
goto 20
}

else

{
gamma(i,j)=1
goto 30
}


// cell has both liquid and air
divide the cell into 25 subcells each having a gamma of 0.04

20 for m=1,5{
for n=1,5{
dx=x(i,j)-x(i-1,j)
dy=y(i,j)-y(i,j-1)

gamma(i,j)=0

if [x(i-1,j)+(m-0.5)/5*dx]^2 + [y(i,j-1)+(n-0.5)/5*dy]^2 pwd
/site/home/ali/foam/foam2.2/applications/solvers/incompressible/icoTopoFoam
ali@ns> which icoTopoFoam
/site/home/ali/foam/foam2.2/applications/bin/sgi64Gcc3OptMPI/icoTopoFoam
ali@ns> wmake
Making dependency list for source file vertexMarkup.C
Making dependency list for source file mixerVessel/mixerMesh.C
Making dependency list for source file icoTopoFoam.C

SOURCE_DIR=.
SOURCE=vertexMarkup.C ; g++ -mabi=64 -mips4 -Dsgi64 -Dsgi64Gcc3OptMPI
-DscalarMachine -DoptSolvers -DUSEMPI -DSGIMPI -Wall -O2 -fno-schedule-insns
-DNoRepository -ftemplate-depth-30
-I/site/home/ali/foam/foam2.2/src/foam/lnInclude -IlnInclude -I.
-DWM_PROJECT_VERSION='"'2.2'"' -g -ImixerVessel
-I/site/home/ali/foam/foam2.2/src/cfdTools/incompressible
-I/site/home/ali/foam/foam2.2/src/cfdTools/lnInclude
-I/site/home/ali/foam/foam2.2/src/dynamicMesh/lnInclude
-I/site/home/ali/foam/foam2.2/src/sampling/lnInclude -fPIC -c $SOURCE -o
Make/sgi64Gcc3OptMPI/vertexMarkup.o
In file included from
/site/home/ali/foam/sgi64/gcc-3.3.1/include/c++/3.3.1/backward/iostream.h:31,
from /usr/include/mpi++.h:170,
from /usr/include/mpi.h:1081,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/PstreamReduceOpsMPI.H:27,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/PstreamReduceOps.H:156,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/FieldFunctions.C:24,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/Field.C:626,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/Field.H:323,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/labelField.H:33,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/primitiveFields.H:31,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/pointField.H:30,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/edge.H:35,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/edgeList.H:26,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/primitiveMesh.H:51,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/polyMesh.H:45,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/fvMesh.H:46,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/fvCFD.H:6,
from vertexMarkup.H:4,
from vertexMarkup.C:26:
/site/home/ali/foam/sgi64/gcc-3.3.1/include/c++/3.3.1/backward/backward_warning.h:32:2:
warning: #warning This file includes at least one deprecated or antiquated
header. Please consider using one of the 32 headers found in section 17.4.1.2
of the C++ standard. Examples include substituting the header for the
header for C++ includes, or instead of the deprecated header
. To disable this warning use -Wno-deprecated.
SOURCE_DIR=mixerVessel
SOURCE=mixerVessel/mixerMesh.C ; g++ -mabi=64 -mips4 -Dsgi64
-Dsgi64Gcc3OptMPI -DscalarMachine -DoptSolvers -DUSEMPI -DSGIMPI -Wall -O2
-fno-schedule-insns -DNoRepository -ftemplate-depth-30
-I/site/home/ali/foam/foam2.2/src/foam/lnInclude -IlnInclude -I.
-DWM_PROJECT_VERSION='"'2.2'"' -g -ImixerVessel
-I/site/home/ali/foam/foam2.2/src/cfdTools/incompressible
-I/site/home/ali/foam/foam2.2/src/cfdTools/lnInclude
-I/site/home/ali/foam/foam2.2/src/dynamicMesh/lnInclude
-I/site/home/ali/foam/foam2.2/src/sampling/lnInclude -fPIC -c $SOURCE -o
Make/sgi64Gcc3OptMPI/mixerMesh.o
In file included from
/site/home/ali/foam/sgi64/gcc-3.3.1/include/c++/3.3.1/backward/iostream.h:31,
from /usr/include/mpi++.h:170,
from /usr/include/mpi.h:1081,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/PstreamReduceOpsMPI.H:27,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/PstreamReduceOps.H:156,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/FieldFunctions.C:24,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/Field.C:626,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/Field.H:323,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/labelField.H:33,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/primitiveFields.H:31,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/pointField.H:30,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/edge.H:35,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/edgeList.H:26,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/primitiveMesh.H:51,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/polyMesh.H:45,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/fvMesh.H:46,
from mixerVessel/mixerMesh.H:32,
from mixerVessel/mixerMesh.C:22:
/site/home/ali/foam/sgi64/gcc-3.3.1/include/c++/3.3.1/backward/backward_warning.h:32:2:
warning: #warning This file includes at least one deprecated or antiquated
header. Please consider using one of the 32 headers found in section 17.4.1.2
of the C++ standard. Examples include substituting the header for the
header for C++ includes, or instead of the deprecated header
. To disable this warning use -Wno-deprecated.
SOURCE_DIR=.
SOURCE=icoTopoFoam.C ; g++ -mabi=64 -mips4 -Dsgi64 -Dsgi64Gcc3OptMPI
-DscalarMachine -DoptSolvers -DUSEMPI -DSGIMPI -Wall -O2 -fno-schedule-insns
-DNoRepository -ftemplate-depth-30
-I/site/home/ali/foam/foam2.2/src/foam/lnInclude -IlnInclude -I.
-DWM_PROJECT_VERSION='"'2.2'"' -g -ImixerVessel
-I/site/home/ali/foam/foam2.2/src/cfdTools/incompressible
-I/site/home/ali/foam/foam2.2/src/cfdTools/lnInclude
-I/site/home/ali/foam/foam2.2/src/dynamicMesh/lnInclude
-I/site/home/ali/foam/foam2.2/src/sampling/lnInclude -fPIC -c $SOURCE -o
Make/sgi64Gcc3OptMPI/icoTopoFoam.o
In file included from
/site/home/ali/foam/sgi64/gcc-3.3.1/include/c++/3.3.1/backward/iostream.h:31,
from /usr/include/mpi++.h:170,
from /usr/include/mpi.h:1081,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/PstreamReduceOpsMPI.H:27,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/PstreamReduceOps.H:156,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/FieldFunctions.C:24,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/Field.C:626,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/Field.H:323,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/labelField.H:33,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/primitiveFields.H:31,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/pointField.H:30,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/edge.H:35,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/edgeList.H:26,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/primitiveMesh.H:51,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/polyMesh.H:45,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/fvMesh.H:46,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/fvCFD.H:6,
from icoTopoFoam.C:27:
/site/home/ali/foam/sgi64/gcc-3.3.1/include/c++/3.3.1/backward/backward_warning.h:32:2:
warning: #warning This file includes at least one deprecated or antiquated
header. Please consider using one of the 32 headers found in section 17.4.1.2
of the C++ standard. Examples include substituting the header for the
header for C++ includes, or instead of the deprecated header
. To disable this warning use -Wno-deprecated.
/site/home/ali/foam/foam2.2/wmake/bashScripts/mkObjectDir
/site/home/ali/foam/foam2.2/applications/bin/sgi64Gcc3OptMPI/icoTopoFoam
g++ -mabi=64 -mips4 -Dsgi64 -Dsgi64Gcc3OptMPI -DscalarMachine
-DoptSolvers -DUSEMPI -DSGIMPI -Wall -O2 -fno-schedule-insns -DNoRepository
-ftemplate-depth-30 -I/site/home/ali/foam/foam2.2/src/foam/lnInclude
-IlnInclude -I. -DWM_PROJECT_VERSION='"'2.2'"' -g -ImixerVessel
-I/site/home/ali/foam/foam2.2/src/cfdTools/incompressible
-I/site/home/ali/foam/foam2.2/src/cfdTools/lnInclude
-I/site/home/ali/foam/foam2.2/src/dynamicMesh/lnInclude
-I/site/home/ali/foam/foam2.2/src/sampling/lnInclude -fPIC
-Wl,-LD_LAYOUT:lgot_buffer=100 Make/sgi64Gcc3OptMPI/vertexMarkup.o
Make/sgi64Gcc3OptMPI/mixerMesh.o Make/sgi64Gcc3OptMPI/icoTopoFoam.o
-L/site/home/ali/foam/foam2.2/lib/sgi64Gcc3OptMPI \
-g -ldynamicMesh -lsampling -lfoam -lmpi -lfpe -lm -o
/site/home/ali/foam/foam2.2/applications/bin/sgi64Gcc3OptMPI/icoTopoFoam
ld64: WARNING 84 :
/site/home/ali/foam/foam2.2/lib/sgi64Gcc3OptMPI/libdynamicMesh.so is not
used for resolving any symbol.
ld64: WARNING 84 : /usr/lib64/libfpe.so is not used for resolving any symbol.
ld64: ERROR 33 : Unresolved text symbol "PMPI::Request::ignored_status" -- 1st
referenced by Make/sgi64Gcc3OptMPI/vertexMarkup.o.
Use linker option -v to see when and which objects, archives and dsos
are loaded.
ld64: ERROR 33 : Unresolved text symbol "PMPI::Comm::ignored_status" -- 1st
referenced by Make/sgi64Gcc3OptMPI/vertexMarkup.o.
Use linker option -v to see when and which objects, archives and dsos
are loaded.
ld64: ERROR 33 : Unresolved text symbol "PMPI::Comm::mpi_comm_map" -- 1st
referenced by Make/sgi64Gcc3OptMPI/vertexMarkup.o.
Use linker option -v to see when and which objects, archives and dsos
are loaded.
ld64: ERROR 33 : Unresolved text symbol "PMPI::Intracomm::current_op" -- 1st
referenced by Make/sgi64Gcc3OptMPI/vertexMarkup.o.
Use linker option -v to see when and which objects, archives and dsos
are loaded.
ld64: ERROR 33 : Unresolved text symbol "MPI::Is_initialized()" -- 1st
referenced by Make/sgi64Gcc3OptMPI/vertexMarkup.o.
Use linker option -v to see when and which objects, archives and dsos
are loaded.
ld64: ERROR 33 : Unresolved text symbol "op_intercept(void*, void*, int*,
unsigned*)" -- 1st referenced by Make/sgi64Gcc3OptMPI/vertexMarkup.o.
Use linker option -v to see when and which objects, archives and dsos
are loaded.
ld64: ERROR 33 : Unresolved text symbol "MPI:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifp::Init(void (*)(void const*,
void*, int, MPI::Datatype const&), bool)" -- 1st referenced by
Make/sgi64Gcc3OptMPI/vertexMarkup.o.
Use linker option -v to see when and which objects, archives and dsos
are loaded.
ld64: ERROR 33 : Unresolved text symbol "MPI:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifp::Free()" -- 1st referenced by
Make/sgi64Gcc3OptMPI/vertexMarkup.o.
Use linker option -v to see when and which objects, archives and dsos
are loaded.
ld64: INFO 152: Output file removed because of error.
collect2: ld returned 2 exit status
*** Error code 1 (bu21)
ali@ns> which icoTopoFoam
icoTopoFoam not in
/site/home/ali/foam/foam2.2/src/mico-2.3.10/platforms/sgi64Gcc3OptMPI/bin
/site/home/ali/foam/sgi64/j2re1.4.1/bin
/site/home/ali/foam/foam2.2/applications/bin/sgi64Gcc3OptMPI
/site/home/ali/foam/ali2.2/applications/bin/sgi64Gcc3OptMPI
/site/home/ali/foam/foam2.2/bin /site/home/ali/foam/sgi64/gcc-3.3.1/bin
/site/home/ali/foam/sgi64/bin /usr/local/Globus/bin /usr/local/Globus/sbin
/usr/sbin /usr/bsd /sbin /usr/bin /usr/bin/X11 /usr/global/express6.2/bin/sg6
/usr/freeware/bin /usr/local/bin /usr/java/bin .
/site/home/ali/foam/foam2.2/wmake
/site/home/ali/foam/foam2.2/applications/utilities/preProcessing/FoamX/bin


I appreciate your help,
Ali.

Niklas Nordin (Niklas) October 26, 2004 08:29

Hi Ali, Where are the 'cou
 
Hi Ali,

Where are the 'couple of questions'?

Ali (Ali) October 26, 2004 09:19

Sorry guys, I don't what's
 
Sorry guys,

I don't what's wrong with the messageboard software or anything else. It deletes some of the lines when I submuit my questions. So, the only thing that worked is that I submit my questions separately (!!), so here they are. Thanks in advance:

FIRST QUESTION) About setGammaDamBreak in 'damBreak' case, it's written as this:

const vectorField& centres = mesh.C().internalField();

forAll(centres, celli)
{
if (centres[celli].x() < 0.2 && centres[celli].y() < 0.4)
{
gamma[celli] = 1.0;
}
else
{
gamma[celli] = 0.0;
}
}

What should I do to initialized velocity using this code as well? E.g.
initialize u=u0 and v=v0 in the water side (where gamma=1) and 0 in the air
side (where gamma=0)?

Mattijs Janssens (Mattijs) October 26, 2004 09:35

After gamma = 1.0;
 
After

gamma[celli] = 1.0;

add

U[celli] = vector(u0, v0, 0);

and similarly for the other case.

Ali (Ali) October 26, 2004 09:43

WHEN I want to use the keyboa
 
WHEN I want to use the keyboard key for "less than" or "greater than", this forum software eliminates some lines. So something is wrong with this software. So, instead of theses characters, I just type "less than" or ...

SECOND QUESTION) For initialization of a circle e.g. a drop
the folowing formula does not give a smooth initial gamma field.

(if (x(i,j)^2+y(i,j)^2) less than or equal to R^2) then gamma=1


A better
initialization for 'gamma' in cases of circular shapes is the
following if we program it in fortran:

for any (i,j)
{

// if cell contains air
if min[x(i-1,j)^2,x(i,j)^2]+min[y(i,j-1)^2,y(i,j)^2] less than R^2

{
goto 10
}

else

{
gamma(i,j)=0
goto 30
}

// if cell contains liquid
10 if max[x(i-1,j)^2,x(i,j)^2]+min[y(i,j-1)^2,y(i,j)^2] greater than R^2

{
goto 20
}

else

{
gamma(i,j)=1
goto 30
}


// if cell contains both liquid and air
divide the cell into 25 subcells each having a gamma of 0.04

20 for m=1,5{
for n=1,5{
dx=x(i,j)-x(i-1,j)
dy=y(i,j)-y(i,j-1)

gamma(i,j)=0

if [x(i-1,j)+(m-0.5)/5*dx]^2 + [y(i,j-1)+(n-0.5)/5*dy]^2 less than R^2
{
gamma(i,j)=gamma(i,j)+0.04
}

}
}


30 loop (i,j)

}

But the problem is that I couldn't find how to find the expression for x(i-1,j).
I appreciate if you just give a hint about it. Also if I want to use min or
max functions, do I need to include math headers to this file?

Ali (Ali) October 26, 2004 09:45

QUESTION THREE) This question
 
QUESTION THREE) This question is about compiling. I changed a solver and then it didn't
recompile. I did a simpler one. I just went to 'icoTopoFoam' folder, it was
already an exectuable, but when I just made it, there was an error that I
couldn't figure out.


ali@ns> pwd
/site/home/ali/foam/foam2.2/applications/solvers/incompressible/icoTopoFoam
ali@ns> which icoTopoFoam
/site/home/ali/foam/foam2.2/applications/bin/sgi64Gcc3OptMPI/icoTopoFoam
ali@ns> wmake
Making dependency list for source file vertexMarkup.C
Making dependency list for source file mixerVessel/mixerMesh.C
Making dependency list for source file icoTopoFoam.C

SOURCE_DIR=.
SOURCE=vertexMarkup.C ; g++ -mabi=64 -mips4 -Dsgi64 -Dsgi64Gcc3OptMPI
-DscalarMachine -DoptSolvers -DUSEMPI -DSGIMPI -Wall -O2 -fno-schedule-insns
-DNoRepository -ftemplate-depth-30
-I/site/home/ali/foam/foam2.2/src/foam/lnInclude -IlnInclude -I.
-DWM_PROJECT_VERSION='"'2.2'"' -g -ImixerVessel
-I/site/home/ali/foam/foam2.2/src/cfdTools/incompressible
-I/site/home/ali/foam/foam2.2/src/cfdTools/lnInclude
-I/site/home/ali/foam/foam2.2/src/dynamicMesh/lnInclude
-I/site/home/ali/foam/foam2.2/src/sampling/lnInclude -fPIC -c $SOURCE -o
Make/sgi64Gcc3OptMPI/vertexMarkup.o
In file included from
/site/home/ali/foam/sgi64/gcc-3.3.1/include/c++/3.3.1/backward/iostream.h:31,
from /usr/include/mpi++.h:170,
from /usr/include/mpi.h:1081,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/PstreamReduceOpsMPI.H:27,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/PstreamReduceOps.H:156,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/FieldFunctions.C:24,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/Field.C:626,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/Field.H:323,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/labelField.H:33,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/primitiveFields.H:31,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/pointField.H:30,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/edge.H:35,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/edgeList.H:26,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/primitiveMesh.H:51,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/polyMesh.H:45,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/fvMesh.H:46,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/fvCFD.H:6,
from vertexMarkup.H:4,
from vertexMarkup.C:26:
/site/home/ali/foam/sgi64/gcc-3.3.1/include/c++/3.3.1/backward/backward_warning.h:32:2:
warning: #warning This file includes at least one deprecated or antiquated
header. Please consider using one of the 32 headers found in section 17.4.1.2
of the C++ standard. Examples include substituting the header for the
header for C++ includes, or instead of the deprecated header
. To disable this warning use -Wno-deprecated.
SOURCE_DIR=mixerVessel
SOURCE=mixerVessel/mixerMesh.C ; g++ -mabi=64 -mips4 -Dsgi64
-Dsgi64Gcc3OptMPI -DscalarMachine -DoptSolvers -DUSEMPI -DSGIMPI -Wall -O2
-fno-schedule-insns -DNoRepository -ftemplate-depth-30
-I/site/home/ali/foam/foam2.2/src/foam/lnInclude -IlnInclude -I.
-DWM_PROJECT_VERSION='"'2.2'"' -g -ImixerVessel
-I/site/home/ali/foam/foam2.2/src/cfdTools/incompressible
-I/site/home/ali/foam/foam2.2/src/cfdTools/lnInclude
-I/site/home/ali/foam/foam2.2/src/dynamicMesh/lnInclude
-I/site/home/ali/foam/foam2.2/src/sampling/lnInclude -fPIC -c $SOURCE -o
Make/sgi64Gcc3OptMPI/mixerMesh.o
In file included from
/site/home/ali/foam/sgi64/gcc-3.3.1/include/c++/3.3.1/backward/iostream.h:31,
from /usr/include/mpi++.h:170,
from /usr/include/mpi.h:1081,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/PstreamReduceOpsMPI.H:27,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/PstreamReduceOps.H:156,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/FieldFunctions.C:24,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/Field.C:626,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/Field.H:323,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/labelField.H:33,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/primitiveFields.H:31,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/pointField.H:30,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/edge.H:35,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/edgeList.H:26,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/primitiveMesh.H:51,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/polyMesh.H:45,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/fvMesh.H:46,
from mixerVessel/mixerMesh.H:32,
from mixerVessel/mixerMesh.C:22:
/site/home/ali/foam/sgi64/gcc-3.3.1/include/c++/3.3.1/backward/backward_warning.h:32:2:
warning: #warning This file includes at least one deprecated or antiquated
header. Please consider using one of the 32 headers found in section 17.4.1.2
of the C++ standard. Examples include substituting the header for the
header for C++ includes, or instead of the deprecated header
. To disable this warning use -Wno-deprecated.
SOURCE_DIR=.
SOURCE=icoTopoFoam.C ; g++ -mabi=64 -mips4 -Dsgi64 -Dsgi64Gcc3OptMPI
-DscalarMachine -DoptSolvers -DUSEMPI -DSGIMPI -Wall -O2 -fno-schedule-insns
-DNoRepository -ftemplate-depth-30
-I/site/home/ali/foam/foam2.2/src/foam/lnInclude -IlnInclude -I.
-DWM_PROJECT_VERSION='"'2.2'"' -g -ImixerVessel
-I/site/home/ali/foam/foam2.2/src/cfdTools/incompressible
-I/site/home/ali/foam/foam2.2/src/cfdTools/lnInclude
-I/site/home/ali/foam/foam2.2/src/dynamicMesh/lnInclude
-I/site/home/ali/foam/foam2.2/src/sampling/lnInclude -fPIC -c $SOURCE -o
Make/sgi64Gcc3OptMPI/icoTopoFoam.o
In file included from
/site/home/ali/foam/sgi64/gcc-3.3.1/include/c++/3.3.1/backward/iostream.h:31,
from /usr/include/mpi++.h:170,
from /usr/include/mpi.h:1081,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/PstreamReduceOpsMPI.H:27,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/PstreamReduceOps.H:156,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/FieldFunctions.C:24,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/Field.C:626,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/Field.H:323,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/labelField.H:33,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/primitiveFields.H:31,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/pointField.H:30,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/edge.H:35,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/edgeList.H:26,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/primitiveMesh.H:51,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/polyMesh.H:45,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/fvMesh.H:46,
from
/site/home/ali/foam/foam2.2/src/foam/lnInclude/fvCFD.H:6,
from icoTopoFoam.C:27:
/site/home/ali/foam/sgi64/gcc-3.3.1/include/c++/3.3.1/backward/backward_warning.h:32:2:
warning: #warning This file includes at least one deprecated or antiquated
header. Please consider using one of the 32 headers found in section 17.4.1.2
of the C++ standard. Examples include substituting the header for the
header for C++ includes, or instead of the deprecated header
. To disable this warning use -Wno-deprecated.
/site/home/ali/foam/foam2.2/wmake/bashScripts/mkObjectDir
/site/home/ali/foam/foam2.2/applications/bin/sgi64Gcc3OptMPI/icoTopoFoam
g++ -mabi=64 -mips4 -Dsgi64 -Dsgi64Gcc3OptMPI -DscalarMachine
-DoptSolvers -DUSEMPI -DSGIMPI -Wall -O2 -fno-schedule-insns -DNoRepository
-ftemplate-depth-30 -I/site/home/ali/foam/foam2.2/src/foam/lnInclude
-IlnInclude -I. -DWM_PROJECT_VERSION='"'2.2'"' -g -ImixerVessel
-I/site/home/ali/foam/foam2.2/src/cfdTools/incompressible
-I/site/home/ali/foam/foam2.2/src/cfdTools/lnInclude
-I/site/home/ali/foam/foam2.2/src/dynamicMesh/lnInclude
-I/site/home/ali/foam/foam2.2/src/sampling/lnInclude -fPIC
-Wl,-LD_LAYOUT:lgot_buffer=100 Make/sgi64Gcc3OptMPI/vertexMarkup.o
Make/sgi64Gcc3OptMPI/mixerMesh.o Make/sgi64Gcc3OptMPI/icoTopoFoam.o
-L/site/home/ali/foam/foam2.2/lib/sgi64Gcc3OptMPI \
-g -ldynamicMesh -lsampling -lfoam -lmpi -lfpe -lm -o
/site/home/ali/foam/foam2.2/applications/bin/sgi64Gcc3OptMPI/icoTopoFoam
ld64: WARNING 84 :
/site/home/ali/foam/foam2.2/lib/sgi64Gcc3OptMPI/libdynamicMesh.so is not
used for resolving any symbol.
ld64: WARNING 84 : /usr/lib64/libfpe.so is not used for resolving any symbol.
ld64: ERROR 33 : Unresolved text symbol "PMPI::Request::ignored_status" -- 1st
referenced by Make/sgi64Gcc3OptMPI/vertexMarkup.o.
Use linker option -v to see when and which objects, archives and dsos
are loaded.
ld64: ERROR 33 : Unresolved text symbol "PMPI::Comm::ignored_status" -- 1st
referenced by Make/sgi64Gcc3OptMPI/vertexMarkup.o.
Use linker option -v to see when and which objects, archives and dsos
are loaded.
ld64: ERROR 33 : Unresolved text symbol "PMPI::Comm::mpi_comm_map" -- 1st
referenced by Make/sgi64Gcc3OptMPI/vertexMarkup.o.
Use linker option -v to see when and which objects, archives and dsos
are loaded.
ld64: ERROR 33 : Unresolved text symbol "PMPI::Intracomm::current_op" -- 1st
referenced by Make/sgi64Gcc3OptMPI/vertexMarkup.o.
Use linker option -v to see when and which objects, archives and dsos
are loaded.
ld64: ERROR 33 : Unresolved text symbol "MPI::Is_initialized()" -- 1st
referenced by Make/sgi64Gcc3OptMPI/vertexMarkup.o.
Use linker option -v to see when and which objects, archives and dsos
are loaded.
ld64: ERROR 33 : Unresolved text symbol "op_intercept(void*, void*, int*,
unsigned*)" -- 1st referenced by Make/sgi64Gcc3OptMPI/vertexMarkup.o.
Use linker option -v to see when and which objects, archives and dsos
are loaded.
ld64: ERROR 33 : Unresolved text symbol "MPI:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifp::Init(void (*)(void const*,
void*, int, MPI::Datatype const&), bool)" -- 1st referenced by
Make/sgi64Gcc3OptMPI/vertexMarkup.o.
Use linker option -v to see when and which objects, archives and dsos
are loaded.
ld64: ERROR 33 : Unresolved text symbol "MPI:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifp::Free()" -- 1st referenced by
Make/sgi64Gcc3OptMPI/vertexMarkup.o.
Use linker option -v to see when and which objects, archives and dsos
are loaded.
ld64: INFO 152: Output file removed because of error.
collect2: ld returned 2 exit status
*** Error code 1 (bu21)
ali@ns> which icoTopoFoam
icoTopoFoam not in
/site/home/ali/foam/foam2.2/src/mico-2.3.10/platforms/sgi64Gcc3OptMPI/bin
/site/home/ali/foam/sgi64/j2re1.4.1/bin
/site/home/ali/foam/foam2.2/applications/bin/sgi64Gcc3OptMPI
/site/home/ali/foam/ali2.2/applications/bin/sgi64Gcc3OptMPI
/site/home/ali/foam/foam2.2/bin /site/home/ali/foam/sgi64/gcc-3.3.1/bin
/site/home/ali/foam/sgi64/bin /usr/local/Globus/bin /usr/local/Globus/sbin
/usr/sbin /usr/bsd /sbin /usr/bin /usr/bin/X11 /usr/global/express6.2/bin/sg6
/usr/freeware/bin /usr/local/bin /usr/java/bin .
/site/home/ali/foam/foam2.2/wmake
/site/home/ali/foam/foam2.2/applications/utilities/preProcessing/FoamX/bin



I appreciate your help,
Regards,
Ali.

Niklas Nordin (Niklas) October 26, 2004 10:30

But the problem is that I coul
 
But the problem is that I couldn't find how to find the
expression for x(i-1,j).


FOAM is a 3D unstructed solver, there's no i,j,k indexing.

and this is not valid code 'for any (i,j)'

centres is a vectorField and to get the components of a vector c = centres[celli]

you use c.x(), c.y() or c.z()


and please, pleeeeaaaase, do not use 'goto'.


For text formatting issues, please note that some characters have a special meaning.
You can read about it under 'Documentation', Formatting.

Niklas

Mattijs Janssens (Mattijs) October 26, 2004 11:18

Hello Ali, about your link
 
Hello Ali,

about your linking problem:

You cannot seem to find some 'PMPI' functions. These are system functions and part of the IRIX64 installation. They get reference because your compilation includes /usr/include/mpi++.h which it shouldn't.

(The port of Foam2.2 you are using was compiled on a system where there was no mpi++.h so we did not have this problem)

Check the /usr/include/mpi.h line 1081 to see why mpi++ gets included. You can probably disabling the inclusion of the mpi++.h by specifying some compilation flag ('-DXXX') on the compilation line. Check the online manual section on wmake on how to change compilation options.

Mattijs Janssens (Mattijs) October 26, 2004 12:31

Hello Ali, the compilation
 
Hello Ali,

the compilation flag you need is -DMPI_NO_CPPBIND

Add it to EXE_INC in Make/options

Mattijs

Ali (Ali) October 26, 2004 13:54

Thanks very much Niklas and M
 
Thanks very much Niklas and Mattijs for your answers, the first and third problem is fully resloved. About finding neighbors of the cell, I'll dig into the source, hopefully I'll figure out that. I know it's an unstructured code, but I thought there is an 'ijk' system for the special case of structured grid.

I knew how funny is it to show a couple of lines of 'goto' fortran commands to C++ professionals, seems you simply hate 'goto' and I'm now getting to understand why ;).

Niklas Nordin (Niklas) October 27, 2004 03:47

To find the neighbours of cel
 
To find the neighbours of celli you must first find the faces of the cell.

const labelList& faces = mesh.cells()[celli];

each face have an 'owner' and 'neighbour',

const unallocLabelList& owner = mesh.faceOwner();
const unallocLabelList& neighbour = mesh.faceNeighbour();

so to find out the neighbour-cell for facei you do:

label facei = faces[i];
label cellj = neighbour[facei];

and if cellj is not equal to celli then
the neigbour is cellj, otherwise it's
cellj = owner[facei];

N

jallen April 7, 2011 09:36

cyclic neighbors
 
Hi,

I've got a question concerning cyclic boundaries.

If I have a face (cf) on a cyclic boundary (say on a 2D hex mesh) how can I find the two cells that are coupled to it.

If I issue: mesh.faceOwner()[cf] and mesh.faceNeighbor()[cf], then the owner cell label appears accurate but the neighbor cell label (the one that is supposedly coupled to it via the cyclic BC) is not a valid cell label.

The simple mesh was created with BlockMesh and the cyclic boundaries were specified correctly.

Could you please address this concern?

Regards,
Jeff


All times are GMT -4. The time now is 10:16.