Re: [deal.II] Problem with FESystem and VectorTools::project_boundary_values_curl_conforming_l2 in 3d

2019-10-29 Thread Wolfgang Bangerth
On 10/29/19 1:46 PM, Daniel Arndt wrote:
> 
> Would you mind creating a pull request for the first issue you are reporting?

Indeed -- and also open a github issue about the second, so that the issue 
isn't forgotten.

Best
  W.


-- 

Wolfgang Bangerth  email: bange...@colostate.edu
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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/826918b4-9098-7f14-c393-e4d4104d81fb%40colostate.edu.


Re: [deal.II] Problem with FESystem and VectorTools::project_boundary_values_curl_conforming_l2 in 3d

2019-10-29 Thread Daniel Arndt
Winni,

Would you mind creating a pull request for the first issue you are
reporting?

Best,
Daniel

Am Di., 29. Okt. 2019 um 13:06 Uhr schrieb winnifried <
woll...@mathematik.tu-darmstadt.de>:

> Dear all,
>
> I encountered the following issue while trying to solve a Maxwell
> eigenvalue problem in dealii v 9.1.1.
>
> When using an FESystem<3> containing one FENedelec and other elements and
> trying to set boundary values
> via
>
> VectorTools::project_boundary_values_curl_conforming_l2
>
> where the argument of first_vector_component is set to the starting
> component of the FENedelec.
> The problem has two parts, the first is solved the second is not and input
> is appreciated.
>
> Part 1 (solved):
> When the FESystem contains two FENedelec of different degree.
>
> Running the attached code (main.cc) ends in debug mode with the
> error
>
> The violated condition was:
> associated_edge_dofs == degree + 1
> Additional information:
> Error: Unexpected number of 3D edge DoFs
>
> triggered by line 31 (main.cc).
>
> The error is caused by the fact, that in vector_tools.templates.h the
> degree is calculated using
>
> fe.degree - 1
>
> which for FESystem is the wrong value as it is the maximum degree and not
> the degree of the selected element.
> It seems to me, that a fix for this is to use
>
> fe.base_element(base_indices.first).degree - 1;
>
> a few lines later once the user indicated base_element is known.
> Once this is done, in debug mode in the attached example line 31 still
> gives an error since
> in VectorTools::compute_face_projection_curl_conforming_l2 a 0-by-0 matrix
> for the face dofs is to be inverted.
> I am not sure why this pops up as it did not appear with the original
> version using only FENedelec of lowest order.
>
> Anyways this seems to be easy to fix. A patch for vector_tools.templates.h
> (in dealii v9.1.1) is attached
> - it is not tested that the computed result is correct, only that this
> fixes the wrongly chosen degree and produces no errors.
>
> Part 2 (input needed):
> Unfortunately this did not solve the original problem in full. If the
> FESystem does not only contain FENedelec, but another FE_Q
> and after applying the patch the original error "Unexpected number of 3D
> edge DoFs"
> still pops up in line 42 of the attached example, this time not because
> the wrong degree is selected, but because the
>
> if(((dynamic_cast *>(&fe) !=
> nullptr) ...
>
> statement in line 5440 of the patched vector_tools.templates.h is never
> true in this case.
> Any input on why this might happen is appreciated - in particular whether
> the assumptions made on the ordering of the
> dofs is correct for such FESystems.
>
> Thanks
> Winni
>
> --
> 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/1eea5fd0-6acb-40e1-b55d-43d94d8fe22d%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/CAOYDWb%2B2Y39cHOS9cKQ3b-3zNHEhNyC_xc9Qp9srKsqHD6Z5ng%40mail.gmail.com.


[deal.II] deal.II Newsletter #99

2019-10-29 Thread Rene Gassmoeller
Hello everyone!

This is deal.II newsletter #99.
It automatically reports recently merged features and discussions about the 
deal.II finite element library.


## Below you find a list of recently proposed or merged features:

#8972: fix doxygen documentation generation for tutorial steps (proposed by 
tamiko; merged) https://github.com/dealii/dealii/pull/8972

#8971: Add copy assignment to MatrixFree::AdditionalData (proposed by peterrum) 
https://github.com/dealii/dealii/pull/8971

#8970: Fix docu of GridOutFlags::Svg (proposed by peterrum; merged) 
https://github.com/dealii/dealii/pull/8970

#8968: Fix python bindings configuration for new boost (proposed by agrayver) 
https://github.com/dealii/dealii/pull/8968

#8967: Make MPI test suite independent from p4est (proposed by peterrum; 
merged) https://github.com/dealii/dealii/pull/8967

#8965: Add copy constuctor to MatrixFree::AdditionalData (proposed by peterrum; 
merged) https://github.com/dealii/dealii/pull/8965

#8964: MPI critical section (proposed by tjhei) 
https://github.com/dealii/dealii/pull/8964

#8963: Update tutorials to use write_vtu_with_pvtu_record (proposed by 
peterrum) https://github.com/dealii/dealii/pull/8963

#8962: Output all faces and edges to vtk (proposed by peterrum) 
https://github.com/dealii/dealii/pull/8962

#8959: Report how much memory was requested when we fail allocating that much. 
(proposed by bangerth; merged) https://github.com/dealii/dealii/pull/8959

#8956: duplicate MPI communicator in ConsensusAlgorithm (proposed by tjhei) 
https://github.com/dealii/dealii/pull/8956

#8955: ConsensusAlgorithmPayload: duplicate communicators (proposed by tjhei) 
https://github.com/dealii/dealii/pull/8955

#8954: fix typos in comments (proposed by tjhei; merged) 
https://github.com/dealii/dealii/pull/8954

#8953: duplicate communicator in compute_p2p... (proposed by tjhei) 
https://github.com/dealii/dealii/pull/8953

#8952: Delete FunctionParse copy constructor. (proposed by bangerth; merged) 
https://github.com/dealii/dealii/pull/8952

#8950: Provide a link to the geometry paper. (proposed by bangerth; merged) 
https://github.com/dealii/dealii/pull/8950

#8949: doc: improve write_vtu_with_pvtu_record (proposed by tjhei; merged) 
https://github.com/dealii/dealii/pull/8949

#8948: Step-50 cleanup (proposed by tjhei) 
https://github.com/dealii/dealii/pull/8948

#8947: new MPI::free_communicator and DuplicatedCommunicator helper (proposed 
by tjhei; merged) https://github.com/dealii/dealii/pull/8947

#8946: Make VectorTools::interpolate() working in parallel (proposed by 
elauksap; merged) https://github.com/dealii/dealii/pull/8946

#8945: Remove unnecessary trilinos options (proposed by dangars; merged) 
https://github.com/dealii/dealii/pull/8945

#8944: Fix bug in MatrixFree::get_face_iterator (proposed by peterrum; merged) 
https://github.com/dealii/dealii/pull/8944

#8943: Fix coarse solver documentation in step-50 (proposed by dangars) 
https://github.com/dealii/dealii/pull/8943

#8942: Update the results section of step-49. (proposed by bangerth; merged) 
https://github.com/dealii/dealii/pull/8942

#8941: Fix an error check with MathJax. (proposed by drwells; merged) 
https://github.com/dealii/dealii/pull/8941

#8939: Fix missing MPI_Wait in compute_point_to_point_communication_pattern 
(proposed by tjhei; merged) https://github.com/dealii/dealii/pull/8939

#8927: new function Utilities::cutoff_digits() (proposed by nfehn; merged) 
https://github.com/dealii/dealii/pull/8927

#8902: Make output cells, faces and co-faces optional in GridOut::write_vtk 
(proposed by peterrum; merged) https://github.com/dealii/dealii/pull/8902

#8898: Step-61 Use FE_DGRT for Darcy velocity (proposed by sophy1029; merged) 
https://github.com/dealii/dealii/pull/8898

#8892: Replace std::bind in documentation (proposed by masterleinad; merged) 
https://github.com/dealii/dealii/pull/8892

#8885: FEInterfaceValues: gradients and hessians (proposed by tjhei; merged) 
https://github.com/dealii/dealii/pull/8885


## And this is a list of recently opened or closed discussions:

#8969: Do not transfer MPI communicator for p::s::Tria::copy_tria (opened) 
https://github.com/dealii/dealii/issues/8969

#8966: MPI tests can be only run with p4test (opened and closed) 
https://github.com/dealii/dealii/issues/8966

#8961: Failure to configure with python bindings on Ubuntu (opened) 
https://github.com/dealii/dealii/issues/8961

#8960: Update tutorials step-37/18/32/45/55/48/42/64/50/40 to recent changes in 
PR #8904 (opened) https://github.com/dealii/dealii/issues/8960

#8958: How to deal with MPI P2P communication using the same MPI tag (opened) 
https://github.com/dealii/dealii/issues/8958

#8957: deal.II does not see the HDF5 package on Ubuntu 18.04 (opened) 
https://github.com/dealii/dealii/issues/8957

#8951: compile error with std::vector> (opened and closed) 
https://github.com/dealii/dealii/issues/8951


A list of all major changes since the last release ca

[deal.II] Re: Hanging nodes

2019-10-29 Thread David Ryan
Thank you!

On Tuesday, 29 October 2019 10:46:05 UTC-7, Bruno Turcksin wrote:
>
> David,
>
> It won't work. The vertices need to match.
>
> Best,
>
> Bruno
>
> On Tuesday, October 29, 2019 at 1:36:41 PM UTC-4, David Ryan wrote:
>>
>> Hello,
>>
>> I'm merging two geometries in dealii. If the cells of both geometries 
>> don't match up, will that give hanging nodes, or will the code not be able 
>> to handle this?
>>
>> Kind regards,
>>
>> David
>>
>

-- 
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/9fd47eea-31d2-43df-af78-5634d1f9b6e6%40googlegroups.com.


[deal.II] Re: Hanging nodes

2019-10-29 Thread Bruno Turcksin
David,

It won't work. The vertices need to match.

Best,

Bruno

On Tuesday, October 29, 2019 at 1:36:41 PM UTC-4, David Ryan wrote:
>
> Hello,
>
> I'm merging two geometries in dealii. If the cells of both geometries 
> don't match up, will that give hanging nodes, or will the code not be able 
> to handle this?
>
> Kind regards,
>
> David
>

-- 
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/da4bfbce-68bc-41c4-b2d0-e56dc7d236e6%40googlegroups.com.


[deal.II] Hanging nodes

2019-10-29 Thread David Ryan
Hello,

I'm merging two geometries in dealii. If the cells of both geometries don't 
match up, will that give hanging nodes, or will the code not be able to 
handle this?

Kind regards,

David

-- 
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/1cd81698-4fad-40f3-b1f5-e3e58cb47f8a%40googlegroups.com.


[deal.II] Problem with FESystem and VectorTools::project_boundary_values_curl_conforming_l2 in 3d

2019-10-29 Thread winnifried
Dear all,

I encountered the following issue while trying to solve a Maxwell 
eigenvalue problem in dealii v 9.1.1.

When using an FESystem<3> containing one FENedelec and other elements and 
trying to set boundary values
via

VectorTools::project_boundary_values_curl_conforming_l2

where the argument of first_vector_component is set to the starting 
component of the FENedelec.
The problem has two parts, the first is solved the second is not and input 
is appreciated.

Part 1 (solved):
When the FESystem contains two FENedelec of different degree. 

Running the attached code (main.cc) ends in debug mode with the
error

The violated condition was:
associated_edge_dofs == degree + 1
Additional information:
Error: Unexpected number of 3D edge DoFs

triggered by line 31 (main.cc). 

The error is caused by the fact, that in vector_tools.templates.h the 
degree is calculated using

fe.degree - 1

which for FESystem is the wrong value as it is the maximum degree and not 
the degree of the selected element.
It seems to me, that a fix for this is to use 

fe.base_element(base_indices.first).degree - 1;

a few lines later once the user indicated base_element is known.
Once this is done, in debug mode in the attached example line 31 still 
gives an error since
in VectorTools::compute_face_projection_curl_conforming_l2 a 0-by-0 matrix 
for the face dofs is to be inverted.
I am not sure why this pops up as it did not appear with the original 
version using only FENedelec of lowest order.

Anyways this seems to be easy to fix. A patch for vector_tools.templates.h 
(in dealii v9.1.1) is attached
- it is not tested that the computed result is correct, only that this 
fixes the wrongly chosen degree and produces no errors. 

Part 2 (input needed):
Unfortunately this did not solve the original problem in full. If the 
FESystem does not only contain FENedelec, but another FE_Q
and after applying the patch the original error "Unexpected number of 3D 
edge DoFs"
still pops up in line 42 of the attached example, this time not because the 
wrong degree is selected, but because the

if(((dynamic_cast *>(&fe) !=
nullptr) ...

statement in line 5440 of the patched vector_tools.templates.h is never 
true in this case.
Any input on why this might happen is appreciated - in particular whether 
the assumptions made on the ordering of the
dofs is correct for such FESystems.

Thanks
Winni

-- 
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/1eea5fd0-6acb-40e1-b55d-43d94d8fe22d%40googlegroups.com.
--- deal9.1.1/vector_tools.templates.h	2019-05-27 04:07:17.0 +0200
+++ vector_tools.templates.h	2019-10-29 15:59:30.547095179 +0100
@@ -5345,10 +5345,7 @@
 
   // Initialize the required objects.
   const FEValues &fe_values = hp_fe_values.get_present_fe_values();
-  // Store degree as fe.degree-1
-  // For nedelec elements FE_Nedelec (0) returns fe.degree = 1.
-  const unsigned int degree = fe.degree - 1;
-
+  
   const std::vector> &quadrature_points =
 fe_values.get_quadrature_points();
   std::vector> values(fe_values.n_quadrature_points,
@@ -5391,6 +5388,11 @@
   base_indices.second = (first_vector_component - fe_index_old) /
 fe.base_element(i).n_components();
 }
+  // Store degree as fe.degree-1
+  // For nedelec elements FE_Nedelec (0) returns fe.degree = 1.
+  // For FESystem get the degree from the base_element
+  // indicated by the first_vector_component
+  const unsigned int degree = fe.base_element(base_indices.first).degree - 1;
 
   // Find DoFs we want to constrain:
   // There are fe.dofs_per_line DoFs associated with the
@@ -5606,7 +5608,6 @@
   const FiniteElement & fe = cell->get_fe();
   const std::vector> &quadrature_points =
 fe_face_values.get_quadrature_points();
-  const unsigned int degree = fe.degree - 1;
 
   std::vector> values(fe_face_values.n_quadrature_points,
  Vector(fe.n_components()));
@@ -5646,7 +5647,8 @@
   base_indices.second = (first_vector_component - fe_index_old) /
 fe.base_element(i).n_components();
 }
-
+  const unsigned int degree = fe.base_element(base_indices.first).degree - 1;
+  
   switch (dim)
 {
   case 2:
@@ -5994,9 +5996,11 @@
 }
 
   // Solve lienar system:
-  face_matrix_inv.invert(face_matrix);
-  face_matrix_inv.vmult(face_