On 08/20/2018 08:53 PM, Jie Cheng wrote:
template <int dim>
double BoundaryValues<dim>::value(const Point<dim> &p,
const unsigned int
component) const
{
double r = p.distance(Point<dim>());
if (std::abs(r - Rout) < 1e-6)
{
return 0;
}
else if (std::abs(r - Rin) < 1e-6)
These tolerances might be too tight. What happens if you make this 1e-2
instead of 1e-6?
If you use a standard bilinear mapping, then the vertices of your cells are
going to lie on the inner/outer ring, but the midpoints of the (straight)
edges will not, and may simply fall into the last 'return 0' case of your
function. What you probably want to do in that case is to use a MappingQ2 or a
MappingManifold to ensure that you are also using higher-order curved
boundaries. There is a variant of VectorTools::interpolate_boundary_values()
that takes a mapping as first argument.
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.