[deal.II] Re: PETSc vs Trilinos for step41

2021-09-28 Thread 'peterrum' via deal.II User Group
Hi Reza,

I don't think there is a particular reason. Trilinos was simply chosen. 
Making PETSc work like in spep-40 should be not an issue.
There are other tutorials that use PETSc and others that support both PETSc 
and Trilinos.

PM

On Wednesday, 29 September 2021 at 03:42:04 UTC+2 yagh...@umich.edu wrote:

> Hi,
>
> I was wondering why Trilinos is used in Step41 and not Petsc?
>
> Thanks
> Reza
>

-- 
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/79dd196b-e3ce-4e32-95c4-2d5132f34003n%40googlegroups.com.


[deal.II] PETSc vs Trilinos for step41

2021-09-28 Thread Mohammadreza Yaghoobi
Hi,

I was wondering why Trilinos is used in Step41 and not Petsc?

Thanks
Reza

-- 
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/e4666e1b-ce96-4c4f-b28b-b3d9b930f76bn%40googlegroups.com.


Re: [deal.II] Re: Assigning anisotropic thermal conductivities in the assemble loop

2021-09-28 Thread Wolfgang Bangerth

On 9/28/21 4:24 PM, Morris Jowas wrote:
That would be my pleasure Prof. I will endeavour to make a contribution once I 
test and validate my implementation.




Outstanding! Feel free to ask here how to concretely submit patches for 
inclusion, but in short, this is how this is done:

  https://github.com/dealii/dealii/wiki/Contributing

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/25d0d3c4-1b86-6444-b57c-d7dfab012f0d%40colostate.edu.


Re: [deal.II] Re: Assigning anisotropic thermal conductivities in the assemble loop

2021-09-28 Thread Morris Jowas
That would be my pleasure Prof. I will endeavour to make a contribution 
once I test and validate my implementation. 

Best regards,
MJ

On Tuesday, September 28, 2021 at 9:37:36 PM UTC+1 Wolfgang Bangerth wrote:

> On 9/28/21 11:59 AM, Morris Jowas wrote:
> > Thank you very much Bruno. I am implementing your recommendation now.
>
> step-6 already deals with a case where the coefficient is spatially 
> variable, 
> but not tensor-valued. When you've got it figured out how to use 
> tensor-valued 
> coefficients, might you be interested in writing a part for the 
> "Possibilities 
> for extensions" section of step-6 that explains how to use tensored 
> coefficients? I think that would be a really nice contribution to the 
> library!
>
> Best
> Wolfgang
>
> -- 
> 
> Wolfgang Bangerth email: bang...@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/c76148e1-ddf2-41cf-b9ad-f40b8ea8dd8an%40googlegroups.com.


Re: [deal.II] Re: Assigning anisotropic thermal conductivities in the assemble loop

2021-09-28 Thread Wolfgang Bangerth

On 9/28/21 11:59 AM, Morris Jowas wrote:

Thank you very much Bruno. I am implementing your recommendation now.


step-6 already deals with a case where the coefficient is spatially variable, 
but not tensor-valued. When you've got it figured out how to use tensor-valued 
coefficients, might you be interested in writing a part for the "Possibilities 
for extensions" section of step-6 that explains how to use tensored 
coefficients? I think that would be a really nice contribution to the library!


Best
 Wolfgang

--

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/8ba20bac-8537-1de5-17d6-0c81d6deb151%40colostate.edu.


Re: [deal.II] Calculating an integral over the boundary

2021-09-28 Thread Daniel Arndt
Kyle,

Have a look at VectorTools::point_value(
https://www.dealii.org/current/doxygen/deal.II/namespaceVectorTools.html#a7be5c7eed52308898dfaad91c4cff204
).

Best,
Daniel

Am Di., 28. Sept. 2021 um 13:04 Uhr schrieb Kyle Schwiebert <
kjsch...@mtu.edu>:

> Thank you for the help. I think that has the pretty much sorted out for
> me. One additional question: On this test problem people also like to know
> the pressure drop across the obstacle. This basically involves calculating
> the pressure at two points in the mesh and finding their difference. I see
> in step 13 this can be done by hoping that the points you need to evaluate
> are vertices of the mesh. Is there a more general solution--or a way to
> ensure a certain point is in the mesh? FYI I'm using the very helpful
> builtin meshing scheme for this
> problem: GridGenerator::channel_with_cylinder()
>
> Thanks,
> Kyle
>
> On Monday, September 27, 2021 at 6:24:57 PM UTC-4 Wolfgang Bangerth wrote:
>
>> On 9/27/21 1:43 PM, Kyle Schwiebert wrote:
>> > I'm trying to replicate the simulation described in this paper
>> > <
>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwias-berlin.de%2Fpeople%2Fjohn%2FELECTRONIC_PAPERS%2FJoh04.IJNMF.pdf=04%7C01%7CWolfgang.Bangerth%40colostate.edu%7Ce97881b432a742a2b53008d981ef1a37%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637683686653742835%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000=dDqBEMcMDHgOSMr4G2McKiWUmifKo5sSZpc3ReFfUQ8%3D=0>.
>>
>> > How could I compute the integrals in equations 4 and 5? I'm sure it's
>> > covered in the tutorial, but I couldn't find it after searching in
>> > several different steps in the tutorial. Could someone please point me
>> > to an example in the tutorials where this type of computation with a
>> > computed solution? The only examples I could find seem to only discuss
>> > computing L2, or H1 errors with a special function that avoid manually
>> > computing the integral. Is the easiest thing to do as is done in the
>> > matrix assembly?
>>
>> Kyle,
>> in essence you just have to loop over all cells and integrate up the
>> quantity you have in the formula for a given choice of v_l and v_d. This
>> works in a similar way to this example here where we compute the angular
>> momentum:
>>
>>
>> https://github.com/geodynamics/aspect/blob/master/source/simulator/nullspace.cc#L357-L459
>>
>>
>> > Finally, how would one initialize the vectors v_l and v_d? Could it be
>> > done easily with an appropriate AffineConstraints object?
>>
>> As long as you satisfy the boundary conditions, it's your choice. So you
>> could, for example, start with a zero vector, evaluate boundary values
>> as indicated on the boundary in question, and then just go through the
>> constraints you get as a result and apply them to your zero vector (via
>> AffineConstraints::distribute(), applied to the zero vector). That would
>> probably be what I'd do.
>>
>> Or you just take v_l/v_d as functions that are analytically described
>> (i.e., that are not finite element functions to begin with).
>>
>> Best
>> W.
>>
>> --
>> 
>> Wolfgang Bangerth email: bang...@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/161d3d21-836f-43bf-b751-6da7de2a451dn%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/CAOYDWbLudDq7ZpL65wROMpZQUXxRi64qt6LLzmnSwRZeTQvyLw%40mail.gmail.com.


[deal.II] Re: Assigning anisotropic thermal conductivities in the assemble loop

2021-09-28 Thread Morris Jowas
Thank you very much Bruno. I am implementing your recommendation now.
Best regards,

MJ

On Tuesday, September 28, 2021 at 6:53:37 PM UTC+1 bruno.t...@gmail.com 
wrote:

> MJ,
>
> fe_values.shape_grad() returns a Tensor<1,dim> so you can do something 
> like this
>
> Tensor<1,dim> k_grad;
> for (int d=0; d   k_grad[d] = k[d]*fe_values.shape_grad(i, q_index)[d];
>
> Then you case use k_grad instead of k*fe_values.shape_grad(i, q_index)
>
> Best,
>
> Bruno
>
> On Tuesday, September 28, 2021 at 1:24:38 PM UTC-4 Morris Jowas wrote:
>
>> Hello everyone,
>>
>>  
>>
>> I am solving the heat equation with the Laplacian expressed in terms of 
>> spatially varying thermal conductivities (k_x, k_y and k_z) as shown below:
>>
>> Can I please request your suggestions on how I may go about assigning the 
>> three thermal conductivities to every cell in the assemble loop? The 
>> examples I have seen in dealii provide sufficient guidance for a 
>> homogeneous problem where k is the same in all three directions per cell.
>>
>> For example, in the below loop I solve a version of the problem where 
>> there are two materials in the domain each with material properties k1 and 
>> k2 which I assign based on the cell number contained in the vector geomDef 
>> assuming that each cell is homogenous. However, if the cell is anisotropic, 
>> how can I set up the condition so that dealii knows the direction in which 
>> I am pointing so I can assign the correct thermal conductivity accordingly?
>>
>> Here is the code
>>
>> for (const auto& cell : dof_handler.active_cell_iterators())
>>
>> {
>>
>> cell_matrix = 0;
>>
>> cell_rhs = 0;
>>
>> fe_values.reinit(cell);
>>
>> for (const unsigned int q_index : 
>> fe_values.quadrature_point_indices())
>>
>> for (const unsigned int i : fe_values.dof_indices())
>>
>> {
>>
>> for (const unsigned int j : fe_values.dof_indices())
>>
>>  
>>
>> if (geomDef[curr_cell] == 1)
>>
>> {
>>
>> cell_matrix(i, j) +=
>>
>> (k1 * fe_values.shape_grad(i, q_index) *  // 
>> assigning k1, thermal conductivity for material 1. Help needed here for 
>> allocating the thermal conductivity correctly 
>>
>> fe_values.shape_grad(j, q_index) *
>>
>> fe_values.JxW(q_index));
>>
>> }
>>
>> else
>>
>> {
>>
>> cell_matrix(i, j) +=
>>
>> (k2 * fe_values.shape_grad(i, q_index) * // 
>> assigning k2, thermal conductivity for material 2
>>
>> fe_values.shape_grad(j, q_index) *
>>
>> fe_values.JxW(q_index));
>>
>> }
>>
>> }
>>
>> }
>>
>>  
>>
>> Thank you in advance for your help with this. 
>>
>>  
>>
>> MJ
>>
>

-- 
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/1948ae39-e637-49de-a6bb-b36fa49c899cn%40googlegroups.com.


[deal.II] Re: Assigning anisotropic thermal conductivities in the assemble loop

2021-09-28 Thread Morris Jowas
P.S. Here is the equation. Sorry it did not attach last time around: 


On Tuesday, September 28, 2021 at 6:24:38 PM UTC+1 Morris Jowas wrote:

> Hello everyone,
>
>  
>
> I am solving the heat equation with the Laplacian expressed in terms of 
> spatially varying thermal conductivities (k_x, k_y and k_z) as shown below:
>
> Can I please request your suggestions on how I may go about assigning the 
> three thermal conductivities to every cell in the assemble loop? The 
> examples I have seen in dealii provide sufficient guidance for a 
> homogeneous problem where k is the same in all three directions per cell.
>
> For example, in the below loop I solve a version of the problem where 
> there are two materials in the domain each with material properties k1 and 
> k2 which I assign based on the cell number contained in the vector geomDef 
> assuming that each cell is homogenous. However, if the cell is anisotropic, 
> how can I set up the condition so that dealii knows the direction in which 
> I am pointing so I can assign the correct thermal conductivity accordingly?
>
> Here is the code
>
> for (const auto& cell : dof_handler.active_cell_iterators())
>
> {
>
> cell_matrix = 0;
>
> cell_rhs = 0;
>
> fe_values.reinit(cell);
>
> for (const unsigned int q_index : 
> fe_values.quadrature_point_indices())
>
> for (const unsigned int i : fe_values.dof_indices())
>
> {
>
> for (const unsigned int j : fe_values.dof_indices())
>
>  
>
> if (geomDef[curr_cell] == 1)
>
> {
>
> cell_matrix(i, j) +=
>
> (k1 * fe_values.shape_grad(i, q_index) *  // 
> assigning k1, thermal conductivity for material 1. Help needed here for 
> allocating the thermal conductivity correctly 
>
> fe_values.shape_grad(j, q_index) *
>
> fe_values.JxW(q_index));
>
> }
>
> else
>
> {
>
> cell_matrix(i, j) +=
>
> (k2 * fe_values.shape_grad(i, q_index) * // 
> assigning k2, thermal conductivity for material 2
>
> fe_values.shape_grad(j, q_index) *
>
> fe_values.JxW(q_index));
>
> }
>
> }
>
> }
>
>  
>
> Thank you in advance for your help with this. 
>
>  
>
> MJ
>

-- 
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/d09eb606-d7c7-40eb-9a15-72674e11accen%40googlegroups.com.


[deal.II] Re: Assigning anisotropic thermal conductivities in the assemble loop

2021-09-28 Thread Bruno Turcksin
MJ,

fe_values.shape_grad() returns a Tensor<1,dim> so you can do something like 
this

Tensor<1,dim> k_grad;
for (int d=0; d Hello everyone,
>
>  
>
> I am solving the heat equation with the Laplacian expressed in terms of 
> spatially varying thermal conductivities (k_x, k_y and k_z) as shown below:
>
> Can I please request your suggestions on how I may go about assigning the 
> three thermal conductivities to every cell in the assemble loop? The 
> examples I have seen in dealii provide sufficient guidance for a 
> homogeneous problem where k is the same in all three directions per cell.
>
> For example, in the below loop I solve a version of the problem where 
> there are two materials in the domain each with material properties k1 and 
> k2 which I assign based on the cell number contained in the vector geomDef 
> assuming that each cell is homogenous. However, if the cell is anisotropic, 
> how can I set up the condition so that dealii knows the direction in which 
> I am pointing so I can assign the correct thermal conductivity accordingly?
>
> Here is the code
>
> for (const auto& cell : dof_handler.active_cell_iterators())
>
> {
>
> cell_matrix = 0;
>
> cell_rhs = 0;
>
> fe_values.reinit(cell);
>
> for (const unsigned int q_index : 
> fe_values.quadrature_point_indices())
>
> for (const unsigned int i : fe_values.dof_indices())
>
> {
>
> for (const unsigned int j : fe_values.dof_indices())
>
>  
>
> if (geomDef[curr_cell] == 1)
>
> {
>
> cell_matrix(i, j) +=
>
> (k1 * fe_values.shape_grad(i, q_index) *  // 
> assigning k1, thermal conductivity for material 1. Help needed here for 
> allocating the thermal conductivity correctly 
>
> fe_values.shape_grad(j, q_index) *
>
> fe_values.JxW(q_index));
>
> }
>
> else
>
> {
>
> cell_matrix(i, j) +=
>
> (k2 * fe_values.shape_grad(i, q_index) * // 
> assigning k2, thermal conductivity for material 2
>
> fe_values.shape_grad(j, q_index) *
>
> fe_values.JxW(q_index));
>
> }
>
> }
>
> }
>
>  
>
> Thank you in advance for your help with this. 
>
>  
>
> MJ
>

-- 
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/1dd8a621-8a7c-4221-a746-b434ac904b2cn%40googlegroups.com.


[deal.II] Assigning anisotropic thermal conductivities in the assemble loop

2021-09-28 Thread Morris Jowas


Hello everyone,

 

I am solving the heat equation with the Laplacian expressed in terms of 
spatially varying thermal conductivities (k_x, k_y and k_z) as shown below:

Can I please request your suggestions on how I may go about assigning the 
three thermal conductivities to every cell in the assemble loop? The 
examples I have seen in dealii provide sufficient guidance for a 
homogeneous problem where k is the same in all three directions per cell.

For example, in the below loop I solve a version of the problem where there 
are two materials in the domain each with material properties k1 and k2 
which I assign based on the cell number contained in the vector geomDef 
assuming that each cell is homogenous. However, if the cell is anisotropic, 
how can I set up the condition so that dealii knows the direction in which 
I am pointing so I can assign the correct thermal conductivity accordingly?

Here is the code

for (const auto& cell : dof_handler.active_cell_iterators())

{

cell_matrix = 0;

cell_rhs = 0;

fe_values.reinit(cell);

for (const unsigned int q_index : fe_values.quadrature_point_indices())

for (const unsigned int i : fe_values.dof_indices())

{

for (const unsigned int j : fe_values.dof_indices())

 

if (geomDef[curr_cell] == 1)

{

cell_matrix(i, j) +=

(k1 * fe_values.shape_grad(i, q_index) *  // 
assigning k1, thermal conductivity for material 1. Help needed here for 
allocating the thermal conductivity correctly 

fe_values.shape_grad(j, q_index) *

fe_values.JxW(q_index));

}

else

{

cell_matrix(i, j) +=

(k2 * fe_values.shape_grad(i, q_index) * // 
assigning k2, thermal conductivity for material 2

fe_values.shape_grad(j, q_index) *

fe_values.JxW(q_index));

}

}

}

 

Thank you in advance for your help with this. 

 

MJ

-- 
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/dbed0072-2e87-402f-b1d4-07e918ff3a1dn%40googlegroups.com.


Re: [deal.II] Calculating an integral over the boundary

2021-09-28 Thread Kyle Schwiebert
Thank you for the help. I think that has the pretty much sorted out for me. 
One additional question: On this test problem people also like to know the 
pressure drop across the obstacle. This basically involves calculating the 
pressure at two points in the mesh and finding their difference. I see in 
step 13 this can be done by hoping that the points you need to evaluate are 
vertices of the mesh. Is there a more general solution--or a way to ensure 
a certain point is in the mesh? FYI I'm using the very helpful builtin 
meshing scheme for this problem: GridGenerator::channel_with_cylinder()

Thanks,
Kyle

On Monday, September 27, 2021 at 6:24:57 PM UTC-4 Wolfgang Bangerth wrote:

> On 9/27/21 1:43 PM, Kyle Schwiebert wrote:
> > I'm trying to replicate the simulation described in this paper 
> > <
> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwias-berlin.de%2Fpeople%2Fjohn%2FELECTRONIC_PAPERS%2FJoh04.IJNMF.pdf=04%7C01%7CWolfgang.Bangerth%40colostate.edu%7Ce97881b432a742a2b53008d981ef1a37%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637683686653742835%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000=dDqBEMcMDHgOSMr4G2McKiWUmifKo5sSZpc3ReFfUQ8%3D=0>.
>  
>
> > How could I compute the integrals in equations 4 and 5? I'm sure it's 
> > covered in the tutorial, but I couldn't find it after searching in 
> > several different steps in the tutorial. Could someone please point me 
> > to an example in the tutorials where this type of computation with a 
> > computed solution? The only examples I could find seem to only discuss 
> > computing L2, or H1 errors with a special function that avoid manually 
> > computing the integral. Is the easiest thing to do as is done in the 
> > matrix assembly?
>
> Kyle,
> in essence you just have to loop over all cells and integrate up the 
> quantity you have in the formula for a given choice of v_l and v_d. This 
> works in a similar way to this example here where we compute the angular 
> momentum:
>
>
> https://github.com/geodynamics/aspect/blob/master/source/simulator/nullspace.cc#L357-L459
>
>
> > Finally, how would one initialize the vectors v_l and v_d? Could it be 
> > done easily with an appropriate AffineConstraints object?
>
> As long as you satisfy the boundary conditions, it's your choice. So you 
> could, for example, start with a zero vector, evaluate boundary values 
> as indicated on the boundary in question, and then just go through the 
> constraints you get as a result and apply them to your zero vector (via 
> AffineConstraints::distribute(), applied to the zero vector). That would 
> probably be what I'd do.
>
> Or you just take v_l/v_d as functions that are analytically described 
> (i.e., that are not finite element functions to begin with).
>
> Best
> W.
>
> -- 
> 
> Wolfgang Bangerth email: bang...@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/161d3d21-836f-43bf-b751-6da7de2a451dn%40googlegroups.com.


[deal.II] deal.II Newsletter #184

2021-09-28 Thread 'Rene Gassmoeller' via deal.II User Group
Hello everyone!

This is deal.II newsletter #184.
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:

#12779: Allow to disable fast matrix-free hanging-node algorithm (proposed by 
peterrum) https://github.com/dealii/dealii/pull/12779

#12778: Split up evaluation_template_factory (proposed by peterrum; merged) 
https://github.com/dealii/dealii/pull/12778

#12776: Remove an IDE comment (proposed by peterrum; merged) 
https://github.com/dealii/dealii/pull/12776

#12773: Support MappingCartesian in FEPointEvaluation (proposed by gassmoeller; 
merged) https://github.com/dealii/dealii/pull/12773

#12772: ShapeInfo: store both subface interpolation matrices (proposed by 
peterrum; merged) https://github.com/dealii/dealii/pull/12772

#12770: Fix two bibtex entries. (proposed by bangerth; merged) 
https://github.com/dealii/dealii/pull/12770


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

#12780: Reevaluate MF::AdditionalData::use_fast_hanging_node_algorithm (opened) 
https://github.com/dealii/dealii/issues/12780

#12777: How to calculate solution at every cell center point? (opened) 
https://github.com/dealii/dealii/issues/12777

#12775: No warning/error a non-conforming mesh with FE_NedelecSZ (opened) 
https://github.com/dealii/dealii/issues/12775

#12774: Trilinos: use Tpetra without enabling Epetra (opened) 
https://github.com/dealii/dealii/issues/12774


A list of all major changes since the last release can be found at 
https://www.dealii.org/developer/doxygen/deal.II/recent_changes.html.


Thanks for being part of the community!


Let us know about questions, problems, bugs or just share your experience by 
writing to dealii@googlegroups.com, or by opening issues or pull requests at 
https://www.github.com/dealii/dealii.
Additional information can be found at https://www.dealii.org/.

-- 
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/61533c1e.1c69fb81.f333d.8dcdSMTPIN_ADDED_MISSING%40gmr-mx.google.com.


[deal.II] Dirichlet BC on block matrices

2021-09-28 Thread Мария Бронзова
Deal all,

I have an issue implementing Dirichlet boundary conditions in a mixed 
pressure-displacement problem. 

In step-20 there is an example for implementing pressure boundary 
conditions like that:

*template *
*class PressureBoundaryValues : public Function 
*
* {*
*public:*
* PressureBoundaryValues()*
* : Function 
(1)*
* {}*
*virtual double value(const Point 
 & p,*
*const unsigned int component = 0) const override;*
* };*

*template *
*double RightHandSide::value(const Point 
 & /*p*/,*
*const unsigned int /*component*/) const*
*{*
*return 0;*
*}*

And later:

* for (const auto  : cell->face_iterators())*
*if (face->at_boundary())*
* {*
* fe_face_values.reinit(cell, face);*
* pressure_boundary_values.value_list(*
* fe_face_values.get_quadrature_points 
(),
 
boundary_values);*
*for (unsigned int q = 0; q < n_face_q_points; ++q)*
*for (unsigned int i = 0; i < dofs_per_cell; ++i)*
* local_rhs(i) += -(fe_face_values[velocities].value(i, q) * *
* fe_face_values.normal_vector 
(q)
 
* *
* boundary_values[q] * *
* fe_face_values.JxW 
(q));*
* }*

I was trying to follow the same logic, implementing displacement BC (want 
to set the displacement of certain nodes to zero). In this case I create 
the Boundary condition template as follows:

template 
  class DisplBoundaryValues : public Function>
  {
  public:
  DisplBoundaryValues()
: Function>(dim)
  {}

  virtual std::complex value(const Point ,
   const unsigned int component = 0) const override;

  virtual void vector_value(const Point ,
  Vector> &  value) const override;
  };

template 
  std::complex DisplBoundaryValues::value(const Point & p,
 const unsigned int component) const
{
   const std::complex i = {0,1};
   return 0.+0.*i;
}

template 
void DisplBoundaryValues::vector_value(const Point ,
   Vector> & 
values) const
{
  for (unsigned int c = 0; c < this->n_components; ++c)
  {
  const std::complex i = {0,1};
  values(c) = 0.+0.*i;
  }
}

After that I am trying to apply the boundary values to the right hand side. 
This time i should use the *vector_value_list *instead of value_list to get 
the boundary values assigned. But I am confused about the further 
proceeding while implementing the locar_rhs part. How can I apply these 
boundary values in vector form so that the algorithm understands these 
values need to be assigned exactly to the displacement components? 

for (const auto  : cell->face_iterators())
  if (face->boundary_id()==2)
  {
  displ_boundary_values.*vector*_value_list(
  fe_face_values.get_quadrature_points(), d_boundary_values);

  for (unsigned int q = 0; q < n_face_q_points; ++q)
  for (unsigned int i = 0; i < dofs_per_cell; ++i)
  {
  std::cout << d_boundary_values[q]<< "  ";
  *local_rhs*(i) += -porosity*(1.+Q[k]/R[k])
  *d_boundary_values[q]
  *fe_face_values[pressure].value(i,q)
  *fe_face_values.JxW(q);
  }
  }

Than you a lot for your time!

Kind regards,
Mariia Bronzova

-- 
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/61df161a-1212-403e-8db7-b589b17e1e41n%40googlegroups.com.