On 6/7/23 09:55, Mohammad Amir Kiani Fordoei wrote:
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.
I bet that's not actually true. It just so happens that
interpolate_boundary_values() wants to know the values of the
IncrementalBoundary function *at a lot of points*. You can output which point
that is in the prompt where you print to std::cout -- these points will be
different. You just ran out of patience entering numbers via std::cin :-)
You just need a better design where you don't have to enter numbers for every
single evaluation point.
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email: bange...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/
--
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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/dealii/d797a242-9994-8309-7abc-3e00b3497d54%40colostate.edu.