Hi,

I'm trying to impose tw types of Dirichlet condition, one is homogeneous
and in both variables and the other is nonhomogeneus and only in the second
variable. It seems to work out in the initial projected solution but when I
solve iteratively the problem the last solution does not satisfy the
nonhomogeneus Dirichlet condition. Any ideas?

(I am using: dof_map.heterogenously_constrain_element_matrix_and_vector
(Ke, Fe, dof_indices); )

in the assemble function.

Here is my code:

// Construct two Dirichlet boundary conditions, one omogeneus and the other
nonomogeneus object



    // Indicate which boundary IDs we impose the BC on

    std::set<boundary_id_type> boundary_ids_omogeneus;



    // the dim==1 mesh has two boundaries with IDs 0 and 1

    boundary_ids_omogeneus.insert(0);



    // Create a vector storing the variable numbers which the BC applies to

    std::vector<unsigned int> variables_omogeneus(2);

    variables_omogeneus[0] = x_var;

    variables_omogeneus[1] = y_var;



    // Create a ZeroFunction to initialize dirichlet_bc

    ZeroFunction<> zf;



    // Create a DirichletBoundary object with position, variables and values

    DirichletBoundary dirichlet_bc_omogeneus(boundary_ids_omogeneus,

                                   variables_omogeneus,

                                   &zf);



    // We must add the Dirichlet boundary condition _before_

    // we call equation_systems.init()

    system.get_dof_map().add_dirichlet_boundary(dirichlet_bc_omogeneus);



    // Construct a Dirichlet boundary condition object



    // Indicate which boundary IDs we impose the BC on

    std::set<boundary_id_type> boundary_ids;



    boundary_ids.insert(1);



    // Create a vector storing the variable numbers which the BC applies to

    std::vector<unsigned int> variables(1);

    variables[0] = y_var;



    // Create an AnalyticFunction object that we use to project the BC

    // This function just calls the function exact_solution via
exact_solution_wrapper

    AnalyticFunction<> exact_solution_object(exact_solution_wrapper);



    DirichletBoundary dirichlet_bc(boundary_ids,

                                   variables,

                                   &exact_solution_object);



    // We must add the Dirichlet boundary condition _before_

    // we call equation_systems.init()

    system.get_dof_map().add_dirichlet_boundary(dirichlet_bc);



    // Initialize data structures for equation_system object and print its
information

    equation_systems.init ();




Thanks
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to