Re: [deal.II] MatrixTools::apply_boundary_values for BlockSparseMatrix> and BlockVector> entries

2021-09-20 Thread Мария Бронзова
Dear Daniel,

Thank you many time, I changed the source files, as suggested, and 
recompiled the whole thing again. Now it seems to be working!

Thank you again!

With kind regards,
Mariia Bronzova

пятница, 17 сентября 2021 г. в 18:23:42 UTC+2, d.arnd...@gmail.com: 

> Mariia,
>
> I also tried fixing this within deal.II and discovered that some more 
> changes are necessary, see https://github.com/dealii/dealii/pull/12761. 
> Would you mind checking if the changes proposed there work for you?
>
> Best,
> Daniel
>
> Am Fr., 17. Sept. 2021 um 06:25 Uhr schrieb Мария Бронзова <
> masia...@gmail.com>:
>
>> Dear Daniel,
>>
>> Thank you a lot for the solution ways! I was trying to modify the 
>> /dealii-9.3.1/source/numerics/matrix_tools.inst.in as follows:
>>
>> // -
>> //
>> // Copyright (C) 2010 - 2018 by the deal.II authors
>> //
>> // This file is part of the deal.II library.
>> //
>> // The deal.II library is free software; you can use it, redistribute
>> // it, and/or modify it under the terms of the GNU Lesser General
>> // Public License as published by the Free Software Foundation; either
>> // version 2.1 of the License, or (at your option) any later version.
>> // The full text of the license can be found in the file LICENSE.md at
>> // the top level directory of deal.II.
>> //
>> // -
>>
>> for (number : REAL_SCALARS)
>>   {
>> template void MatrixTools::local_apply_boundary_values(
>>   const std::map _values,
>>   const std::vector & local_dof_indices,
>>   FullMatrix & local_matrix,
>>   Vector & local_rhs,
>>   const bool   eliminate_columns);
>>
>> template void MatrixTools::apply_boundary_values(
>>   const std::map _values,
>>   SparseMatrix &   matrix,
>>   Vector & solution,
>>   Vector & right_hand_side,
>>   const bool   eliminate_columns);
>>
>> template void MatrixTools::apply_boundary_values(
>>   const std::map _values,
>>   BlockSparseMatrix &  matrix,
>>   BlockVector &solution,
>>   BlockVector &right_hand_side,
>>   const bool   eliminate_columns);
>>   }
>>
>> for (number : COMPLEX_SCALARS)
>>   {
>> template void MatrixTools::apply_boundary_values(
>>   const std::map _values,
>>   SparseMatrix &   matrix,
>>   Vector & solution,
>>   Vector & right_hand_side,
>>   const bool   eliminate_columns);
>>   
>> *template void MatrixTools::apply_boundary_values(*
>> *  const std::map _values,*
>> *  BlockSparseMatrix &  matrix,*
>> *  BlockVector &solution,*
>> *  BlockVector &right_hand_side,*
>> *  const bool  
>>  eliminate_columns);*
>>   }
>>
>> Then I recompiled everything and got the error:  
>>
>> /home/mariia/Downloads/dealii-9.3.1/source/numerics/matrix_tools.cc:364:49: 
>> *error*: no match for ‘operator!=’ (operand types are 
>> ‘std::complex’ and ‘double’)
>>   364 |   .diag_element(block_index.second) != 0.0)
>> In file included from 
>> /home/mariia/Downloads/dealii-9.3.1/include/deal.II/base/parallel.h:23,
>>  from 
>> /home/mariia/Downloads/dealii-9.3.1/include/deal.II/base/aligned_vector.h:25,
>>  from 
>> /home/mariia/Downloads/dealii-9.3.1/include/deal.II/base/table.h:21,
>>  from 
>> /home/mariia/Downloads/dealii-9.3.1/include/deal.II/lac/block_sparsity_pattern.h:25,
>>  from 
>> /home/mariia/Downloads/dealii-9.3.1/include/deal.II/lac/sparsity_tools.h:24,
>>  from 
>> /home/mariia/Downloads/dealii-9.3.1/include/deal.II/base/graph_coloring.h:25,
>>  from 
>> /home/mariia/Downloads/dealii-9.3.1/include/deal.II/base/work_stream.h:22,
>>  from 
>> /home/mariia/Downloads/dealii-9.3.1/source/numerics/matrix_tools.cc:19:
>> ..
>> make[2]: *** 
>> [source/numerics/CMakeFiles/obj_numerics_release.dir/build.make:188: 
>> source/numerics/CMakeFiles/obj_numerics_release.dir/matrix_tools.cc.o] 
>> Error 1
>> make[1]: *** [CMakeFiles/Makefile2:3269: 
>> source/numerics/CMakeFiles/obj_numerics_release.dir/all] Error 2
>> make: *** [Makefile:136: all] Error 2
>>
>>
>> I am a bit confused, what else needs to be adjusted may be in the 
>> matrix_tools.cc. I would greatly appreciate help here.
>>
>> Thank you for your time!
>>

Re: [deal.II] MatrixTools::apply_boundary_values for BlockSparseMatrix> and BlockVector> entries

2021-09-17 Thread Daniel Arndt
Mariia,

I also tried fixing this within deal.II and discovered that some more
changes are necessary, see https://github.com/dealii/dealii/pull/12761.
Would you mind checking if the changes proposed there work for you?

Best,
Daniel

Am Fr., 17. Sept. 2021 um 06:25 Uhr schrieb Мария Бронзова <
masianic...@gmail.com>:

> Dear Daniel,
>
> Thank you a lot for the solution ways! I was trying to modify the
> /dealii-9.3.1/source/numerics/matrix_tools.inst.in as follows:
>
> // -
> //
> // Copyright (C) 2010 - 2018 by the deal.II authors
> //
> // This file is part of the deal.II library.
> //
> // The deal.II library is free software; you can use it, redistribute
> // it, and/or modify it under the terms of the GNU Lesser General
> // Public License as published by the Free Software Foundation; either
> // version 2.1 of the License, or (at your option) any later version.
> // The full text of the license can be found in the file LICENSE.md at
> // the top level directory of deal.II.
> //
> // -
>
> for (number : REAL_SCALARS)
>   {
> template void MatrixTools::local_apply_boundary_values(
>   const std::map _values,
>   const std::vector & local_dof_indices,
>   FullMatrix & local_matrix,
>   Vector & local_rhs,
>   const bool   eliminate_columns);
>
> template void MatrixTools::apply_boundary_values(
>   const std::map _values,
>   SparseMatrix &   matrix,
>   Vector & solution,
>   Vector & right_hand_side,
>   const bool   eliminate_columns);
>
> template void MatrixTools::apply_boundary_values(
>   const std::map _values,
>   BlockSparseMatrix &  matrix,
>   BlockVector &solution,
>   BlockVector &right_hand_side,
>   const bool   eliminate_columns);
>   }
>
> for (number : COMPLEX_SCALARS)
>   {
> template void MatrixTools::apply_boundary_values(
>   const std::map _values,
>   SparseMatrix &   matrix,
>   Vector & solution,
>   Vector & right_hand_side,
>   const bool   eliminate_columns);
>
> *template void MatrixTools::apply_boundary_values(*
> *  const std::map _values,*
> *  BlockSparseMatrix &  matrix,*
> *  BlockVector &solution,*
> *  BlockVector &right_hand_side,*
> *  const bool
>  eliminate_columns);*
>   }
>
> Then I recompiled everything and got the error:
>
> /home/mariia/Downloads/dealii-9.3.1/source/numerics/matrix_tools.cc:364:49:
> *error*: no match for ‘operator!=’ (operand types are
> ‘std::complex’ and ‘double’)
>   364 |   .diag_element(block_index.second) != 0.0)
> In file included from
> /home/mariia/Downloads/dealii-9.3.1/include/deal.II/base/parallel.h:23,
>  from
> /home/mariia/Downloads/dealii-9.3.1/include/deal.II/base/aligned_vector.h:25,
>  from
> /home/mariia/Downloads/dealii-9.3.1/include/deal.II/base/table.h:21,
>  from
> /home/mariia/Downloads/dealii-9.3.1/include/deal.II/lac/block_sparsity_pattern.h:25,
>  from
> /home/mariia/Downloads/dealii-9.3.1/include/deal.II/lac/sparsity_tools.h:24,
>  from
> /home/mariia/Downloads/dealii-9.3.1/include/deal.II/base/graph_coloring.h:25,
>  from
> /home/mariia/Downloads/dealii-9.3.1/include/deal.II/base/work_stream.h:22,
>  from
> /home/mariia/Downloads/dealii-9.3.1/source/numerics/matrix_tools.cc:19:
> ..
> make[2]: ***
> [source/numerics/CMakeFiles/obj_numerics_release.dir/build.make:188:
> source/numerics/CMakeFiles/obj_numerics_release.dir/matrix_tools.cc.o]
> Error 1
> make[1]: *** [CMakeFiles/Makefile2:3269:
> source/numerics/CMakeFiles/obj_numerics_release.dir/all] Error 2
> make: *** [Makefile:136: all] Error 2
>
>
> I am a bit confused, what else needs to be adjusted may be in the
> matrix_tools.cc. I would greatly appreciate help here.
>
> Thank you for your time!
>
> With kind regards,
> Mariia
>
>
> среда, 15 сентября 2021 г. в 16:56:41 UTC+2, d.arnd...@gmail.com:
>
>> Mariia,
>>
>> That's a problem a little more complicated to solve. Basically, we are
>> not instantiating the template for complex and BlockSparseMatrix.
>> If you are OK with recompiling deal.II, you should modify source/numerics/
>> matrix_tools.inst.in so that all overloads are also compiled for complex
>> numbers.
>> Otherwise, copy
>> 

Re: [deal.II] MatrixTools::apply_boundary_values for BlockSparseMatrix> and BlockVector> entries

2021-09-17 Thread Мария Бронзова
Dear Daniel,

Thank you a lot for the solution ways! I was trying to modify the 
/dealii-9.3.1/source/numerics/matrix_tools.inst.in as follows:

// -
//
// Copyright (C) 2010 - 2018 by the deal.II authors
//
// This file is part of the deal.II library.
//
// The deal.II library is free software; you can use it, redistribute
// it, and/or modify it under the terms of the GNU Lesser General
// Public License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
// The full text of the license can be found in the file LICENSE.md at
// the top level directory of deal.II.
//
// -

for (number : REAL_SCALARS)
  {
template void MatrixTools::local_apply_boundary_values(
  const std::map _values,
  const std::vector & local_dof_indices,
  FullMatrix & local_matrix,
  Vector & local_rhs,
  const bool   eliminate_columns);

template void MatrixTools::apply_boundary_values(
  const std::map _values,
  SparseMatrix &   matrix,
  Vector & solution,
  Vector & right_hand_side,
  const bool   eliminate_columns);

template void MatrixTools::apply_boundary_values(
  const std::map _values,
  BlockSparseMatrix &  matrix,
  BlockVector &solution,
  BlockVector &right_hand_side,
  const bool   eliminate_columns);
  }

for (number : COMPLEX_SCALARS)
  {
template void MatrixTools::apply_boundary_values(
  const std::map _values,
  SparseMatrix &   matrix,
  Vector & solution,
  Vector & right_hand_side,
  const bool   eliminate_columns);
  
*template void MatrixTools::apply_boundary_values(*
*  const std::map _values,*
*  BlockSparseMatrix &  matrix,*
*  BlockVector &solution,*
*  BlockVector &right_hand_side,*
*  const bool   eliminate_columns);*
  }

Then I recompiled everything and got the error:  

/home/mariia/Downloads/dealii-9.3.1/source/numerics/matrix_tools.cc:364:49: 
*error*: no match for ‘operator!=’ (operand types are ‘std::complex’ 
and ‘double’)
  364 |   .diag_element(block_index.second) != 0.0)
In file included from 
/home/mariia/Downloads/dealii-9.3.1/include/deal.II/base/parallel.h:23,
 from 
/home/mariia/Downloads/dealii-9.3.1/include/deal.II/base/aligned_vector.h:25,
 from 
/home/mariia/Downloads/dealii-9.3.1/include/deal.II/base/table.h:21,
 from 
/home/mariia/Downloads/dealii-9.3.1/include/deal.II/lac/block_sparsity_pattern.h:25,
 from 
/home/mariia/Downloads/dealii-9.3.1/include/deal.II/lac/sparsity_tools.h:24,
 from 
/home/mariia/Downloads/dealii-9.3.1/include/deal.II/base/graph_coloring.h:25,
 from 
/home/mariia/Downloads/dealii-9.3.1/include/deal.II/base/work_stream.h:22,
 from 
/home/mariia/Downloads/dealii-9.3.1/source/numerics/matrix_tools.cc:19:
..
make[2]: *** 
[source/numerics/CMakeFiles/obj_numerics_release.dir/build.make:188: 
source/numerics/CMakeFiles/obj_numerics_release.dir/matrix_tools.cc.o] 
Error 1
make[1]: *** [CMakeFiles/Makefile2:3269: 
source/numerics/CMakeFiles/obj_numerics_release.dir/all] Error 2
make: *** [Makefile:136: all] Error 2


I am a bit confused, what else needs to be adjusted may be in the 
matrix_tools.cc. I would greatly appreciate help here.

Thank you for your time!

With kind regards,
Mariia


среда, 15 сентября 2021 г. в 16:56:41 UTC+2, d.arnd...@gmail.com: 

> Mariia,
>
> That's a problem a little more complicated to solve. Basically, we are not 
> instantiating the template for complex and BlockSparseMatrix. 
> If you are OK with recompiling deal.II, you should modify source/numerics/
> matrix_tools.inst.in so that all overloads are also compiled for complex 
> numbers.
> Otherwise, copy 
> https://github.com/dealii/dealii/blob/7439f2b0b4d210d237e8df53f12f47c242cfac3f/source/numerics/matrix_tools.cc#L240-L499
>  
> somewhere in your source code.
>
> Best,
> Daniel
>
> Am Mi., 15. Sept. 2021 um 09:10 Uhr schrieb Мария Бронзова <
> masia...@gmail.com>:
>
>> Dear Daniel, 
>>
>> Thank you a lot for the hint, it makes perfect sense! I also correctted 
>> the* interpolate_boundary_values* call as follows: 
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>

Re: [deal.II] MatrixTools::apply_boundary_values for BlockSparseMatrix> and BlockVector> entries

2021-09-15 Thread Daniel Arndt
Mariia,

That's a problem a little more complicated to solve. Basically, we are not
instantiating the template for complex and BlockSparseMatrix.
If you are OK with recompiling deal.II, you should modify source/numerics/
matrix_tools.inst.in so that all overloads are also compiled for complex
numbers.
Otherwise, copy
https://github.com/dealii/dealii/blob/7439f2b0b4d210d237e8df53f12f47c242cfac3f/source/numerics/matrix_tools.cc#L240-L499
somewhere in your source code.

Best,
Daniel

Am Mi., 15. Sept. 2021 um 09:10 Uhr schrieb Мария Бронзова <
masianic...@gmail.com>:

> Dear Daniel,
>
> Thank you a lot for the hint, it makes perfect sense! I also correctted the*
> interpolate_boundary_values* call as follows:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *templateclass DirichletBoundaryValues : public Function std::complex>   {   public:  DirichletBoundaryValues():
> Function>(1)   {}  virtual
> std::complex value(const Point , const unsigned int
> component = 1) const override;   };   template 
> std::complex DirichletBoundaryValues::value(const Point &
> p,   const unsigned int /*component*/) const   {  const
> std::complex i = {0,1};  return i;   }*
>
>
>
>
>
>
>
>
>
>
>
>
> * FEValuesExtractors::Scalar pressures(dim);
> std::map> boundary_values;
>   VectorTools::interpolate_boundary_values(dof_handler, 1,
> DirichletBoundaryValues(), boundary_values,
> fe.component_mask(pressures));
> MatrixTools::apply_boundary_values(boundary_values,   system_matrix,
> solution,   system_rhs);*
>
> And now getting the following error:
> undefined reference to 'void
> dealii::MatrixTools::apply_boundary_values
> >(std::map, std::less,
> std::allocator > > >
> const&, dealii::BlockSparseMatrix >&,
> dealii::BlockVector >&,
> dealii::BlockVector >&, bool)'
>
> I am a bit lost, what it could be connected to. Would appreciate any hints!
>
> Thank you a lot for your time!
>
> Kind regards,
> Mariia Bronzova
>
> вторник, 14 сентября 2021 г. в 16:33:44 UTC+2, d.arnd...@gmail.com:
>
>> Mariia,
>>
>> You need to make sure that the std::map also uses values of type
>> std::complex. The compile error you shared shows that you use
>> doubles.
>>
>> Best,
>> Daniel
>>
>> Am Di., 14. Sept. 2021 um 07:30 Uhr schrieb Мария Бронзова <
>> masia...@gmail.com>:
>>
>>> Hi everyone,
>>>
>>> I ran into the following difficulty: I have a vector-valued problem with
>>> complex numbers as entries for my BlockSparseMatrix system_matrix and
>>> BlockVector system_rhs and solution vectors and I am trying to apply
>>> Dirichlet boundary conditions, using the
>>> MatrixTools::apply_boundary_values(boundary_values, system_matrix,
>>> solution, system_rhs) function.
>>>
>>> The compiler is complaining, indicating the error: no matching function
>>> for call to ‘apply_boundary_values(std::map&,
>>> dealii::BlockSparseMatrix >&,
>>> dealii::BlockVector >&,
>>> dealii::BlockVector >&)’.
>>>
>>> Is it not possible to use the function for complex-values systems?
>>>
>>> Thank you!
>>>
>>> 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 dealii+un...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/dealii/aa6ad6fa-7404-4617-bff3-3f108d2b6001n%40googlegroups.com
>>> 
>>> .
>>>
>> --
> 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 dealii+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/4a66ce86-5e20-4a5e-a28b-0073d2cfb185n%40googlegroups.com
> 
> .
>

-- 
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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CAOYDWbLsbfraH%2Bqdt5zptyEYdG1Dk0OS0xYyVwO7D-8t0HNUeQ%40mail.gmail.com.


Re: [deal.II] MatrixTools::apply_boundary_values for BlockSparseMatrix> and BlockVector> entries

2021-09-15 Thread Мария Бронзова
Dear Daniel, 

Thank you a lot for the hint, it makes perfect sense! I also correctted the* 
interpolate_boundary_values* call as follows: 


















*templateclass DirichletBoundaryValues : public Function>   {   public:  DirichletBoundaryValues(): 
Function>(1)   {}  virtual 
std::complex value(const Point , const unsigned int 
component = 1) const override;   };   template
std::complex DirichletBoundaryValues::value(const Point & 
p,   const unsigned int /*component*/) const   {  const 
std::complex i = {0,1};  return i;   }*

 










* FEValuesExtractors::Scalar pressures(dim); 
std::map> boundary_values;   
  VectorTools::interpolate_boundary_values(dof_handler, 1, 
DirichletBoundaryValues(), boundary_values, 
fe.component_mask(pressures)); 
MatrixTools::apply_boundary_values(boundary_values,   system_matrix,   
solution,   system_rhs);*

And now getting the following error:
undefined reference to 'void 
dealii::MatrixTools::apply_boundary_values 
>(std::map, std::less, 
std::allocator > > > 
const&, dealii::BlockSparseMatrix >&, 
dealii::BlockVector >&, 
dealii::BlockVector >&, bool)'

I am a bit lost, what it could be connected to. Would appreciate any hints!

Thank you a lot for your time!

Kind regards,
Mariia Bronzova

вторник, 14 сентября 2021 г. в 16:33:44 UTC+2, d.arnd...@gmail.com: 

> Mariia,
>
> You need to make sure that the std::map also uses values of type 
> std::complex. The compile error you shared shows that you use 
> doubles.
>
> Best,
> Daniel
>
> Am Di., 14. Sept. 2021 um 07:30 Uhr schrieb Мария Бронзова <
> masia...@gmail.com>:
>
>> Hi everyone,
>>
>> I ran into the following difficulty: I have a vector-valued problem with 
>> complex numbers as entries for my BlockSparseMatrix system_matrix and 
>> BlockVector system_rhs and solution vectors and I am trying to apply 
>> Dirichlet boundary conditions, using the 
>> MatrixTools::apply_boundary_values(boundary_values, system_matrix, 
>> solution, system_rhs) function. 
>>
>> The compiler is complaining, indicating the error: no matching function 
>> for call to ‘apply_boundary_values(std::map&, 
>> dealii::BlockSparseMatrix >&, 
>> dealii::BlockVector >&, 
>> dealii::BlockVector >&)’.
>>
>> Is it not possible to use the function for complex-values systems?
>>
>> Thank you!
>>
>> 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 dealii+un...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/dealii/aa6ad6fa-7404-4617-bff3-3f108d2b6001n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/4a66ce86-5e20-4a5e-a28b-0073d2cfb185n%40googlegroups.com.


Re: [deal.II] MatrixTools::apply_boundary_values for BlockSparseMatrix> and BlockVector> entries

2021-09-15 Thread Мария Бронзова
Dear Daniel,

Thank you a lot for the hint, makes perfect sense! The 
MatrixTools::apply_boundary_values works well now! But I believe i also 
need to adjust the VectorTools::interpolate_boundary_values accordingly. 
Right now i have defined a template for pressure component boundary values:

template 
class PressureBoundaryValues : public Function
{
public:
virtual std::complex value(const Point ,
  const 
unsigned int component = 1) const override; //component 1 for the pressure 
block in vector-valued problem
}

template 
std::complex PressureBoundaryValues::value(const Point ,

const unsigned int /*component*/) const
{
const std::complex i = {0,1};
return i;
}

And later I am using:

VectorTools::interpolate_boundary_values(dof_handler, 

1, 

PressureBoundaryValues(), 

boundary_values, 

fe.component_mask(pressures));

The compiler complains with: 'error: no matching function for call to 
‘interpolate_boundary_values(dealii::DoFHandler<3, 3>&, int, 
Poroacoustics::PressureBoundaryValues<3>, std::map >&, dealii::ComponentMask)’.

Could you please give me a hand on this issue as well? Thank you a lot!

Kind regards,
Mariia


вторник, 14 сентября 2021 г. в 16:33:44 UTC+2, d.arnd...@gmail.com: 

> Mariia,
>
> You need to make sure that the std::map also uses values of type 
> std::complex. The compile error you shared shows that you use 
> doubles.
>
> Best,
> Daniel
>
> Am Di., 14. Sept. 2021 um 07:30 Uhr schrieb Мария Бронзова <
> masia...@gmail.com>:
>
>> Hi everyone,
>>
>> I ran into the following difficulty: I have a vector-valued problem with 
>> complex numbers as entries for my BlockSparseMatrix system_matrix and 
>> BlockVector system_rhs and solution vectors and I am trying to apply 
>> Dirichlet boundary conditions, using the 
>> MatrixTools::apply_boundary_values(boundary_values, system_matrix, 
>> solution, system_rhs) function. 
>>
>> The compiler is complaining, indicating the error: no matching function 
>> for call to ‘apply_boundary_values(std::map&, 
>> dealii::BlockSparseMatrix >&, 
>> dealii::BlockVector >&, 
>> dealii::BlockVector >&)’.
>>
>> Is it not possible to use the function for complex-values systems?
>>
>> Thank you!
>>
>> 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 dealii+un...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/dealii/aa6ad6fa-7404-4617-bff3-3f108d2b6001n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/fd8a26df-42e2-4e01-aadf-7061d5f697d0n%40googlegroups.com.


Re: [deal.II] MatrixTools::apply_boundary_values for BlockSparseMatrix> and BlockVector> entries

2021-09-14 Thread Daniel Arndt
Mariia,

You need to make sure that the std::map also uses values of type
std::complex. The compile error you shared shows that you use
doubles.

Best,
Daniel

Am Di., 14. Sept. 2021 um 07:30 Uhr schrieb Мария Бронзова <
masianic...@gmail.com>:

> Hi everyone,
>
> I ran into the following difficulty: I have a vector-valued problem with
> complex numbers as entries for my BlockSparseMatrix system_matrix and
> BlockVector system_rhs and solution vectors and I am trying to apply
> Dirichlet boundary conditions, using the
> MatrixTools::apply_boundary_values(boundary_values, system_matrix,
> solution, system_rhs) function.
>
> The compiler is complaining, indicating the error: no matching function
> for call to ‘apply_boundary_values(std::map&,
> dealii::BlockSparseMatrix >&,
> dealii::BlockVector >&,
> dealii::BlockVector >&)’.
>
> Is it not possible to use the function for complex-values systems?
>
> Thank you!
>
> 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 dealii+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/aa6ad6fa-7404-4617-bff3-3f108d2b6001n%40googlegroups.com
> 
> .
>

-- 
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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CAOYDWbK1d1KXnrsK7D_%2BSo9EON_RCi-LnAGKbpiZAtvGXCh%3Dkw%40mail.gmail.com.


[deal.II] MatrixTools::apply_boundary_values for BlockSparseMatrix> and BlockVector> entries

2021-09-14 Thread Мария Бронзова
Hi everyone,

I ran into the following difficulty: I have a vector-valued problem with 
complex numbers as entries for my BlockSparseMatrix system_matrix and 
BlockVector system_rhs and solution vectors and I am trying to apply 
Dirichlet boundary conditions, using the 
MatrixTools::apply_boundary_values(boundary_values, system_matrix, 
solution, system_rhs) function. 

The compiler is complaining, indicating the error: no matching function for 
call to ‘apply_boundary_values(std::map&, 
dealii::BlockSparseMatrix >&, 
dealii::BlockVector >&, 
dealii::BlockVector >&)’.

Is it not possible to use the function for complex-values systems?

Thank you!

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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/aa6ad6fa-7404-4617-bff3-3f108d2b6001n%40googlegroups.com.