Hi,
the simplest solution would be just parametrize BoundaryValues
constructor. It would look like:
template <int dim>
class BoundaryValues : public Function<dim>
{
double param;
public:
BoundaryValues (double param) : Function<dim>() {
this->param = param;
}
virtual double value (const Point<dim> &p, const unsigned int
component = 0) const;
};
Now you can use param inside any method in BoundaryValues class.
interpolate_boundary_values will look like:
VectorTools::interpolate_boundary_values (dof_handler, 0,
BoundaryValues<dim>(*u_main), boundary_values);
I always learning a lot from you....
For my problem, I have to impose different boundary values,
so for example if in step- 4, we use class derived from Function<dim>
for
making boundary condition.
but.. is there any way that I can bring some values from mainclass? to
be
more specific....
--
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].
For more options, visit https://groups.google.com/d/optout.