Re: [deal.II] Unexpected data output with cell data vector

2021-07-09 Thread vachan potluri
>
> You want to use cell->active_cell_index() as the index into the vector. The
> vector should have
>triangulation.n_active_cells()
> as its size. This corresponds to the *local* number of active cells,
> including
> ghost and artificial cells (for which vector entries are then just
> ignored). I
> think step-47 shows this (whether in parallel or not doesn't matter in this
> regard).


Thank you, that clarifies my doubts.

On Sat, 10 Jul 2021 at 08:58, Wolfgang Bangerth 
wrote:

> On 7/7/21 12:08 AM, vachanpo...@gmail.com wrote:
> >
> > Vector temp_vec(gh_vec); // for data output
> > for(auto : dof_handler.active_cell_iterators()){
> >if(!(cell->is_locally_owned())) continue;
> >temp_vec[cell->index()] = gh_vec[cell->global_active_cell_index()];
> > }
> > data_out.add_data_vector(temp_vec, "vector");
> >
> > ... then the output looks as expected. So here I have manually set the
> entries
> > of the temporary vector using cell->index(), rather than letting the
> > constructor do the job. For 1d meshes both seem to produce the same
> output.
> >
> > What is the correct procedure? What kind of cell index does DataOut use
> > internally? Any clarification would be greatly appreciated!
>
> You want to use cell->active_cell_index() as the index into the vector.
> The
> vector should have
>triangulation.n_active_cells()
> as its size. This corresponds to the *local* number of active cells,
> including
> ghost and artificial cells (for which vector entries are then just
> ignored). I
> think step-47 shows this (whether in parallel or not doesn't matter in
> this
> regard).
>
> 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/fafa93e0-9da2-cf5b-b0f9-8bbfd4e1e75c%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/CALAVa_yNWj-50gR9End--K%3DYuAaQSbrdTXxL%2BR69jkPbbdY2wA%40mail.gmail.com.


Re: [deal.II] Unexpected data output with cell data vector

2021-07-09 Thread Wolfgang Bangerth

On 7/7/21 12:08 AM, vachanpo...@gmail.com wrote:


Vector temp_vec(gh_vec); // for data output
for(auto : dof_handler.active_cell_iterators()){
   if(!(cell->is_locally_owned())) continue;
   temp_vec[cell->index()] = gh_vec[cell->global_active_cell_index()];
}
data_out.add_data_vector(temp_vec, "vector");

... then the output looks as expected. So here I have manually set the entries 
of the temporary vector using cell->index(), rather than letting the 
constructor do the job. For 1d meshes both seem to produce the same output.


What is the correct procedure? What kind of cell index does DataOut use 
internally? Any clarification would be greatly appreciated!


You want to use cell->active_cell_index() as the index into the vector. The 
vector should have

  triangulation.n_active_cells()
as its size. This corresponds to the *local* number of active cells, including 
ghost and artificial cells (for which vector entries are then just ignored). I 
think step-47 shows this (whether in parallel or not doesn't matter in this 
regard).


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/fafa93e0-9da2-cf5b-b0f9-8bbfd4e1e75c%40colostate.edu.


Re: [deal.II] About setting up a new project

2021-07-09 Thread Hyun-Geun Shin
I made some mistakes, but I have the file.Thank you. 2021년 7월 9일 (금) 오후 6:00, Wolfgang Bangerth 님이 작성:On 7/9/21 9:26 AM, Hyun-Geun Shin wrote:> The error is CMake Error at> > /usr/local/share/deal.II/macros/macro_deal_ii_invoke_autopilot.cmake:54 > (ADD_EXECUTABLE):> > Cannot find source file:> > new.ccHyun-Geun: Is there such a file 'new.cc'? If not, the error message is quite clear.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/10bd5508-a6ae-3afe-f198-be9d0ce20d93%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/E5E4C319-A8FF-4D60-8466-1D7771BC62C3%40hxcore.ol.


Re: [deal.II] About setting up a new project

2021-07-09 Thread Wolfgang Bangerth

On 7/9/21 9:26 AM, Hyun-Geun Shin wrote:

The error is CMake Error at

/usr/local/share/deal.II/macros/macro_deal_ii_invoke_autopilot.cmake:54 
(ADD_EXECUTABLE):


Cannot find source file:

new.cc


Hyun-Geun: Is there such a file 'new.cc'? If not, the error message is quite 
clear.


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/10bd5508-a6ae-3afe-f198-be9d0ce20d93%40colostate.edu.


[deal.II] About setting up a new project

2021-07-09 Thread Hyun-Geun Shin
Hello I am making a new project using one of examples.So, I copied the folder of an example. Let me say the project name is “new”.I opened CMakeLists.txt and I wrote “SET(TARGET “new”) in the sixth line.Then, I typed “cmake .” but I have some error.The error is CMake Error at /usr/local/share/deal.II/macros/macro_deal_ii_invoke_autopilot.cmake:54 (ADD_EXECUTABLE): Cannot find source file:new.cc Please help me set up a new project. Best regards Hyungeun   



-- 
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/6E030E9D-B011-4141-95DD-259229F66062%40hxcore.ol.


Re: [deal.II] New location for sacado.hpp

2021-07-09 Thread Matthew Rich
OK now I am finally all set. 

For other people who had this issue I needed to run CMAKE with the 
following flags

cmake -/"install dir" /"location of deal.ii source",  -DDEAL_II_WITH_MPI=ON 
-DDEAL_II_TRILINOS_WITH_SACADO=ON, -DTRILINOS_DIR=/usr/

without the sacado flag it does not work 


On Thursday, 8 July 2021 at 13:40:52 UTC-4 Matthew Rich wrote:

> So I thought I was in good shape. I had cmake run with the proper flags 
> and everything and built deal.ii
>
> But.
>
> I tried to build step-33 and got the following 
>
> -- Using the deal.II-9.3.1 installation found at /usr/local/deal.II
> -- Include macro 
> /usr/local/deal.II/share/deal.II/macros/macro_deal_ii_add_test.cmake
> -- Include macro 
> /usr/local/deal.II/share/deal.II/macros/macro_deal_ii_initialize_cached_variables.cmake
> -- Include macro 
> /usr/local/deal.II/share/deal.II/macros/macro_deal_ii_invoke_autopilot.cmake
> -- Include macro 
> /usr/local/deal.II/share/deal.II/macros/macro_deal_ii_pickup_tests.cmake
> -- Include macro 
> /usr/local/deal.II/share/deal.II/macros/macro_deal_ii_query_git_information.cmake
> -- Include macro 
> /usr/local/deal.II/share/deal.II/macros/macro_deal_ii_setup_target.cmake
> CMake Error at CMakeLists.txt:44 (MESSAGE):
>   
>
>   Error! This tutorial requires a deal.II library that was configured with
>   the following options:
>
>   DEAL_II_WITH_MUPARSER = ON
>   DEAL_II_TRILINOS_WITH_SACADO = ON
>
>   However, the deal.II library found at /usr/local/deal.II was configured
>   with these options:
>
>   DEAL_II_WITH_MUPARSER = ON
>   DEAL_II_TRILINOS_WITH_SACADO = 
>
>   This conflicts with the requirements.
>
>
> -- Configuring incomplete, errors occurred!
> I tried to redo cmake with this DEAL_II_TRILINOS_WITH_SACADO but it 
> doesn't exist. I can run with -DDEAL_II_WITH_TRILINOS=ON but that does not 
> appear to be sufficent. In the log cmake finds Sacado. I am not sure what 
> to do...
>
>
> On Wednesday, 7 July 2021 at 15:16:38 UTC-4 Jean-Paul Pelteret wrote:
>
>> Hi Matthew,
>>
>> Great, I’m glad to hear that! 
>>
>> So my last question is what is the difference between a flag being ON vs 
>> set up with external dependencies ( which is what trilinos is set at now) 
>>
>>
>> When you set one of these flags to “ON”, you are demanding from CMake 
>> that this option be enabled and expect that the associated package must be 
>> set up correctly. Similarly, when the flag is set to “OFF” then the 
>> auto-detection for that package will be skipped (and, even if you tell 
>> deal.II where that library is by providing its path, it will ignore it 
>> anyway). When you leave flag this out altogether  you rely on the 
>> auto-detection mechanism to find the package and if it cannot be found (or 
>> there’s some detected compatibility issue) then you give CMake the leeway 
>> to disable and ignore this package. So, in summary, it just gives the 
>> granularity to say “Yes, I definitely want this dependency enabled” or “No, 
>> under all circumstances ignore this optional dependency” or “if you find it 
>> and it works, then I want this enabled".
>>
>> When the package is said to be an "external dependency”, then it just 
>> means that the user or OS has provided said package. We bundle a few 
>> mandatory packages ourselves (e.g. the boost libraries), so that if the 
>> user hasn’t got them installed then we can fall back to these packages that 
>> are maintained within deal.II itself. 
>>
>> Will I be able to run those tutorials now? or is there still more work to 
>> be done. 
>>
>>
>> For step-72 and step-33, I’d say yes
>>
>> https://github.com/dealii/dealii/blob/master/examples/step-72/CMakeLists.txt#L40-L51
>>
>> https://github.com/dealii/dealii/blob/master/examples/step-33/CMakeLists.txt#L43-L53
>>
>> But to run step-71 you’ll also need to install SymEngine
>>
>> https://github.com/dealii/dealii/blob/master/examples/step-71/CMakeLists.txt#L40-L54
>>
>> I don’t think that there’s an Ubuntu package for that yet, but it’s not 
>> too hard to install by hand. You can take a look at their GitHub page for 
>> build instructions. At the bottom of the page there is their "Recommended 
>> options to build”, which you might want to take note of.
>> https://github.com/symengine/symengine
>>
>> Best,
>> Jean-Paul
>>
>> On 7. Jul 2021, at 20:49, Matthew Rich  wrote:
>>
>> Thanks that worked! 
>>
>> I needed to install the full trilinos-all-dev to get all the packages. I 
>> also needed to install libptscotch-dev. 
>>
>> So my last question is what is the difference between a flag being ON vs 
>> set up with external dependencies ( which is what trilinos is set at now) 
>>
>> Will I be able to run those tutorials now? or is there still more work to 
>> be done. 
>>
>> Thank you for all your help resolving this issue. 
>>
>>
>>
>> On Wednesday, 7 July 2021 at 14:36:36 UTC-4 Jean-Paul Pelteret wrote:
>>
>>> Hi again Matthew,
>>>
>>> I’ve also found this build log for the Debian deal.II apt