Hello
I am trying to extend step-18 to extend it to a runtime program.
To this end, I generate a triangulation made of several
generate_from_name_and_arguments and merged them.
then I assigned locus of various boundary id to that merged triangulation (
obviously only at-boundary faces).
Now I would like to apply non-homogeneous Dirichlet boundary values to each
boundary id through looping over boundary ids and using
VectorTools::interpolate_boundary_values.
As follow:
for (unsigned int i=0;i<=Number_of_DBC;i++)
{
VectorTools::interpolate_boundary_values(
dof_handler,
i,
IncrementalBoundaryValues<dim>(present_time, present_timestep),
boundary_values);
}
And modifying IncrementalBoundaryValues<dim>::vector_value to this:
template <int dim>
void
IncrementalBoundaryValues<dim>::vector_value(const Point<dim> & /*p*/,
Vector<double> &values) const
{
AssertDimension(values.size(), dim);
std::vector<double> Displacement_Magnitude_Factor (3,0);
for (int k=0;k<3;k++)
{
double disp_mag_factor;
std::cout<< "Please Enter component "<<k+1<<" of Displacement Magnitude
Factor for Boundary id= "
//<< boundary_id
<<std::endl;
std::cin>> disp_mag_factor;
Displacement_Magnitude_Factor[k]=disp_mag_factor;
}
values (0)=Displacement_Magnitude_Factor[0] * present_timestep * velocity;
values (1)=Displacement_Magnitude_Factor[1]*present_timestep * velocity;
values (2)=Displacement_Magnitude_Factor[2]*present_timestep * velocity; }
But it seems that my program enter an infinite loop.
In summary, how I can set non-homogeneous Dirichlet boundary condition with
user-defined vector <dim> during runtime?
I'm stuck in this part. unfortunately compiler does not alert any problem.
I tried to find a solution on group but I couldn't find anything in this
matter.
Only this seems similar to my problem:
https://groups.google.com/g/dealii/c/YFEhCYA5gsY/m/q7ZT5IKZ5owJ
But, unfortunately I couldn't understand.
I would appreciate any help.
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see
https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/dealii/4c3ebb36-f845-461d-88c4-5e41655c7048n%40googlegroups.com.