Re: [deal.II] evaluating basis functions at random points

2021-12-15 Thread Wolfgang Bangerth

On 12/15/21 10:51, Andrea Bonito wrote:


Thanks, seems to do exactly what I want... except it is not implemented 
for co-dim = 1
(by the way, I do not see where the dimensions are relevant for this 
process).


We'd gladly see a patch that fixes this :-)

The challenge is that in the codim>0 case, a point isn't unambiguously 
going to lie in a cell: You need to extend the pull-back to points that 
aren't on the manifold, and then project back onto the dim-dimensional 
reference manifold. I don't think this is *particularly* difficult, but 
it needs to be done.


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/0cbe8a77-7bfa-cf7e-8749-77887fd405fb%40colostate.edu.


Re: [deal.II] evaluating basis functions at random points

2021-12-15 Thread Andrea Bonito
Daniel:

Thanks, seems to do exactly what I want... except it is not implemented for 
co-dim = 1 
(by the way, I do not see where the dimensions are relevant for this 
process).

Anyway, it looks likes this function is doing what I was planning to do (in 
an optimized way), i.e. for each location point, find the active cell 
iterator containing the point and the associated the reference point.
I can then use this info to create a quadrature / fe_value and assemble the 
matrix as usual. 

Best,
Andrea
On Monday, December 13, 2021 at 3:55:14 PM UTC-6 d.arnd...@gmail.com wrote:

> Andrea,
>
> have a look at GridTools::compute_point_locations(
> https://www.dealii.org/developer/doxygen/deal.II/namespaceGridTools.html#a8e8bb9211264d2106758ac4d7184117e
> ).
> Step-60 demonstrates its use.
>
> Best,
> Daniel
>
> Am Mo., 13. Dez. 2021 um 16:14 Uhr schrieb Andrea Bonito  >:
>
>> Howdy:
>>
>> this might be a simple question but I do not seem to find a way to 
>> efficiently evaluate basis functions at random points. More precisely, I am 
>> given random points in my computational domain and I need to assemble the 
>> terms 
>>
>> phi_i(p) phi_j(p)  for all random points p and all i,j =1,..., n_dofs. 
>>
>> As of now, I am going cell by cell and check whether p is inside the cell 
>> (including the boundary). If it is, I am creating a quadrature with one 
>> point in the reference cell (using the mapping).
>>
>> I am sure one of you has a better way... any help would be appreciated.
>>
>> Andrea
>>
>> -- 
>> 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/18f9edd4-c848-4983-9724-e87b31bd219cn%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/e92bf2cc-1ce2-4da1-85a1-1b69ae36424an%40googlegroups.com.


Re: [deal.II] evaluating basis functions at random points

2021-12-13 Thread Daniel Arndt
Andrea,

have a look at GridTools::compute_point_locations(
https://www.dealii.org/developer/doxygen/deal.II/namespaceGridTools.html#a8e8bb9211264d2106758ac4d7184117e
).
Step-60 demonstrates its use.

Best,
Daniel

Am Mo., 13. Dez. 2021 um 16:14 Uhr schrieb Andrea Bonito :

> Howdy:
>
> this might be a simple question but I do not seem to find a way to
> efficiently evaluate basis functions at random points. More precisely, I am
> given random points in my computational domain and I need to assemble the
> terms
>
> phi_i(p) phi_j(p)  for all random points p and all i,j =1,..., n_dofs.
>
> As of now, I am going cell by cell and check whether p is inside the cell
> (including the boundary). If it is, I am creating a quadrature with one
> point in the reference cell (using the mapping).
>
> I am sure one of you has a better way... any help would be appreciated.
>
> Andrea
>
> --
> 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/18f9edd4-c848-4983-9724-e87b31bd219cn%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/CAOYDWbL0sLUAKK2wOzu8uV2oKOhu-QY7OXSyQPUSaX1NVMxmsQ%40mail.gmail.com.


[deal.II] evaluating basis functions at random points

2021-12-13 Thread Andrea Bonito
Howdy:

this might be a simple question but I do not seem to find a way to 
efficiently evaluate basis functions at random points. More precisely, I am 
given random points in my computational domain and I need to assemble the 
terms 

phi_i(p) phi_j(p)  for all random points p and all i,j =1,..., n_dofs. 

As of now, I am going cell by cell and check whether p is inside the cell 
(including the boundary). If it is, I am creating a quadrature with one 
point in the reference cell (using the mapping).

I am sure one of you has a better way... any help would be appreciated.

Andrea

-- 
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/18f9edd4-c848-4983-9724-e87b31bd219cn%40googlegroups.com.