Dear all,
I"ve been trying to impose pressure boundary conditions in the context of a
mixed displacement-pressure formulation problem, applying the
"apply_boundary_values" function. I am dealing with complex numbers in my
case, so I am imposing complex pressure values on certain faces with
boundary id 1, as defined further:
template <int dim>
class PressureBoundaryValues : public Function<dim, std::complex<double>>
{
public:
PressureBoundaryValues()
: Function<dim, std::complex<double>>(dim+1)
{}
virtual std::complex<double> value(const Point<dim> &p,
const unsigned int component = 0) const override;
};
template <int dim>
std::complex<double> PressureBoundaryValues<dim>::value(const Point<dim>
& p,
const unsigned int component) const
{
const std::complex<double> i = {0,1};
return 250.+ 0.0*i;
}
for (const auto &cell : triangulation.active_cell_iterators())
for (const auto &face : cell->face_iterators())
if ((face->center()[dim-1] == 0))
face->set_all_boundary_ids(1);
FEValuesExtractors::Scalar pressure(dim);
FEValuesExtractors::Vector velocities(0);
std::map<types::global_dof_index, std::complex<double>> boundary_values;
VectorTools::interpolate_boundary_values(dof_handler,
1,
PressureBoundaryValues<dim>(),
boundary_values,
fe.component_mask(pressure));
MatrixTools::apply_boundary_values(boundary_values,
system_matrix,
solution,
system_rhs);
The problem is that the real part gets perfectly assigned, whereas the
imaginary value is ignored completely, even though I was trying to
prescribe a zero value. In the results of calculation i get everything
possible, rather than zero.
Could someone assist me in this case, please?
Thank you a lot!
With kind regards,
Mariia
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/dealii/2d7f5cab-fdd6-42a5-97b1-762560e15287n%40googlegroups.com.