[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ff3d-users] how define boundary condition ?
From: |
DELPINO Stephane |
Subject: |
Re: [ff3d-users] how define boundary condition ? |
Date: |
Tue, 28 Apr 2009 10:53:29 +0200 |
User-agent: |
Thunderbird 2.0.0.6 (X11/20070728) |
Dear Oka.
You can impose your Dirichlet condition using penalty:
double P=1E3; // example of penalty coefficient
function g = sin(x); // example of Dirichlet RHS
solve (u) in M
{
test(v)
int(grad(u)*grad(v)
+int(P*u*v*one(M1)) // penalty in mesh M1
=
int(P*g*v*one(M1)); // penalty in mesh M2
}
This might be costly since 'one(M1)' need to check if any quadrature
vertex of M is inside M1. Localizing in a 3D mesh can be expensive ...
You may prefer to use POV description
Then you replace 'one(M1)' by 'one(<1,0,0>)' if your object in the POV
file has color <1,0,0>
You can also define an analytic function:
function sphere=one((x-x0)^2+(y-y0)^2+(z-z0)^2<r0^2);
Best regards,
Stephane.