I changed the BoundaryCondition-class to
template <int dim>
class BoundaryValues : public Function<dim>
{
private:
equation_class eq_class = carrier_density;
physics_equations equations;
public:
BoundaryValues(equation_class equ_class) : Function<dim>(3*dim),
eq_class(equ_class) {}//Function<dim>(3*dim) instead of Function<3*dim>(dim)
virtual double value(const Point<dim> &p, const unsigned int
component) const;
virtual void vector_value(const Point<dim> &p, Vector<double> &
values) const;
};
and at least now the compilation works. Can I thus assume that the approach
was correct?
Thank you!
Am Freitag, 4. August 2017 11:37:38 UTC+2 schrieb Jean-Paul Pelteret:
>
> Dear Maxi,
>
> It would have been helpful if you'd posted the full error. However, I'm
> guessing that this is the problem: The function that you're trying to call
> <https://dealii.org/developer/doxygen/deal.II/group__constraints.html#ga2376b9a282a2b62be5c55ab62a11a132>
>
> is
>
> void VectorTools::interpolate_boundary_values ( const DoFHandlerType<
> dim, spacedim > & dof,
> const types::boundary_id
> <https://dealii.org/developer/doxygen/deal.II/namespacetypes.html#a685c06c8ba84120df596d9e56f5510e2>
> boundary_component,
> const Function
> <https://dealii.org/developer/doxygen/deal.II/classFunction.html><
> spacedim, number > & boundary_function,
> ConstraintMatrix
> <https://dealii.org/developer/doxygen/deal.II/classConstraintMatrix.html>
> & constraints,
> const ComponentMask
> <https://dealii.org/developer/doxygen/deal.II/classComponentMask.html> &
> component_mask = ComponentMask
> <https://dealii.org/developer/doxygen/deal.II/classComponentMask.html>()
> )
>
>
> You can see that the "boundary_function" is templated on spacedim, but
> you're creating the object BoundaryValues<3*dim>(carrier_density) , which
> clearly has a different value for this template argument.
>
> I hope that this helps.
>
> Regards,
> Jean-Paul
>
> On Friday, August 4, 2017 at 11:22:02 AM UTC+2, Maxi Miller wrote:
>>
>> Then I get the following error:
>> error: no matching function for call to ‘interpolate_boundary_values(
>> dealii::DoFHandler<2>&, int, Step52::BoundaryValues<6>, dealii::
>> ConstraintMatrix&)’
>> VectorTools::interpolate_boundary_values(dof_handler,1,
>> BoundaryValues<3*dim>(carrier_density),constraint_matrix);
>>
>>
>>
>>
>> Am Freitag, 4. August 2017 11:14:32 UTC+2 schrieb Wolfgang Bangerth:
>>>
>>> On 08/04/2017 01:38 AM, 'Maxi Miller' via deal.II User Group wrote:
>>> >
>>> >
>>> > but how do I tell that in
>>> > |
>>> >
>>> VectorTools::interpolate_boundary_values(dof_handler,1,BoundaryValues<3*dim>(),constraint_matrix);
>>>
>>>
>>> > |
>>>
>>> What happens when you do it?
>>>
>>> The function takes an additional ComponentMask argument that allows you
>>> to
>>> select individual vector components of the solution for interpolation.
>>> That's
>>> probably what you want to use in your context.
>>>
>>> Best
>>> W.
>>>
>>> --
>>> ------------------------------------------------------------------------
>>> Wolfgang Bangerth email: [email protected]
>>> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.