Re: [deal.II] How to set refinement flag on the neighbouring cell when it is owned by another processor?

2023-07-12 Thread Wolfgang Bangerth

On 7/11/23 08:23, Abbas Ballout wrote:
I don't want to just set a refinement flag for my cell but I also want to set 
the refinement
flag for the neighbouring cell too and that is what ncellset_refine_flag(); 
doesThis doesn't work if the neighbouring cell is owned by another core


Correct. That's because you can't set information on cells you don't own, in 
particular because it isn't clear what should happen if different non-owning 
processes (for which this cell is a ghost cell) disagree in their decisions on 
what they want to set.


If you want to do this kind of thing, you probably want to collect a list of 
(cell_id, value) that you want to send to each of the neighboring processes, 
then send it via Utilities::MPI::isend(). Then you'd receive this kind of list 
on each process via Utilities::MPI::irecv(), unpack it, and then set the value 
on each of the cells in question.


If you want a higher-level interface, you can use the functions in 
Utilities::MPI::ConsensusAlgorithms.


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/94596774-23d6-cbcf-2516-969f1513bd76%40colostate.edu.


Re: [deal.II] Applying non-homogeneous Neumann BC in step-18

2023-07-12 Thread Wolfgang Bangerth

On 7/11/23 05:32, Mohammad Amir Kiani Fordoei wrote:

Screenshot from 2023-07-11 14-01-30.png
As I understood, I just need to specify a boundary_id on triangulation and 
apply traction force on that with code like this:

{ - loop over cells
-loop over faces per cell && controlling being at_boundary
-loop over quadrature points of face
-loop over dof per cell && controlling intended boundary_id_NBC
-finally adding this term to rhs as
cell_rhs (i)+=
(fe_face_values.shape_value (i,q_point)

*traction_component

*fe_face_values.JxW(q_point));}
But, I didn't see noticble variation of displacement or norm of stress in my 
solution, even for large traction force.
is it necessary to multiply traction_component to "* present_timestep * 
velocity " (like Dirichlet BC displacement)? (I tried this too, but similar to 
previous one no significant effect of load was observed.)


Is this a boundary where you are still *also* applying a prescribed 
displacement? You can only do one or the other.


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/486aa979-8841-0075-e6ab-dd9bdf4e0106%40colostate.edu.


Re: [deal.II] turning off tbb dependency without recompiling deal.II ?

2023-07-12 Thread Wolfgang Bangerth

On 7/12/23 11:56, Mathieu wrote:


I compiled deal.II with tbb enabled.
My *question* is if there is a way to "turn off" the tbb dependency (using a 
cmake variable) locally such that

ldd ./step-1
does not contain *libtbb.so.2* anymore.
I know that one can do for instance
export DEAL_II_NUM_THREADS=1,
but that has no effect on the ldd call.


Right. You need to recompile and reinstall deal.II if you change this 
configuration parameter.


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/e0086d37-3acd-e374-dab0-6ac10b00f50e%40colostate.edu.


[deal.II] turning off tbb dependency without recompiling deal.II ?

2023-07-12 Thread Mathieu
Hello everyone,

my question is a follow-up on this question 
 
that I created some weeks ago.
In a nutshell, I want to link deal.II against matlab, which results in a 
segmentation fault.

#include 
#include "MatlabEngine.hpp"
#include "MatlabDataArray.hpp"

//step-1.cc
int main()
{
matlab::engine::startMATLAB(); //provided by  matlab
dealii::Triangulation<2> triangulation; 
}

The call to startMATLAB() results in a segfault, however, 
there is no segfault if I comment the triangulation object.

Matthias Maier pointed me in the right direction by considering
ldd ./step-1 
which lists, amongst many others, a symbol to the deal.II library and
*libtbb.so.2* (thread building blocks)
I could figure out that matlab links against their own shipped version of 
tbb, 
which probably results in the "symbol clash" that Matthias also mentioned.

I compiled deal.II with tbb enabled.
My *question* is if there is a way to "turn off" the tbb dependency (using 
a cmake variable) locally such that
ldd ./step-1 
does not contain *libtbb.so.2* anymore.
I know that one can do for instance
export DEAL_II_NUM_THREADS=1,
but that has no effect on the ldd call.

Thank you,
Math

-- 
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/8edc7057-4a80-4b7f-bd4c-5f7f4ba1fbeen%40googlegroups.com.


Re: [deal.II] how to define periodic bc in delal.II

2023-07-12 Thread Daniel Arndt
Have a look at step-45.

On Tue, Jul 11, 2023 at 11:48 PM ztdep...@gmail.com 
wrote:

> I waant to know how to define periodic bc in delal.II.
>
> --
> 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/9c8bb95d-65a3-4967-bf7f-888684b7080en%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/CAOYDWbL5-j9VWhkK78AQPsRwprN8bC%3D-Vqh3BsFW5YegD1PPRg%40mail.gmail.com.