Subject: [FEniCS-dev] defining variational problem

From: Brandon Chabaud <[email-masked]>
Date: Thu, 19 Feb 2009 11:05:26 -0600

Hello,

I am trying to define a variational form for a PDE system using the
VariationalProblem function.  I define the bilinear form A and the linear
form L with no difficulties.  All boundary conditions are imposed weakly, so
the DirichletBC function is not used, for example.  The boundary is divided
into two parts corresponding to different boundary conditions.  These parts
are marked using MeshFunction and labeled by dirichlet_boundary_function and
neumann_boundary_function, similar to what is done in the elastodynamics
demo.  However, when I type in

VariationalProblem
pde(a,L,&dirichlet_boundary_function,&neumann_boundary_function),

I get a "no matching function for call" error upon compiling.  How do I fix
this?  Thank you.

Brandon Chabaud

---

From: Anders Logg <[email-masked]>
Date: Thu, 19 Feb 2009 21:27:12 +0100

On Thu, Feb 19, 2009 at 11:05:26AM -0600, Brandon Chabaud wrote:
> VariationalProblem function.  I define the bilinear form A and the linear form
> L with no difficulties.  All boundary conditions are imposed weakly, so the
> DirichletBC function is not used, for example.  The boundary is divided into
> two parts corresponding to different boundary conditions.  These parts are
> marked using MeshFunction and labeled by dirichlet_boundary_function and
> neumann_boundary_function, similar to what is done in the elastodynamics demo. 
> However, when I type in
> 
> VariationalProblem pde(a,L,&dirichlet_boundary_function,&
> neumann_boundary_function),
> 

You are calling VariationalProblem the wrong way. Take a look at the
following demos that all use VariationalProblem:

demo/function/eval/cpp/main.cpp
demo/pde/bcs/cpp/main.cpp
demo/pde/dg/advection-diffusion/cpp/main.cpp
demo/pde/dg/poisson/cpp/main.cpp
demo/pde/elasticity/cpp/main.cpp
demo/pde/elastodynamics/cpp/main.cpp
demo/pde/mixed-poisson/cpp/main.cpp
demo/pde/nonlinear-poisson/cpp/main.cpp
demo/pde/periodic/cpp/main.cpp
demo/pde/poisson1D/cpp/main.cpp
demo/pde/poisson/cpp/main.cpp
demo/pde/stokes/stabilized/cpp/main.cpp
demo/pde/stokes/taylor-hood/cpp/main.cpp

Further questions should be directed to dolfin-dev.

Thanks
-- 
Anders