Re: [deal.II] Solution transfer for BlockVector

2024-01-23 Thread Tao Jin
Sorry, my bad. It works for BlockVector. However, there is a discrepancy on 
deal.ii manual. 

Below is from the deal.ii manual about SolutionTransfer module: 
https://www.dealii.org/current/doxygen/deal.II/classSolutionTransfer.html#a1171abf820e35e02304017ef3daeeaa5

"""
Although the refine_interpolate functions are allowed to be called multiple 
times, e.g. for interpolating several solution vectors, there is the 
following possibility of interpolating several functions simultaneously.
std::vector > solutions_old(n_vectors, Vector 
 (n));
...
std::vector 
 > 
solutions(n_vectors, Vector 
 (n));
*soltrans.refine_interpolate(solutions_old, solutions);*
 """
However, *refine_interpolate() cannot take *std::vector. Only 
*interpolate*() has an interface for std::vector.

Best,

Tao 


On Tuesday, January 23, 2024 at 4:23:15 PM UTC-5 Wolfgang Bangerth wrote:

> On 1/23/24 13:03, Tao Jin wrote:
> > 
> > I am trying to use the SolutionTransfer capability of dealii to 
> interpolate a 
> > solution from an old mesh to a new mesh. The solution is stored in a 
> > BlockVector. My understanding is that current solution transfer 
> functions can 
> > only interpolate Vector, not BlockVector. Am I right?
>
> No, this is not true. Have you tried? It should work just fine.
> 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/df3690c7-1327-429d-864f-2745e1339a90n%40googlegroups.com.


Re: [deal.II] Shape gradients of (f(x)*\phi_i)

2024-01-23 Thread Wolfgang Bangerth

On 1/23/24 13:09, Abbas Ballout wrote:


Sorry I meant to say I don't want to use that chain rule.


You mean the product rule? Either way, why is it that you don't want to use 
it? The formula Daniel shows is an *identity*, not some approximation. This is 
how the derivative of a product is defined.


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/825f38d5-0ee1-43da-a283-5efbf5a98bee%40colostate.edu.


Re: [deal.II] Solution transfer for BlockVector

2024-01-23 Thread Wolfgang Bangerth

On 1/23/24 13:03, Tao Jin wrote:


I am trying to use the SolutionTransfer capability of dealii to interpolate a 
solution from an old mesh to a new mesh. The solution is stored in a 
BlockVector. My understanding is that current solution transfer functions can 
only interpolate Vector, not BlockVector. Am I right?


No, this is not true. Have you tried? It should work just fine.
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/513cd849-f3ae-409f-9e8b-f3e2a28cf75a%40colostate.edu.


Re: [deal.II] cmake configure does not find cgal

2024-01-23 Thread Daniel Arndt
What happens if you configure with CGAL_DIR=
/home/spack/opt/spack/linux-opensuse15-broadwell/gcc-12.3.0/cgal-5.5.2-6umjskepmayihkexoscjiovjmtgo5toy/lib64/cmake/CGAL
?

Best,
Daniel

On Sun, Jan 14, 2024 at 4:14 AM Praveen C  wrote:

> CGALConfig.cmake is present
>
> *$ ls -l `spack location -i cgal`/lib64/cmake/CGAL/CGALConfig**
> -rw-r--r-- 1 praveen 8.5K Jun 13  2022
> /home/spack/opt/spack/linux-opensuse15-broadwell/gcc-12.3.0/cgal-5.5.2-6umjskepmayihkexoscjiovjmtgo5toy/lib64/cmake/CGAL/
> CGALConfig_binary.cmake.in
> -rw-r--r-- 1 praveen  144 Jun 13  2022
> /home/spack/opt/spack/linux-opensuse15-broadwell/gcc-12.3.0/cgal-5.5.2-6umjskepmayihkexoscjiovjmtgo5toy/lib64/cmake/CGAL/
> CGALConfig_binary_header_only.cmake.in
> -rw-r--r-- 1 praveen   28 Feb 25  2023
> /home/spack/opt/spack/linux-opensuse15-broadwell/gcc-12.3.0/cgal-5.5.2-6umjskepmayihkexoscjiovjmtgo5toy/lib64/cmake/CGAL/CGALConfigBuildVersion.cmake
> -rw-r--r-- 1 praveen 6.3K Nov 26  2022
> /home/spack/opt/spack/linux-opensuse15-broadwell/gcc-12.3.0/cgal-5.5.2-6umjskepmayihkexoscjiovjmtgo5toy/lib64/cmake/CGAL/CGALConfig.cmake
> -rw-r--r-- 1 praveen 8.4K Jun 13  2022
> /home/spack/opt/spack/linux-opensuse15-broadwell/gcc-12.3.0/cgal-5.5.2-6umjskepmayihkexoscjiovjmtgo5toy/lib64/cmake/CGAL/
> CGALConfig_install.cmake.in
> -rw-r--r-- 1 praveen  158 Jun 13  2022
> /home/spack/opt/spack/linux-opensuse15-broadwell/gcc-12.3.0/cgal-5.5.2-6umjskepmayihkexoscjiovjmtgo5toy/lib64/cmake/CGAL/
> CGALConfigVersion_binary_header_only.cmake.in
> -rw-r--r-- 1 praveen  951 Oct 15  2022
> /home/spack/opt/spack/linux-opensuse15-broadwell/gcc-12.3.0/cgal-5.5.2-6umjskepmayihkexoscjiovjmtgo5toy/lib64/cmake/CGAL/CGALConfigVersion.cmake
>
> Thanks
> praveen
>
> On Saturday, January 6, 2024 at 3:54:09 AM UTC+5:30 d.arnd...@gmail.com
> wrote:
>
> What about CGALConfig.cmake? A CMake project installation should provide
> that.
>
> Best,
> Daniel
>
> --
> 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/32907406-7360-4146-8c1c-2554b848ab66n%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%2B2Hez4dv%2BC0Ghrq08tQ207tOJ9gU9QEofPOn08R4HYZw%40mail.gmail.com.


Re: [deal.II] Shape gradients of (f(x)*\phi_i)

2024-01-23 Thread Abbas Ballout
Daniel, 
Sorry I meant to say I don't want to use that chain rule.
It's because I am looking at papers that compare integrating both versions 
of the weak form:
post and prior using the chain rule.   
Abbas 

On Tuesday, January 23, 2024 at 7:47:14 PM UTC d.arnd...@gmail.com wrote:

> Abbas, 
>
> \dfrac{\partial f(x) \phi_i}{\partial x} is just \dfrac{\partial 
> f(x)}{\partial x} \phi_i+f(x)\dfrac{f(x)}{\partial x} which I would use.
> There is no need to integrate by parts.
>
> Best,
> Daniel
>
> On Tue, Jan 23, 2024 at 2:37 PM Abbas Ballout  
> wrote:
>
>> I know I can query the standard shape gradient at a quadrature point 
>> with  fe_values.shape_grad(i, q).
>> Is it possible to query for something like the gradient of the shape 
>> function multiplied by another function? I need \dfrac{\partial f(x) 
>> \phi_i}{\partial x} but I don't want to integrate by parts. 
>>
>> Abbas 
>>
>> -- 
>> 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/64e24fc5-9876-4e34-97c4-ba6bc77d22a4n%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/2d8de9d1-23f2-45a6-83ac-6311a779fa01n%40googlegroups.com.


[deal.II] Solution transfer for BlockVector

2024-01-23 Thread Tao Jin
Dear all,

I am trying to use the SolutionTransfer capability of dealii to interpolate 
a solution from an old mesh to a new mesh. The solution is stored in a 
BlockVector. My understanding is that current solution transfer functions 
can only interpolate Vector, not BlockVector. Am I right?

Best,

Tao

-- 
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/e9cef0a5-e192-4ff7-b493-f3dd88a6cd23n%40googlegroups.com.


Re: [deal.II] Shape gradients of (f(x)*\phi_i)

2024-01-23 Thread Daniel Arndt
Abbas,

\dfrac{\partial f(x) \phi_i}{\partial x} is just \dfrac{\partial
f(x)}{\partial x} \phi_i+f(x)\dfrac{f(x)}{\partial x} which I would use.
There is no need to integrate by parts.

Best,
Daniel

On Tue, Jan 23, 2024 at 2:37 PM Abbas Ballout 
wrote:

> I know I can query the standard shape gradient at a quadrature point with  
> fe_values.shape_grad(i,
> q).
> Is it possible to query for something like the gradient of the shape
> function multiplied by another function? I need \dfrac{\partial f(x)
> \phi_i}{\partial x} but I don't want to integrate by parts.
>
> Abbas
>
> --
> 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/64e24fc5-9876-4e34-97c4-ba6bc77d22a4n%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%2BpXJ3F%2Bs7MS7vEpoka4mcPscAPxpkRM_yrpQz6QU%3DXHw%40mail.gmail.com.


[deal.II] Shape gradients of (f(x)*\phi_i)

2024-01-23 Thread Abbas Ballout
I know I can query the standard shape gradient at a quadrature point with  
fe_values.shape_grad(i, 
q).
Is it possible to query for something like the gradient of the shape 
function multiplied by another function? I need \dfrac{\partial f(x) 
\phi_i}{\partial x} but I don't want to integrate by parts. 

Abbas 

-- 
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/64e24fc5-9876-4e34-97c4-ba6bc77d22a4n%40googlegroups.com.