You have to make sure you call 
heterogenously_constrain_element_matrix_and_vector (instead of 
constrain_element_matrix_and_vector) as in introduction_ex4.

David


On 01/21/2013 07:56 PM, Kyunghoon Lee wrote:
> I tried setting up an inhomogeneous Dirichlet BC as follows:
>
>              std::set<boundary_id_type> bc_surface;
>              bc_surface.insert(BOUNDARY_ID1);
>
>              std::vector<unsigned int> u_only(1, u_var);
>              ConstFunction<Number> bc_value1(-1.0);
>              get_dof_map().add_dirichlet_boundary(DirichletBoundary
> (bc_surface, u_only, &bc_value1));
>
> , but I found u values are always zero no matter what constant values I
> use.  Could you suggest some tips to fix this problem, please?
>
> Regards,
> K. Lee.
>
> On Tue, Jan 22, 2013 at 7:45 AM, Vikram Garg <[email protected]>wrote:
>
>> The only other one I know of is examples/fem_system/fem_system_ex_1 The
>> file naviersystem.C shows how to set Dirichlet boundary conditions.
>>
>> Thanks.
>>
>>
>> On Mon, Jan 21, 2013 at 6:41 PM, Kyunghoon Lee <[email protected]
>>> wrote:
>>> Thank you for the reply.  I wonder if there are other examples about
>>> Dirichlet boundary conditions since I'm not familiar with them.  Can you
>>> suggest some, please?
>>>
>>> Regards,
>>> K. Lee.
>>>
>>> On Mon, Jan 21, 2013 at 10:44 PM, Vikram Garg <[email protected]
>>>> wrote:
>>>> Hey Kyunghon,
>>>>                          Please see adjoints example 3
>>>> (examples/adjoints/adjoints_ex3/). There we solve a Stokes +
>>>> Convection-Diffusion system in an H-shaped channel. The file
>>> adjoints_ex3.C
>>>> contains a description of the type of boundary conditions we are
>>> setting at
>>>> the different boundary ids, and the file coupled_system.C actually sets
>>>> these boundary conditions using the Dirichlet boundary system.
>>>>
>>>> Regards.
>>>>
>>>> On Sun, Jan 20, 2013 at 9:28 PM, Kyunghoon Lee <
>>> [email protected]
>>>>> wrote:
>>>>> Hello all,
>>>>>
>>>>> I have a question about dealing with inhomogeneous Dirichlet boundary
>>>>> conditions.  I have a simple 2D steady state heat conduction model
>>> with a
>>>>> rectangular domain.  I'd like to apply heat flux on the left side (mesh
>>>>> boundary id = 1), and set an inhomogeneous Dirichlet boundary
>>> condition on
>>>>> the rest of slides (mesh boundary id = 2).  Among the examples,
>>>>> introduction_ex3 shows how to deal with Dirichlet boundary conditions,
>>> but
>>>>> it doesn't show how to apply Dirichlet boundary conditions on a
>>> specific
>>>>> mesh ID.  I'd appreciate if someone could show me how to do with
>>> Libmesh.
>>>>> K. Lee.
>>>>>
>>>>>
>>> ------------------------------------------------------------------------------
>>>>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
>>>>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
>>>>> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
>>>>> MVPs and experts. SALE $99.99 this month only -- learn more at:
>>>>> http://p.sf.net/sfu/learnmore_122412
>>>>> _______________________________________________
>>>>> Libmesh-users mailing list
>>>>> [email protected]
>>>>> https://lists.sourceforge.net/lists/listinfo/libmesh-users
>>>>>
>>>>
>>>>
>>>> --
>>>> Vikram Garg
>>>> Postdoctoral Associate
>>>> Center for Computational Engineering
>>>> Massachusetts Institute of Technology
>>>>
>>>> http://www.runforindia.org/runners/vikramg
>>>>
>>> ------------------------------------------------------------------------------
>>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
>>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
>>> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
>>> MVPs and experts. SALE $99.99 this month only -- learn more at:
>>> http://p.sf.net/sfu/learnmore_122412
>>> _______________________________________________
>>> Libmesh-users mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/libmesh-users
>>>
>>
>>
>> --
>> Vikram Garg
>> Postdoctoral Associate
>> Center for Computational Engineering
>> Massachusetts Institute of Technology
>>
>> http://www.runforindia.org/runners/vikramg
>>
> ------------------------------------------------------------------------------
> Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
> and more. Get SQL Server skills now (including 2012) with LearnDevNow -
> 200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
> SALE $99.99 this month only - learn more at:
> http://p.sf.net/sfu/learnmore_122512
> _______________________________________________
> Libmesh-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/libmesh-users


------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to