Message: 2
Date: Tue, 22 Jan 2008 12:39:34 +0600
From: "Egor Vtorushin" <address@hidden>
Subject: [Getfem-users] establishing only Neumann and Dirichlet
conditions for right side vector(volume forces == 0) in case of xfem
dof addition
To: address@hidden
Message-ID:
<address@hidden
>
Content-Type: text/plain; charset="koi8-r"
Hello, Yves <address@hidden> and all
I've been investigating the crack.cc test and trying to set only Neumann and
Dirichlet conditions for right side vector. So instead of
<code>
// Defining the volumic source term.
plain_vector F(nb_dof_rhs * N);
for (size_type i = 0; i < nb_dof_rhs; ++i)
gmm::copy(sol_f(mf_rhs.point_of_dof(i)),
gmm::sub_vector(F, gmm::sub_interval(i*N, N)));
// Volumic source term brick.
getfem::mdbrick_source_term<> VOL_F(*pINCOMP, mf_rhs, F);
</code>
i write
<code>
// Defining the volumic source term.
plain_vector F(nb_dof_rhs * N);
// Volumic source term brick.
getfem::mdbrick_source_term<> VOL_F(*pINCOMP, mf_rhs, F);
</code>
Thus now the volume forces is set to zero.
Now it is necessary to define track forces on boundary where Neumann
condition type is situated. To do this insted of
<code>
// Defining the Neumann condition right hand side.
gmm::clear(F);
// Neumann condition brick.
getfem::mdbrick_source_term<> NEUMANN(VOL_F, mf_rhs,
F,NEUMANN_BOUNDARY_NUM);
</code>
i write
<code>
// Defining the Neumann condition right hand side.
for (size_type i = 0; i < nb_dof_rhs; ++i){
F[i] = 0;
F[i+1]=0.1*rhs_func
(mf_rhs.point_of_dof(i)[0],
mf_rhs.point_of_dof(i)[1]);
}
// Neumann condition brick.
getfem::mdbrick_source_term<> NEUMANN(VOL_F, mf_rhs, F,
NEUMANN_BOUNDARY_NUM);
</code>
Here rhs_func the auxiliary function equaled to 1 near(to 1e-8) the boundary
where Nuemann condition type is situated. But results of program does not
corresponded with BC we just described. So the question - how can i
establish the BC i need(only Neumann and Dirichlet conditions for right side
vector).
I think the reason that actually number of dof is greater than vector F
size because of xfem addition for describing crack and singularity but i
don't now how to solve this situation. Anybody can help me?
Regards, Egor Vtorushin
It is clear(now for me too) that there was incorrect lines in my defining right side vector F code
The my wrong code is given
<code>
// Defining the Neumann condition right hand side.
for (size_type i = 0; i < nb_dof_rhs; ++i){
F[i] = 0;
F[i+1]=0.1*rhs_func(mf_rhs.point_of_dof(i)[0],
mf_rhs.point_of_dof(i)[1]);
}
// Neumann condition brick.
getfem::mdbrick_source_term<> NEUMANN(VOL_F, mf_rhs, F,
NEUMANN_BOUNDARY_NUM);
</code>
Since i correct it to
<code>
// Defining the Neumann condition right hand side.
for (size_type i = 0; i < nb_dof_rhs; ++i){
F[i*N] = 0;
F[i*N+1]=
0.1*rhs_func(mf_rhs.point_of_dof(i)[0],
mf_rhs.point_of_dof(i)[1]);
}
// Neumann condition brick.
getfem::mdbrick_source_term<> NEUMANN(VOL_F, mf_rhs, F,
NEUMANN_BOUNDARY_NUM);
</code>
the program works fine(besides error in mm::SuperLU_solve, so i add boundary fragment with Dirichlet conditions to make coercitivity)
Sorry for my carelessness.
Regards, Egor Vtorushin.