Re: [deal.II] ibpetsc.so.3.019 not found

2023-11-29 Thread 陈敏
Hi Jai

You can add the path of libpetsc.so to the environment variable
“LD_LIBRARY_PATH”.

Best
Chen

Wolfgang Bangerth  于2023年11月30日周四 13:05写道:

> On 11/29/23 20:51, Jai wrote:
> > The exeuctable  of step-5 and 15 got generated without error and while
> > running, I am getting the following error. ./step-5: error while loading
> > shared libraries: libpetsc.so.3.019: cannot open shared object file: No
> such
> > file or directory. How to resolve it. I am using Intel.
>
> Jai: You already asked this in a github issue at
>https://github.com/dealii/dealii/issues/16308
> Bruno asked for more information. There is nothing we can help you if you
> simply repeat the question without providing what Bruno already asked for.
>
> Best
>   WB
>
> --
> 
> 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/cc4b73d0-b65e-51f8-d93a-42ed5c23ffae%40colostate.edu
> .
>

-- 
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/CADr3Od%2B50sAJGb3BOPn5evoX4Khypdzi0EswmrgLkw1ADZjq0g%40mail.gmail.com.


Re: [deal.II] ibpetsc.so.3.019 not found

2023-11-29 Thread Wolfgang Bangerth

On 11/29/23 20:51, Jai wrote:
The exeuctable  of step-5 and 15 got generated without error and while 
running, I am getting the following error. ./step-5: error while loading 
shared libraries: libpetsc.so.3.019: cannot open shared object file: No such 
file or directory. How to resolve it. I am using Intel.


Jai: You already asked this in a github issue at
  https://github.com/dealii/dealii/issues/16308
Bruno asked for more information. There is nothing we can help you if you 
simply repeat the question without providing what Bruno already asked for.


Best
 WB

--

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/cc4b73d0-b65e-51f8-d93a-42ed5c23ffae%40colostate.edu.


[deal.II] ibpetsc.so.3.019 not found

2023-11-29 Thread Jai
Hello All,
The exeuctable  of step-5 and 15   got generated without error and while 
running, I am getting the following error. ./step-5: error while loading 
shared libraries: libpetsc.so.3.019: cannot open shared object file: No 
such file or directory. How to resolve it. I am using Intel.
Thanks

-- 
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/8dd45183-c9cd-402f-b021-2fcc02e42296n%40googlegroups.com.


Re: [deal.II] How to find the neighbor of one cell

2023-11-29 Thread Wolfgang Bangerth

On 11/29/23 09:23, Lance Zhang wrote:


//***//
         if(cell->at_boundary()){
           continue;
           }//to check whether the cell exists


I don't think this is what you want. Here, you are only asking whether 
the cell has *any* faces that are at the boundary. But if you want to 
know whether a cell has a neighbor across a certain face, you need to 
ask whether the cell is at the boundary *at that particular face*. 
Daniel's code does that.


Best
 W.

--
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/88a5f345-a088-473e-a893-1ed6736440de%40colostate.edu.


Re: [deal.II] How to find the neighbor of one cell

2023-11-29 Thread Lance Zhang
Hello Daniel,

thanks for your message.

I wrote a statement to check if the cell  exists.


 for (const auto &cell : solid_3d.dof_handler_ref.active_cell_iterators())
  {
//***//
if(cell->at_boundary()){
  continue;
  }//to check whether the cell exists
//**filter if the cell is at boundary ,if yes, the cell 
iterator  will  move forward*//
//***otherwise if the cell exists,the cell index will be 
calculated*//
  const unsigned int cell_index = cell->active_cell_index();

  if (visited_cells[cell_index])
 continue; // Skip if the cell has been visited by its all 
neighbors

  
// Loop over all degrees of freedom on the current cell
for (unsigned int i = 0; i < solid_3d.dofs_per_cell; ++i)

  {
 
// Loop over all neighboring cells
for (unsigned int f = 0; f < cell->n_faces(); ++f)
{
auto neighbor = cell->neighbor(f);//find the neighbor ,but not 
sure if it exists

if(neighbor->at_boundary())
continue;//check if the neighbor of cell exists
int neighbor_index = neighbor->active_cell_index();//get the 
global index of the cell if it exists
Best regards
Lance
On Wednesday, November 29, 2023 at 6:04:45 PM UTC+2 d.arnd...@gmail.com 
wrote:

> Lance,
>
> You would check for the cell being at a boundary first before asking for 
> its neighbor:
>
> // Loop over all neighboring cells
> for (unsigned int f = 0; f < cell->n_faces(); ++f)
> {
> if (cell->at_boundary(f)) 
>   continue;
> auto neighbor = cell->neighbor(f);
> int neighbor_index = neighbor->active_cell_index();//get the 
> global index of the cell if it exists
> [...]
>
>
> Best,
> Daniel
>
> On Wed, Nov 29, 2023 at 9:43 AM Lance Zhang  wrote:
>
>> Hello Wolfgang,
>>
>> thanks for your message.
>>
>> May I know which method or keywords can be used to stand for the 
>> non-existing cell and could I use cell->at_boundary() to check whether 
>> the cell exists or not?
>>
>> I would like to know how we can identify if the object 
>> of 
>> dealii::IteratorRange> 3, false> > >::IteratorOverIterators does not exist. I have tried ==NULL 
>> and nullptr, however, it doe snot work.
>>
>> There is the code snippet below, please take a look:
>>
>>  for (const auto &cell : solid_3d.dof_handler_ref.active_cell_iterators())
>>   {
>>
>> if(cell->at_boundary()){
>>   continue;
>>   }//to check whether the cell exists
>>
>>   const unsigned int cell_index = cell->active_cell_index();
>>
>>   if (visited_cells[cell_index])
>>  continue; // Skip if the cell has been visited by its all 
>> neighbors
>>   
>> // Loop over all degrees of freedom on the current cell
>> for (unsigned int i = 0; i < solid_3d.dofs_per_cell; ++i)
>>   {
>>  
>> // Loop over all neighboring cells
>> for (unsigned int f = 0; f < cell->n_faces(); ++f)
>> {
>> auto neighbor = cell->neighbor(f);//find the neighbor ,but 
>> not sure if it exists
>>
>> if(neighbor->at_boundary())
>> continue;//check if the neighbor of cell exists
>> int neighbor_index = neighbor->active_cell_index();//get the 
>> global index of the cell if it exists
>> ...
>>
>> The whole code can be found via the link :
>> https://github.com/Lancelof2019/cook_membrane_snippet/blob/main/code_snippet.cpp
>>
>> Thanks in advance!
>>
>> Best regards
>> Lance
>>
>> Wolfgang Bangerth  于2023年11月28日周二 01:54写道:
>>
>>>
>>> On 11/27/23 14:52, Lance Zhang wrote:
>>> > 
>>> > May I know how to find the neighbor of a cell?
>>> > 
>>> > Here is one part of my code:
>>> > 
>>> --
>>> > for (const auto &cell : 
>>> solid_3d.get_dof_handler().active_cell_iterators()
>>> > {
>>> >  const unsigned int cell_index = cell->active_cell_index();
>>> > 
>>> >  // Loop over all degrees of freedom on the current cell
>>> >  for (unsigned int i = 0; i < dofs_per_cell.dofs_per_cell; ++i)
>>> >  {
>>> >  // Loop over all neighboring cells
>>> >  for (const auto &neighbor : Find_neighbors?)){
>>>
>>> You can write this as
>>>for (unsigned int f=0; fn_faces(); ++f)
>>>{
>>>  DoFHandler::cell_iterator neighbor = cell->neighbor(f);
>>>  ...
>>>}
>>>
>>> Best
>>>   W.
>>>
>>> -- 
>>> 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 

Re: [deal.II] How to find the neighbor of one cell

2023-11-29 Thread Daniel Arndt
Lance,

You would check for the cell being at a boundary first before asking for
its neighbor:

// Loop over all neighboring cells
for (unsigned int f = 0; f < cell->n_faces(); ++f)
{
if (cell->at_boundary(f))
  continue;
auto neighbor = cell->neighbor(f);
int neighbor_index = neighbor->active_cell_index();//get the
global index of the cell if it exists
[...]


Best,
Daniel

On Wed, Nov 29, 2023 at 9:43 AM Lance Zhang  wrote:

> Hello Wolfgang,
>
> thanks for your message.
>
> May I know which method or keywords can be used to stand for the
> non-existing cell and could I use cell->at_boundary() to check whether
> the cell exists or not?
>
> I would like to know how we can identify if the object
> of dealii::IteratorRange 3, false> > >::IteratorOverIterators does not exist. I have tried ==NULL
> and nullptr, however, it doe snot work.
>
> There is the code snippet below, please take a look:
>
>  for (const auto &cell : solid_3d.dof_handler_ref.active_cell_iterators())
>   {
>
> if(cell->at_boundary()){
>   continue;
>   }//to check whether the cell exists
>
>   const unsigned int cell_index = cell->active_cell_index();
>
>   if (visited_cells[cell_index])
>  continue; // Skip if the cell has been visited by its all
> neighbors
>
> // Loop over all degrees of freedom on the current cell
> for (unsigned int i = 0; i < solid_3d.dofs_per_cell; ++i)
>   {
>
> // Loop over all neighboring cells
> for (unsigned int f = 0; f < cell->n_faces(); ++f)
> {
> auto neighbor = cell->neighbor(f);//find the neighbor ,but not
> sure if it exists
>
> if(neighbor->at_boundary())
> continue;//check if the neighbor of cell exists
> int neighbor_index = neighbor->active_cell_index();//get the
> global index of the cell if it exists
> ...
>
> The whole code can be found via the link :
> https://github.com/Lancelof2019/cook_membrane_snippet/blob/main/code_snippet.cpp
>
> Thanks in advance!
>
> Best regards
> Lance
>
> Wolfgang Bangerth  于2023年11月28日周二 01:54写道:
>
>>
>> On 11/27/23 14:52, Lance Zhang wrote:
>> >
>> > May I know how to find the neighbor of a cell?
>> >
>> > Here is one part of my code:
>> >
>> --
>> > for (const auto &cell :
>> solid_3d.get_dof_handler().active_cell_iterators()
>> > {
>> >  const unsigned int cell_index = cell->active_cell_index();
>> >
>> >  // Loop over all degrees of freedom on the current cell
>> >  for (unsigned int i = 0; i < dofs_per_cell.dofs_per_cell; ++i)
>> >  {
>> >  // Loop over all neighboring cells
>> >  for (const auto &neighbor : Find_neighbors?)){
>>
>> You can write this as
>>for (unsigned int f=0; fn_faces(); ++f)
>>{
>>  DoFHandler::cell_iterator neighbor = cell->neighbor(f);
>>  ...
>>}
>>
>> Best
>>   W.
>>
>> --
>> 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 a topic in the
>> Google Groups "deal.II User Group" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/dealii/XYNlOZYskis/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> dealii+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/dealii/ef1fdaad-0bde-4478-8054-74df1a572c5f%40colostate.edu
>> .
>>
> --
> 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/CADwW6P%3Dy7uJAdD5q8DwpUnK-3iQBgTnVh5ioi-Pr62w54D0ikw%40mail.gmail.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/CAOYDWbL757Zyb9kWNGCUhKDJ38qaVKCt%2BN%2Bq%3Dk46vcdpJ0GUWA%40mail.gmail.com.


Re: [deal.II] Re: merge_triangulation error

2023-11-29 Thread Vinayak Vijay
Hello,

A gentle reminder for this issue. Can someone help me with this?

Thanks
Vinayak

On Monday, November 20, 2023 at 5:09:11 PM UTC+1 Vinayak Vijay wrote:

> Hello Daniel,
>
> Yes, I do. In addition to the files from my first post, here are the files 
> for the issue with replicate_triangulation() function. These files are 
> sufficient to test both merge_triangulation() and replicate_triangulation() 
> functions for my problem.
>
> Thanks
> Vinayak
> On Monday, November 20, 2023 at 4:30:14 PM UTC+1 d.arnd...@gmail.com 
> wrote:
>
>> Vinayak,
>>
>> Would you have a minimal reproducer?
>>
>> Best,
>> Daniel
>>
>> On Mon, Nov 20, 2023 at 4:13 AM Vinayak Vijay  wrote:
>>
>>> Hello,
>>>
>>> I also tried to do the same using the 
>>> GridGenerator::replicate_triangulation(triangulation1,{2},triangulation2) 
>>> function. This should result in a triangulation (triangulation1) to be 
>>> repeated in the three-coordinate axis two times. However, it results in the 
>>> same error.
>>> Please note that the triangulations are with dim=1 and spacedim=2. 
>>>
>>> I am not sure where things are going wrong. Could someone help me with 
>>> this?
>>>
>>> Thanks
>>> Vinayak
>>> On Thursday, November 16, 2023 at 10:05:11 AM UTC+1 Vinayak Vijay wrote:
>>>
 Hello,

 I am trying to merge two triangulations into a single one. However, I 
 am getting the following error:

 An error occurred in line <11736> of file 
 
  
 in function
 void dealii::Triangulation<,  
 >::create_triangulation(const std::vector >&, 
 >const 
 std::vector >&, const dealii::SubCellData&) [with 
 int 
 dim = 1; int spacedim = 3]
 The violated condition was: 
 !(correct(i, j) ^ (neighbor->direction_flag() == 
 (*cell)->direction_flag()))
 Additional information: 
 (none)

 I am using the dealii 9.4.0 version.

 I have attached the two triangulations that need to be merged and the 
 .cc file to reproduce the error. 
 Can someone help me with this?

 Thanks
 Vinayak

>>> -- 
>>> 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/a9aaa852-3ad8-40c7-a0db-87d339c37cb2n%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/c01fd9c1-0b93-401c-9f8e-d91303bf7dcdn%40googlegroups.com.


Re: [deal.II] How to find the neighbor of one cell

2023-11-29 Thread Lance Zhang
Hello Wolfgang,

thanks for your message.

May I know which method or keywords can be used to stand for the
non-existing cell and could I use cell->at_boundary() to check whether the
cell exists or not?

I would like to know how we can identify if the object
of dealii::IteratorRange > >::IteratorOverIterators does not exist. I have tried ==NULL
and nullptr, however, it doe snot work.

There is the code snippet below, please take a look:

 for (const auto &cell : solid_3d.dof_handler_ref.active_cell_iterators())
  {

if(cell->at_boundary()){
  continue;
  }//to check whether the cell exists

  const unsigned int cell_index = cell->active_cell_index();

  if (visited_cells[cell_index])
 continue; // Skip if the cell has been visited by its all
neighbors

// Loop over all degrees of freedom on the current cell
for (unsigned int i = 0; i < solid_3d.dofs_per_cell; ++i)
  {

// Loop over all neighboring cells
for (unsigned int f = 0; f < cell->n_faces(); ++f)
{
auto neighbor = cell->neighbor(f);//find the neighbor ,but not
sure if it exists

if(neighbor->at_boundary())
continue;//check if the neighbor of cell exists
int neighbor_index = neighbor->active_cell_index();//get the
global index of the cell if it exists
...

The whole code can be found via the link :
https://github.com/Lancelof2019/cook_membrane_snippet/blob/main/code_snippet.cpp

Thanks in advance!

Best regards
Lance

Wolfgang Bangerth  于2023年11月28日周二 01:54写道:

>
> On 11/27/23 14:52, Lance Zhang wrote:
> >
> > May I know how to find the neighbor of a cell?
> >
> > Here is one part of my code:
> >
> --
> > for (const auto &cell :
> solid_3d.get_dof_handler().active_cell_iterators()
> > {
> >  const unsigned int cell_index = cell->active_cell_index();
> >
> >  // Loop over all degrees of freedom on the current cell
> >  for (unsigned int i = 0; i < dofs_per_cell.dofs_per_cell; ++i)
> >  {
> >  // Loop over all neighboring cells
> >  for (const auto &neighbor : Find_neighbors?)){
>
> You can write this as
>for (unsigned int f=0; fn_faces(); ++f)
>{
>  DoFHandler::cell_iterator neighbor = cell->neighbor(f);
>  ...
>}
>
> Best
>   W.
>
> --
> 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 a topic in the
> Google Groups "deal.II User Group" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/dealii/XYNlOZYskis/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> dealii+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/ef1fdaad-0bde-4478-8054-74df1a572c5f%40colostate.edu
> .
>

-- 
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/CADwW6P%3Dy7uJAdD5q8DwpUnK-3iQBgTnVh5ioi-Pr62w54D0ikw%40mail.gmail.com.