You mention that
The difference that in step-3, you are imposing *strong* boundary
conditions,
whereas in step-20, you are imposing *weak* boundary conditions.
Then, is there anyway to use strong boundary condition using FESystem<dim>
Yes, of course. Via VectorTools::interpolate_boundary_values and
VectorTools::project_boundary_values.
Because, It seems that the below thing, that I added in step-20, doesn't work
out.
//test for strong boundary condtion
std::map<types::global_dof_index,double> boundary_values_strong;
VectorTools::interpolate_boundary_values (dof_handler,
0,
ZeroFunction<dim>(),
boundary_values_strong);
MatrixTools::apply_boundary_values (boundary_values_strong,
system_matrix.block(1,1),
solution.block(1),
system_rhs.block(1));
//test for strong boundary condtion
The error message is...
An error occurred in line <1783> of file
</user2/hanks318/dealii/dealii-8.3.0/include/deal.II/numerics/vector_tools.templates.h>
in function
void dealii::VectorTools::<unnamed>::do_interpolate_boundary_values(const
M_or_MC<DH::dimension, DH::space_dimension>&, const DH&, const typename
dealii::FunctionMap<DH::space_dimension, double>::type&, std::map<unsigned
int, double, std::less<unsigned int>, std::allocator<std::pair<const unsigned
int, double> > >&, const dealii::ComponentMask&,
dealii::internal::int2type<dim_>) [with DH = dealii::DoFHandler<2, 2>, M_or_MC
= dealii::Mapping, int dim_ = 2]
The violated condition was:
n_components == i->second->n_components
The name and call sequence of the exception was:
ExcDimensionMismatch(n_components, i->second->n_components)
Additional Information:
Dimension 3 not equal to 1
Well, but that has a different reason: your ZeroFunction has only one
component when you need three. After you fix this, you will also find that you
need to apply the boundary conditions to the entire matrix, not just the 1,1
block.
Of course, whether or not you need strong or weak boundary conditions is
something that depends on the equation. What you are trying to do here may or
may not make sense for the equations you are considering.
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.