[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ff3d-users] A bug?
From: |
Robert Li |
Subject: |
[ff3d-users] A bug? |
Date: |
Sun, 8 Feb 2004 12:20:55 -0800 (PST) |
Dear Stephane Del Pino,
I think there is a bug with the following source
code.
When m is a object of MeshOfTetrahedra,
the result of
"dynamic_cast<SurfaceMeshOfTriangles*>(m) " is null,
therefore, null is passed to BoundarySurfaceMesh().
Robert
void BoundaryExpressionSurfaceMesh::execute()
{
(*__surfaceMeshExpression).execute();
Mesh* m = (*__surfaceMeshExpression).mesh();
assert((*m).type() == Mesh::surfaceMeshTriangles);
// __boundary
// = new
BoundarySurfaceMesh(dynamic_cast<SurfaceMeshOfTriangles*>(m));
//2004/02/08 li new create start
MeshOfTetrahedra* aa=
dynamic_cast<MeshOfTetrahedra*>(m);
SurfaceMeshOfTriangles *bb= &(aa->surfaceMesh());
__boundary
= new
BoundarySurfaceMesh(dynamic_cast<SurfaceMeshOfTriangles*>(bb));
//end
}
>>>>>>>>>>>
mesh M = read(medit, "cube.mesh");
scene S = pov("void.pov");
domain O = domain(S);
function z1 =one(z==10);
function z2 =one(z==0);
solve(u) in M //FEM
{
pde(u)
- div(grad(u)) = 0;
u = -1 on M;
};
double I=int(M)(u);
double J=int(M)(1);
cout<<I<<" "<<J<<" Average:"<<I/J<<"\n";
save(medit,"test2",u,M,dos);
save(medit,"test2",M,dos);
>>>>>>>mesh file
MeshVersionFormatted 1
Dimension
3
# Mesh generated by TetGen 1.1 by tetgen -pgfn cube
# Set of mesh vertices
Vertices
8
0 0 0 0
0 10 0 0
10 10 0 0
10 0 0 0
0 0 10 0
0 10 10 0
10 10 10 0
10 0 10 0
# Set of Triangles
Triangles
18
2 3 5 0
2 1 3 4
3 1 5 0
5 1 2 0
4 5 3 0
4 1 5 2
3 1 4 4
4 7 5 0
4 8 7 1
7 8 5 5
5 8 4 2
3 6 2 3
3 5 6 0
6 5 2 0
5 7 3 0
3 7 6 3
6 7 5 5
4 7 3 1
# Set of Tetrahedra
Tetrahedra
6
2 3 5 1 0
4 5 3 1 0
4 7 5 8 0
3 6 2 5 0
5 3 6 7 0
4 7 3 5 0
End
__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html