Hello everybody,
I'm solving a transient linear system with Dirichlet boundary conditions.
I'd like to use DirichletBoundary class for this.
In my problem I have 6 variables in a system, but I want to impose the
Dirichlet boundary conditions on 4 of them.
What I'm trying to do is as follows:
std::set<boundary_id_type> boundary_ids;
boundary_ids.insert(0);
boundary_ids.insert(1);
std::vector<unsigned int> variables(4);
variables[0] = var_a; variables[1] = var_q; variables[2] = var_p;
variables[3] = var_f;
AnalyticFunction<> dirichlet_function_object(zero1);
DirichletBoundary dirichlet_bc(boundary_ids, variables,
dirichlet_function_object);
system.get_dof_map().add_dirichlet_boundary(dirichlet_bc);
The function zero_velocity is as follows:
void zero1(DenseVector<Number> & output,
const Point & p,
const Real)
{
output(0) = 0; output(1) = 0;
output(2) = 10; output(3) = 10;
}
Unfortunately, this does not work. Somehow argument output in the
function zero1 has 2 components. Most likely I'm doing something wrong.
Could you, please, tell me how to achieve what I want or point me to a
similar example?
Thank you,
Michael.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users