Hello Timo,
Thank you for your reply. Yeah, I would definitely like try and make it
work. So, what I did was, I made some small changes in the file
'dof_tools_constraints.inst.in
'.
I just added spacedim loop for the first two 'for loop' blocks.
This is how it looks after the changes,
for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS)
{
#if deal_II_dimension <= deal_II_space_dimension
template void DoFTools::make_periodicity_constraints(
const DoFHandler<deal_II_dimension,
deal_II_space_dimension>::face_iterator &,
const DoFHandler<deal_II_dimension,
deal_II_space_dimension>::face_iterator &,
AffineConstraints<double> &,
const ComponentMask &,
bool,
bool,
bool,
const FullMatrix<double> &,
const std::vector<unsigned int> &,
const double);
#ifdef DEAL_II_WITH_COMPLEX_VALUES
template void DoFTools::make_periodicity_constraints(
const DoFHandler<deal_II_dimension,
deal_II_space_dimension>::face_iterator &,
const DoFHandler<deal_II_dimension,
deal_II_space_dimension>::face_iterator &,
AffineConstraints<std::complex<double>> &,
const ComponentMask &,
bool,
bool,
bool,
const FullMatrix<double> &,
const std::vector<unsigned int> &,
std::complex<double>);#endif
#endif
}
for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS)
{
#if deal_II_dimension <= deal_II_space_dimension
template void DoFTools::make_periodicity_constraints<deal_II_dimension,
deal_II_space_dimension,
double>(
const std::vector<GridTools::PeriodicFacePair<
DoFHandler<deal_II_dimension, deal_II_space_dimension>::cell_iterator>>
&,
AffineConstraints<double> &,
const ComponentMask &,
const std::vector<unsigned int> &,
const double);
#ifdef DEAL_II_WITH_COMPLEX_VALUES
template void DoFTools::make_periodicity_constraints<deal_II_dimension,
deal_II_space_dimension,
std::complex<double>>(
const std::vector<GridTools::PeriodicFacePair<
DoFHandler<deal_II_dimension, deal_II_space_dimension>::cell_iterator>>
&,
AffineConstraints<std::complex<double>> &,
const ComponentMask &,
const std::vector<unsigned int> &,
const std::complex<double>);#endif
template void DoFTools::make_periodicity_constraints(
const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
const types::boundary_id,
const types::boundary_id,
const unsigned int,
AffineConstraints<double> &,
const ComponentMask &,
const double);
#ifdef DEAL_II_WITH_COMPLEX_VALUES
template void DoFTools::make_periodicity_constraints(
const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
const types::boundary_id,
const types::boundary_id,
const unsigned int,
AffineConstraints<std::complex<double>> &,
const ComponentMask &,
const std::complex<double>);#endif
template void DoFTools::make_periodicity_constraints(
const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
const types::boundary_id,
const unsigned int,
AffineConstraints<double> &,
const ComponentMask &,
const double);
#ifdef DEAL_II_WITH_COMPLEX_VALUES
template void DoFTools::make_periodicity_constraints(
const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
const types::boundary_id,
const unsigned int,
AffineConstraints<std::complex<double>> &,
const ComponentMask &,
const std::complex<double>);
#endif#endif
}
Although the build was successful, I am not sure how to check if its
implemented correctly or not. One more slightly basic question, do I need
to build all the other files if I only changed this one file? Does it not
detect that only one file was changed? This is the way one goes about
changing stuff right?
Also, I will be sure to put a pull request if it works.
Thank You
On Monday, November 23, 2020 at 6:14:26 AM UTC+5:30 Timo Heister wrote:
> Hi Malhar,
>
> if you look at
>
> https://github.com/dealii/dealii/blob/a56c8585863b774de9dce5f7dd5c334ef56f3a51/source/dofs/dof_tools_constraints.inst.in#L69
>
> you can see that it is only instantiated for
> DoFHandler<deal_II_dimension>
> meaning only for dim=spacedim (the second argument is the default right
> now).
>
> Instead, we would need to move the instantiation down into a loop that
> has two loops over dim and instantiate it for all pairs like it is
> done for
>
> https://github.com/dealii/dealii/blob/a56c8585863b774de9dce5f7dd5c334ef56f3a51/source/dofs/dof_tools_constraints.inst.in#L123
>
> Do you want to try if you can make this work? I am not sure if the
> implementation will work correctly, but we can check that in a second
> step.
> If this works, we would appreciate a pull request from you to fix this!
>
> Best,
> Timo
>
>
>
> On Sun, Nov 22, 2020 at 4:11 PM Malhar T. <[email protected]> wrote:
> >
> > Hello All !
> >
> > I was trying the step-3 with periodic boundary conditions and dim = 2
> and spacedim = 3. The main reason behind this is I want to test periodic
> boundary conditions for dim != spacedim. I have tested the code for dim =
> spacedim = 2 and the periodic boundary conditions and it works (never mind
> the results for now !). I have also tested the code for dim = 2 and
> spacedim = 3 without periodic boundary conditions and it works too. But
> only when I add periodic conditions for that case, the issue arises.
> >
> > I got the following error,
> >
> > error: undefined reference to 'void
> dealii::DoFTools::make_periodicity_constraints<2, 3,
> double>(dealii::DoFHandler<2, 3> const&, unsigned int, unsigned int,
> unsigned int, dealii::AffineConstraints<double>&, dealii::ComponentMask
> const&, double)'
> > collect2: error: ld returned 1 exit status
> > make[2]: *** [CMakeFiles/step1.dir/build.make:139: step1] Error 1
> > make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/step1.dir/all] Error 2
> > make: *** [Makefile:84: all] Error 2
> >
> > The version that I am using is 9.3.0-pre. Although I am not really great
> at C++ but according to the template and source, it should have worked, but
> I could not find anything here. I tried running it without template
> arguments or with only '2' as a template argument, but couldn't make it
> work. I have attached the code which I have tried, and also the code dim =
> 2 and spacedim = 3 without periodic boundary conditions. Any help will be
> greatly appreciated.
> >
> > Thank You
> >
> > --
> > 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/e11a9f41-4750-459d-bedc-ef0b3ae83dddn%40googlegroups.com
> .
>
>
>
> --
> Timo Heister
> http://www.math.clemson.edu/~heister/
>
--
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/e8c64e79-cfa8-49fe-99ff-9e4445d075b2n%40googlegroups.com.