Re: [deal.II] Re: gmsh imported into dealii

2024-06-14 Thread Luca Heltai
Do you have gmsh api installed? If you do, there is another function with the same name, where you can specify labels to assign interior manifold ids explicitly, and set the interior boundary id to “-1”. There is an example in the documentation on how to do this. LucaIl giorno 14 giu 2024, alle ore 05:01, 王艺康  ha scritto:I tried to do this, but it was still wrong. I draw the interface of the fluid-solid coupling without imposing any physical labels. It still doesn't pass the GridinOn Friday, June 14, 2024 at 10:28:41 AM UTC+8 hkch...@gmail.com wrote:You should not add Physical Surface("inner wall surface", 776) of interface in gmsh,This interface can be determined by the step-46, this is the drawback of dealii as I know.王艺康  于2024年6月13日周四 14:27写道:Hello,Sure. I just use GridIN to read the grid.using namespace dealii;void run(){    Triangulation<3> triangulation;    GridIn<3> grid_in;    grid_in.attach_triangulation(triangulation);    {        std::string   filename = "heart_have_thickness(1).msh";        std::ifstream file(filename);        Assert(file, ExcFileNotOpen(filename.c_str()));        grid_in.read_msh(file);    }} int main() {     run(); }On Wednesday, June 12, 2024 at 10:46:04 PM UTC+8 blais...@gmail.com wrote:Can you provide the GMSH code and a small executable that tries to achieve what you are doing? I can take a look and figure out what is the issue :)On Wednesday, June 12, 2024 at 3:08:19 a.m. UTC-4 yikangw...@gmail.com wrote:Hollo,I tried your suggestion but dealii still reports an error. I don't think it has anything to do with the grid type, it also errors when I only use Gridin.WangOn Friday, June 7, 2024 at 11:32:16 PM UTC+8 blais...@gmail.com wrote:Loading a tet mesh works if you set-up your Mapping/FE accordingly, this is a feature we use extensively.On Wednesday, June 5, 2024 at 1:28:20 p.m. UTC+1 bruno.t...@gmail.com wrote:Wang,Are you loading a hex mesh or a tet mesh? I don't know if loading a tet mesh works.Best,BrunoLe mar. 4 juin 2024 à 21:12, 王艺康  a écrit :Bruno,In fact that's what I did. The error is the same for regenerated meshes entered into dealii. I redrew a simple geometry again without defining any physical information still the same error. I don't understand why this is wrong, if I generate only the fluid-solid coupling interface to the external contour (solid domain) mesh there is no problem, but the same error occurs when I generate only the internal (fluid domain).WangOn Tuesday, June 4, 2024 at 10:28:21 PM UTC+8 bruno.t...@gmail.com wrote:Wang,Do you have a geo file that describes the geometry? Can you remove the "Physical Surface" lines in the geo file and regenerate the mesh.Best,BrunoLe mar. 4 juin 2024 à 10:13, 王艺康  a écrit :Hello,Thank you very much for your reply. That's what I thought at first, but I was wrong, when I removed the corresponding physical group it was still the same error. I think gmsh automatically sets the coupling interface to solid when drawing the model body mesh, but I don't know how to change it. I didn't learn gmsh deep enough.WangOn Tuesday, June 4, 2024 at 8:28:07 PM UTC+8 bruno.t...@gmail.com wrote:Hello,Deal.II associates the physical group of a face with a boundary id. You need to remove the physical group that are associated with interior faces.Best,BrunoOn Tuesday, June 4, 2024 at 3:28:05 AM UTC-4 yikangw...@gmail.com wrote:I drew the model in gmsh but importing to dealii is giving me an error.This step error occurs when importing a model.The violated condition was:     boundary_id != numbers::internal_face_boundary_idAdditional information:     The input arguments for creating a triangulation specified a boundary    id for an internal face. This is not allowed.Here only a part of the mesh is shown (the outer contour also generates the mesh),the error should occur at the interface of the two bodies, but I don't know how to fix it. This model will be used for fluid-solid coupling, where the interior is the fluid domain and the contours are the solid domain.



-- 
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/WD4qeXgUf0E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dealii+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/6658e3cb-5f21-46a4-ab4f-08bbed3fa975n%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 a topic in the Google Groups "deal.II User Group" group.
To unsubscribe from this topic, visit 

Re: [deal.II] Discrepancy in Computing the Inf-Sup Constants Using Matlab and deal.II

2024-06-02 Thread Luca Heltai
To be more specific, you can use inverse_operator, to which you pass A, a solver, and a preconditioner, and it returns an operator the applies the inverse of A to a vector. Just as your mass inverse.LucaIl giorno 2 giu 2024, alle ore 11:25, Luca Heltai  ha scritto:Dear Najwa, You don’t need to create the inverse of A. Just its action, pretty much in the exact same way you did for the mass matrix, but replacing the inverse operator done with umfpack with one done with CG. LucaIl giorno 2 giu 2024, alle ore 09:42, Najwa Alshehri  ha scritto:Wolfgang and all,I have a positive definite matrix M, and its inverse can be quickly and easily found in deal.II using the following lines:M_inv_umfpack.initialize(M);  auto M  = linear_operator(M);  auto M_inv = linear_operator(M, M_inv_umfpack);However, when solving the direct system, I need to provide the inverse of AA to the Arpack solver. This requires solving the system using the Conjugate Gradient (CG) method a number of times equal to the size of AA. As the mesh is refined, this size increases, and depending on the finite element method (FE) I am using, it could be even larger.While I have been able to obtain at least the first three results for many FEs I am testing which is enough for the current study, I am seeking a faster solution for a general eigenvalue problem of the same type. If anyone has suggestions for a more efficient approach to finding the inverse of AA, I would greatly appreciate it.One more time, you have always been great supporters. This group is very useful. Thank you to you Wolfgang, to Mathias for the answer, and to all members and developers of deal.ii.Best regards,NajwaOn Saturday, June 1, 2024 at 11:57:45 PM UTC+3 Wolfgang Bangerth wrote:On 6/1/24 14:49, Najwa Alshehri wrote:
> 
> I decided to solve the exact problem directly, namely AA x = \lambda M x. To 
> achieve this, I computed the inverse of the matrix AA= Bt * A^inv *  B using a 
> Conjugate Gradient (CG) solver. Subsequently, I solved for the exact 
> eigenvalues, and to my satisfaction, I obtained results that aligned with 
> those obtained from MATLAB.
> 
> If anyone has insights into why solving for the reciprocal yields different 
> results, I would greatly appreciate your input on this matter.

Najwa,
I'm glad you figured it out because I don't really have a good idea about what 
ARPACK does. Typically,
   AA x = \lambda M x
is solved in exactly this way because M may be a matrix that is singular. In 
many applications (not sure whether yours is one of those), M is a matrix that 
can have a large null-space -- for example, if you are computing eigenvalues 
of the Stokes operator, in some applications you have that M = [M_u 0 ; 0 0],
that is, it has a large null block on all pressures. This matrix is not 
invertible, whereas AA is. By convention, the invertible matrix is kept on the 
left side of the eigenvalue equation.

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/e448210c-be8d-4460-8b41-27a4425f7accn%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/26F15033-7906-4F4F-8FC6-30BDD7422121%40gmail.com.


Re: [deal.II] Discrepancy in Computing the Inf-Sup Constants Using Matlab and deal.II

2024-06-02 Thread Luca Heltai
Dear Najwa, You don’t need to create the inverse of A. Just its action, pretty much in the exact same way you did for the mass matrix, but replacing the inverse operator done with umfpack with one done with CG. LucaIl giorno 2 giu 2024, alle ore 09:42, Najwa Alshehri  ha scritto:Wolfgang and all,I have a positive definite matrix M, and its inverse can be quickly and easily found in deal.II using the following lines:M_inv_umfpack.initialize(M);  auto M  = linear_operator(M);  auto M_inv = linear_operator(M, M_inv_umfpack);However, when solving the direct system, I need to provide the inverse of AA to the Arpack solver. This requires solving the system using the Conjugate Gradient (CG) method a number of times equal to the size of AA. As the mesh is refined, this size increases, and depending on the finite element method (FE) I am using, it could be even larger.While I have been able to obtain at least the first three results for many FEs I am testing which is enough for the current study, I am seeking a faster solution for a general eigenvalue problem of the same type. If anyone has suggestions for a more efficient approach to finding the inverse of AA, I would greatly appreciate it.One more time, you have always been great supporters. This group is very useful. Thank you to you Wolfgang, to Mathias for the answer, and to all members and developers of deal.ii.Best regards,NajwaOn Saturday, June 1, 2024 at 11:57:45 PM UTC+3 Wolfgang Bangerth wrote:On 6/1/24 14:49, Najwa Alshehri wrote:
> 
> I decided to solve the exact problem directly, namely AA x = \lambda M x. To 
> achieve this, I computed the inverse of the matrix AA= Bt * A^inv *  B using a 
> Conjugate Gradient (CG) solver. Subsequently, I solved for the exact 
> eigenvalues, and to my satisfaction, I obtained results that aligned with 
> those obtained from MATLAB.
> 
> If anyone has insights into why solving for the reciprocal yields different 
> results, I would greatly appreciate your input on this matter.

Najwa,
I'm glad you figured it out because I don't really have a good idea about what 
ARPACK does. Typically,
   AA x = \lambda M x
is solved in exactly this way because M may be a matrix that is singular. In 
many applications (not sure whether yours is one of those), M is a matrix that 
can have a large null-space -- for example, if you are computing eigenvalues 
of the Stokes operator, in some applications you have that M = [M_u 0 ; 0 0],
that is, it has a large null block on all pressures. This matrix is not 
invertible, whereas AA is. By convention, the invertible matrix is kept on the 
left side of the eigenvalue equation.

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/e448210c-be8d-4460-8b41-27a4425f7accn%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/9418C7C6-D6E9-4BFE-96CC-EAB9C9C122D5%40gmail.com.


Re: [deal.II] Matrix Free alternatives in dealii

2024-05-18 Thread Luca Heltai
Dear Felipe,Gmres (and all other iterative methods) in deal.Ii is already matrix free. It never accesses the matrix , only its matrix vector method.  FMM has already been implemented in deal.II and it is available in the repository pi-BEM. Take a look there for inspiration. If you know how to compute the action of your fmm method, just assign it to a LinearOperator object ‘vmult’ function, and then call gmres with that:auto FMM = linear_operator(exemplar_matrix);FMM.vmult = [&](auto , const auto ) {// call here what you need to set dst equal to the action of FMM on src}Now you can use FMM with gmres. Best,Luca. Il giorno 18 mag 2024, alle ore 07:38, Felipe Ponce  ha scritto:



















I am implementing a Fast Multipole Method (FMM) in deal ii.
I do not want to store a dense matrix, but lower rank matrices and to
 use matrix free methods. By now, I store the elements of the low-rank 
matrices, and I want to retrieve them to compute the action of the 
operator in a vector.
What is the easiest way to implement a matrix free solver with GMRES (non-symmetric matrix)?
I have considered the MatrixFree class and also the Trilinos Wrapper.
 However, the MatrixFree class seems to be implemented for parallel 
computing the elements of the matrix on the fly (I am happy with a 
look-up table), and Trilinos is a bit scary for me (I can try if no 
other option). Am I forced to use parallel computing to get access to 
Matrix Free algorithms in deal 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/58416b47-4e76-426e-81f5-a37dc4dae150n%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/4584228D-CE21-4936-9B88-3435CB2C3092%40gmail.com.


Re: [deal.II] Importing nodal BCs and accessing vertices

2024-04-11 Thread Luca Heltai
If you have access to the DG, you can call dh.get_triangulation().n_active_cells(). Take a look at the tests subdirectory to find more inspiration on more ways to exploit your information. For example, I’d use DoFTools::map_dofs_to_support_points, use that to generate an r tree of indices, and then just ask for the one nearest neighbor (in the tests subdirectory there are a few examples that show how to do this for collections of points). LucaIl giorno 11 apr 2024, alle ore 15:43, Alex Quinlan  ha scritto:Hi Wolfgang,I've gotten an R-tree subroutine set up for applying my boundary conditions based on rtree_8h.html.  It seems to work, but I have a couple difficulties that I've highlighted in red. Hopefully, others might find use in my adaptation of the example and in my questions.My subroutine takes the following arguments: the DOF handler, the constraints object, and a vector of a custom nBC structure for holding the nodal boundary conditions that I've read from the file.template void nodal_bcs_rtree(    std::vector   &  nBCs,  dealii::DoFHandler   &  dof_handler,   		  dealii::AffineConstraints  & constraints ) {   namespace bgi = boost::geometry::index;   //  Create the R-tree ---   std::vector> all_boxes(10);  //  TODO Need a way to set the correct size for this   std::vector >> cell_list(10);   unsigned int i = 0;   for (const auto  : dof_handler.active_cell_iterators())	 if (cell->is_locally_owned())	 {	   all_boxes[i] = cell->bounding_box();  // prepare the bounding boxes to be packed into the r-tree	   cell_list[i++] = cell;    // create a corresponding vector of cells accessors	 }	const auto idx_tree  = pack_rtree_of_indices(all_boxes);   //  Search the R-tree    const double nrad = 1e-5;  // Tolerance on vertex position TODO make relative to cell size   for (nBC bc : nBCs)	{	    std::vector closest_cell_idx;	    idx_tree.query(bgi::nearest(bc.coords,1), std::back_inserter(closest_cell_idx));  // bc.coords is type Point<3>	    if (closest_cell_idx[0] < i-1)  // Check that the cell index number will correspond to an actual cell in cell_list	    {	    	const auto cell = cell_list[closest_cell_idx[0]];	    	for (unsigned int v = 0; vn_vertices() ; v++)		{			   if (cell->vertex(v).distance(bc.coords) < nrad)			   { ~~~Apply constraints ~~~ }  }    }    }}1) I'm having trouble getting the number of cells, and then sizing my vectors appropriately.  From what I can see, the DoFHandler won't provide the number of cells, only the number of DoFs.  In the short term, I've just thrown in the number 100,000 as the vector size.  In the example ( https://www.dealii.org/current/doxygen/deal.II/rtree_8h.html ), the line:    std::vector> all_boxes(tria.n_locally_owned_active_cells());gets used to set the vector size.  From within my subroutine, I don't have access to the triangulation object. Am I missing a way to get "n_locally_owned_active_cells" from the DoFHandler?  Or should I just pass this value in as an argument to my subroutine?2) Does my approach of creating vectors to hold the bounding boxes and the cell pointers make sense?  Is there a better way to get access to the cell once I've determined the BoundingBox index from the R-tree?3) Somewhat related to question 1, is there a way to check that the 'closest_cell' was actually found?  I had an issue with MPI where the target point 'bc.coords' was outside the bounding box of some processes, resulting in some errors.  I set this (closest_cell_idx[0] < i-1) to check that an actual BoundingBox was found.Thanks for your suggestion on the R-tree.  I'd welcome any critiques of my implementation.Cheers,AlexOn Wednesday, November 15, 2023 at 8:35:49 AM UTC-5 Alex Quinlan wrote:Thanks, Wolfgang.  I will abide by those guidelines.On Tuesday, November 14, 2023 at 10:15:29 PM UTC-5 Wolfgang Bangerth wrote:On 11/14/23 16:25, Alex Quinlan wrote:
> 
> I'm curious what your thoughts are on this approach.  I imagine it could have 
> an advantage in some situations, depending on the size of the mesh and the 
> number of constraints to be added.
> 
> I have not done any speed testing on this yet, tho.  Do you think it would be 
> looking into?  Or do you see some fatal flaw with this approach?

Alex:
the general approach most professional programmers will ascribe to is to write 
a version of the code that is intelligible and easy to maintain. Only then do 
you worry about speed. If the code in question is fast enough (say at most of 
few percent up to 20% of the program's run time -- as measured with a class 
such as TimerOutput), then it's not worth worrying about it.

So the questions you're asking are premature. Make the code work what it is 
you want it to do, and then you can think about its performance.

Best
  W.

-- 

Wolfgang 

Re: [deal.II] Gridin_COMSOL_mphtxt cannot import my mesh

2024-03-06 Thread Luca Heltai
If I understood correctly, you are trying to import a two-dimensional grid 
embedded in a three dimensional space. Does your code work if you use a 
Triangulation<2,3>?

The error you show indicates you are using a Triangulation<3>. 

Luca

> Il giorno 7 mar 2024, alle ore 08:11, Wolfgang Bangerth 
>  ha scritto:
> 
> On 3/5/24 23:03, Yufei Fang wrote:
>> "
>> void run3D()
>> {
>> Triangulation<3> triangulation;
>> GridIn<3> grid_in;
>> grid_in.attach_triangulation(triangulation);
>> std::ifstream input_file("../resource/3D.mphtxt");
>> grid_in.read_comsol_mphtxt(input_file);
>> std::ofstream out("grid3D.vtk");
>> GridOut   grid_out;
>> grid_out.write_vtk(triangulation, out);
>> std::cout << "Grid written to grid.vtk" << std::endl;
>> }
>> int main()
>> {
>> run3D();
>> }
>> "
>> the error is:
>> "
> 
> This looks reasonable. Can you send us the 3D.mphtxt file?
> 
> 
>> 2. the tutorial said triangular and tetrahedral cannot be imported in 
>> dealii, but i can import triangular or tetrahedral element by 
>> gridin_COMSOL_mphtxt, is it controdicory?
> 
> deal.II used to use only quadrilaterals and hexahedra until not so long ago, 
> so the statement about not supporting triangular and tetrahedral meshes was 
> correct. But it is no longer; can you point out where exactly you found this 
> statement?
> 
> 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/d85193f8-5cd8-4dca-bb96-faabacc0ee9c%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/A7FF1712-EFAE-4062-A7F0-AF5F0455B122%40gmail.com.


Re: [deal.II] Error of Installing Deal.ii 9.5.2 on Intel-based Mac Devices

2024-02-04 Thread Luca Heltai
Dear Lex, 

I see you are using a spack installed version of the dmg package.

What package version is this? What OS version do you have (i.e., is this 
sonoma?). If you upgraded to sonoma, and are still using the old package, this 
cannot work, since the compiler has changed with the upgrade. 

If you use the 9.5.2 package, deal.II comes pre-installed. Does that work for 
you?

L.

> On 3 Feb 2024, at 21:35, Lex Lee  wrote:
> 
> I got the following error messages
> 
> 
> -- Detecting CXX compiler ABI info - failed
> -- Check for working CXX compiler: 
> /Applications/deal.II.app/Contents/Resources/spack/lib/spack/env/clang/clang++
> -- Check for working CXX compiler: 
> /Applications/deal.II.app/Contents/Resources/spack/lib/spack/env/clang/clang++
>  - broken
> CMake Error at 
> /usr/local/Cellar/cmake/3.28.2/share/cmake/Modules/CMakeTestCXXCompiler.cmake:60
>  (message):
>   The C++ compiler
> 
> 
> "/Applications/deal.II.app/Contents/Resources/spack/lib/spack/env/clang/clang++"
> 
>   is not able to compile a simple test program.
> 
>   It fails with the following output:
> 
> Change Dir: 
> '/Applications/deal.II.app/Contents/Resources/Libraries/share/deal.II/examples/step-32/CMakeFiles/CMakeScratch/TryCompile-Fkp1zK'
> 
> Run Build Command(s): /usr/local/Cellar/cmake/3.28.2/bin/cmake -E env 
> VERBOSE=1 /usr/bin/make -f Makefile cmTC_e8efc/fast
> /Library/Developer/CommandLineTools/usr/bin/make  -f 
> CMakeFiles/cmTC_e8efc.dir/build.make CMakeFiles/cmTC_e8efc.dir/build
> Building CXX object CMakeFiles/cmTC_e8efc.dir/testCXXCompiler.cxx.o
> 
> /Applications/deal.II.app/Contents/Resources/spack/lib/spack/env/clang/clang++
> -o CMakeFiles/cmTC_e8efc.dir/testCXXCompiler.cxx.o -c 
> /Applications/deal.II.app/Contents/Resources/Libraries/share/deal.II/examples/step-32/CMakeFiles/CMakeScratch/TryCompile-Fkp1zK/testCXXCompiler.cxx
> [spack cc] ERROR: Spack compiler must be run from Spack! Input 
> 'SPACK_ENV_PATH' is missing.
> make[1]: *** [CMakeFiles/cmTC_e8efc.dir/testCXXCompiler.cxx.o] Error 1
> make: *** [cmTC_e8efc/fast] Error 2
> 
> 
> 
>   
> 
>   CMake will not be able to correctly generate this project.
> Call Stack (most recent call first):
>   CMakeLists.txt:58 (project)
> 
> 
> What happened? Thank you for your valuable time.
> 
> -- 
> 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/8b2f0f8e-7b7e-4a66-9853-6b2e8b909820n%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/A95D4F7D-E073-4503-88B7-3DB9C0EB9659%40gmail.com.


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

2024-01-04 Thread Luca Heltai
Can you post the detailed.log file?LucaIl giorno 5 gen 2024, alle ore 03:48, Praveen C  ha scritto:spack location -i cgal/home/spack/opt/spack/linux-opensuse15-broadwell/gcc-12.3.0/cgal-5.5.2-6umjskepmayihkexoscjiovjmtgo5toydoes return the correct directory, which containsCGAL/include, etc., and they do have the include files.I have tried directly putting the cgal directory path also, it does not help. My configure script which is below, works fine in finding all directories, except cgal.Thankspraveen`spack location -i cmake`/bin/cmake  \
-DCMAKE_INSTALL_PREFIX=$DEAL_II_DIR \
-DCMAKE_FIND_FRAMEWORK=LAST  \
-DCMAKE_BUILD_TYPE=DebugRelease  \
-DDEAL_II_COMPONENT_EXAMPLES=ON  \
-DDEAL_II_COMPILE_EXAMPLES=OFF \
-DDEAL_II_WITH_LAPACK=ON \
-DLAPACK_INCLUDE_DIRS=`spack location -i openblas`/include  \
-DLAPACK_LIBRARIES=`spack location -i openblas`/lib/${LAPACK_LIBRARY}  \
-DBOOST_DIR=`spack location -i boost`  \
-DDEAL_II_WITH_ARBORX=ON \
-DARBORX_DIR=`spack location -i arborx`  \
-DMUPARSER_DIR=`spack location -i muparser`  \
-DUMFPACK_DIR=`spack location -i suite-sparse`  \
-DTBB_DIR=`spack location -i intel-tbb`  \
-DZLIB_DIR=`spack location -i zlib-ng`  \
-DDEAL_II_WITH_MPI:BOOL=ON  \
-DCMAKE_C_COMPILER=$MPI_DIR/bin/mpicc  \
-DCMAKE_CXX_COMPILER=$MPI_DIR/bin/mpic++  \
-DCMAKE_Fortran_COMPILER=$MPI_DIR/bin/mpif90  \
-DDEAL_II_CXX_FLAGS="-march=native -mtune=native -std=c++17" \
-DDEAL_II_CXX_FLAGS_RELEASE="-O3" \
-DGSL_DIR=`spack location -i gsl`  \
-DDEAL_II_WITH_GSL:BOOL=ON  \
-DCGAL_DIR=`spack location -i cgal`  \
-DDEAL_II_WITH_CGAL:BOOL=ON  \
-DHDF5_DIR=`spack location -i hdf5`  \
-DDEAL_II_WITH_HDF5:BOOL=ON  \
-DP4EST_DIR=`spack location -i p4est`  \
-DDEAL_II_WITH_P4EST:BOOL=ON  \
-DPETSC_DIR=`spack location -i petsc`  \
-DDEAL_II_WITH_PETSC:BOOL=ON  \
-DSLEPC_DIR=`spack location -i slepc`  \
-DDEAL_II_WITH_SLEPC:BOOL=ON  \
-DTRILINOS_DIR=`spack location -i trilinos`  \
-DDEAL_II_WITH_TRILINOS:BOOL=ON  \
-DMETIS_DIR=`spack location -i metis`  \
-DDEAL_II_WITH_METIS:BOOL=ON  \
-DDEAL_II_COMPONENT_DOCUMENTATION=OFF  \
-DARPACK_DIR=`spack location -i arpack-ng`  \
-DDEAL_II_WITH_ARPACK=ON  \
-DDEAL_II_ARPACK_WITH_PARPACK=ON  \
-DOPENCASCADE_DIR=`spack location -i oce`  \
-DDEAL_II_WITH_OPENCASCADE=ON  \
-DGMSH_DIR=$GMSH_DIR \
-DDEAL_II_WITH_GMSH=$DEAL_II_WITH_GMSH  \
-DASSIMP_DIR=`spack location -i assimp`  \
-DDEAL_II_WITH_ASSIMP=ON  \
-DSUNDIALS_DIR=`spack location -i sundials`  \
-DDEAL_II_WITH_SUNDIALS=ON  \
-DADOLC_DIR=`spack location -i adol-c`  \
-DDEAL_II_WITH_ADOLC=ON  \
-DSCALAPACK_DIR=`spack location -i netlib-scalapack`  \
-DDEAL_II_WITH_SCALAPACK=ON  \
-DDEAL_II_WITH_GINKGO=ON  \
-DGINKGO_DIR=`spack location -i ginkgo`  \
-DDEAL_II_WITH_SYMENGINE=ON  \
-DSYMENGINE_DIR=`spack location -i symengine`  \
../




-- 
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/34DB1C30-B69D-4121-9FF8-1D934702C925%40gmail.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/A1F7C697-C559-4F3C-8232-141DB3C1EACB%40gmail.com.


Re: [deal.II] extract_surface_mesh() does not extract refined cells

2023-12-05 Thread Luca Heltai
By the way: Sorry if my reply was not too precise at the beginning, and if it sound harsh, but I cannot not run your code on my iPhone (yet), even though I’m working on it. :) Till then, may I suggest that you provide as much information as you can, if you want people to answer quickly? Asking people to download the code, put it somewhere where deal.II is available and then running it and debugging it is unlikely to produce a quick answer other than “can you tell us more?”.LucaIl giorno 5 dic 2023, alle ore 9:25 PM, Simon Wiesheier  ha scritto:Dear Luca,the program I provided writes the volume mesh as well as the surface mesh to vtk files.If you compare these files, for instance in paraview, you will see that the locally refined cells are not extracted.Best,SimonAm Di., 5. Dez. 2023 um 21:14 Uhr schrieb Luca Heltai <luca.hel...@gmail.com>:Dear Simon, What do you mean by “demonstrates”? The function you refer to is supposed to work with locally refined grids. What is the behavior you observe? What error do you get?You will have to map dofs on the surface to dofs on the bulk manually. The output of the function only returns a map of tria iterators to face iterators, not dof to dof.LucaIl giorno 5 dic 2023, alle ore 2:23 PM, Simon <simon.wieshe...@gmail.com> ha scritto:Dear all,attached is a minimal example which demonstrates that the function "extract_surface_mesh()" in the GridGenerator namespace does not extract refined cells. That is, it seems to work only for globally refined meshes. There is a comment in the implementation of this function:// Create boundary mesh and mapping// from only level(0) cells of the volume mesh.Since the documentation states nothing about the usage of this function for adaptivelyrefined meshes (like it is done in flatten_triangulation, for instance), I am not sure whether this is desired behavior or not.In my case, I probably do not need the full power of this function. All I want to do is to "copy" the solution values on a surface of the volume mesh to a surface mesh, and to associate a DoFHandler object to the surface meshthat allows me to do further postprocessing.So I do not care about the boundary and manifold id as wellas the return type, however, my volume mesh may contain hanging nodes.Best regards,Simon



-- 
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/f3252992-4761-41b1-a691-05c5265f89bfn%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/AB275257-5021-4A2C-ACA1-C2A44D8FB070%40gmail.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/CAM50jEvtuTu_vUKmg-mTGQC7tdk4v6YE7TayaA6cjnrWjqa3Zg%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/29F05081-782C-4BDB-B200-A040539152A7%40gmail.com.


Re: [deal.II] extract_surface_mesh() does not extract refined cells

2023-12-05 Thread Luca Heltai
The fact that the vtk file does not contain the refined cells does not necessarily mean that they are not extracted. If you look at the source code of the function, you will see that it generates the coarse surface mesh based on the coarse boundary ids to extract, and then it loops over all cells, and if they are refined, it flags the corresponding surface cells for refinement till the refinementa are the same. You are setting boundary ids on the refined grid (not on the coarse grid), and these are not there on the coarse cells, so there is nothing to refine when the bulk cell is refined. Can you try removing the set_boundary_id, and verify if this generates a grid with refinement ?This could be the issue. The coarse ids do not match the fine ids, and therefore are not extracted. Alternatively, to keep the boundary ids, you should set the boundary ids of the parent faces  as well, for the algorithm to find them on the coarse level. LucaIl giorno 5 dic 2023, alle ore 21:25, Simon Wiesheier  ha scritto:Dear Luca,the program I provided writes the volume mesh as well as the surface mesh to vtk files.If you compare these files, for instance in paraview, you will see that the locally refined cells are not extracted.Best,SimonAm Di., 5. Dez. 2023 um 21:14 Uhr schrieb Luca Heltai <luca.hel...@gmail.com>:Dear Simon, What do you mean by “demonstrates”? The function you refer to is supposed to work with locally refined grids. What is the behavior you observe? What error do you get?You will have to map dofs on the surface to dofs on the bulk manually. The output of the function only returns a map of tria iterators to face iterators, not dof to dof.LucaIl giorno 5 dic 2023, alle ore 2:23 PM, Simon <simon.wieshe...@gmail.com> ha scritto:Dear all,attached is a minimal example which demonstrates that the function "extract_surface_mesh()" in the GridGenerator namespace does not extract refined cells. That is, it seems to work only for globally refined meshes. There is a comment in the implementation of this function:// Create boundary mesh and mapping// from only level(0) cells of the volume mesh.Since the documentation states nothing about the usage of this function for adaptivelyrefined meshes (like it is done in flatten_triangulation, for instance), I am not sure whether this is desired behavior or not.In my case, I probably do not need the full power of this function. All I want to do is to "copy" the solution values on a surface of the volume mesh to a surface mesh, and to associate a DoFHandler object to the surface meshthat allows me to do further postprocessing.So I do not care about the boundary and manifold id as wellas the return type, however, my volume mesh may contain hanging nodes.Best regards,Simon



-- 
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/f3252992-4761-41b1-a691-05c5265f89bfn%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/AB275257-5021-4A2C-ACA1-C2A44D8FB070%40gmail.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/CAM50jEvtuTu_vUKmg-mTGQC7tdk4v6YE7TayaA6cjnrWjqa3Zg%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/876314A5-EEEC-4947-A339-01C344214104%40gmail.com.


Re: [deal.II] extract_surface_mesh() does not extract refined cells

2023-12-05 Thread Luca Heltai
Dear Simon, What do you mean by “demonstrates”? The function you refer to is supposed to work with locally refined grids. What is the behavior you observe? What error do you get?You will have to map dofs on the surface to dofs on the bulk manually. The output of the function only returns a map of tria iterators to face iterators, not dof to dof.LucaIl giorno 5 dic 2023, alle ore 2:23 PM, Simon  ha scritto:Dear all,attached is a minimal example which demonstrates that the function "extract_surface_mesh()" in the GridGenerator namespace does not extract refined cells. That is, it seems to work only for globally refined meshes. There is a comment in the implementation of this function:// Create boundary mesh and mapping// from only level(0) cells of the volume mesh.Since the documentation states nothing about the usage of this function for adaptivelyrefined meshes (like it is done in flatten_triangulation, for instance), I am not sure whether this is desired behavior or not.In my case, I probably do not need the full power of this function. All I want to do is to "copy" the solution values on a surface of the volume mesh to a surface mesh, and to associate a DoFHandler object to the surface meshthat allows me to do further postprocessing.So I do not care about the boundary and manifold id as wellas the return type, however, my volume mesh may contain hanging nodes.Best regards,Simon



-- 
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/f3252992-4761-41b1-a691-05c5265f89bfn%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/AB275257-5021-4A2C-ACA1-C2A44D8FB070%40gmail.com.


Re: [deal.II] Re: Initial values on blocks

2023-11-18 Thread Luca Heltai
The function that defines the initial conditions must contain 6 components, while apparently yours contains only one. LucaIl giorno 18 nov 2023, alle ore 17:29, Aiden Huffman  ha scritto:I should add that in it's current form I get the following error:An error occurred in line <425> of file <./include/deal.II/numerics/vector_tools_project.templates.h> in function    void dealii::VectorTools::internal::do_project(const M_or_MC&, const dealii::DoFHandler&, const dealii::AffineConstraints&, const Q_or_QC&, const dealii::Function&, VectorType&, bool, const Q_or_QC<(dim - 1)>&, bool) [with int dim = 2; int spacedim = 2; VectorType = dealii::Vector; M_or_MC = dealii::Mapping; Q_or_QC = dealii::Quadrature; typename VectorType::value_type = double]The violated condition was:     dof.get_fe(0).n_components() == function.n_componentsAdditional information:     Dimension 6 not equal to 1.Which makes a ton of sense, I have an FESystem not a simple single finite element. I am just not sure what the right object is, or how to build it.On Saturday, November 18, 2023 at 11:17:28 AM UTC-5 Aiden Huffman wrote:Hi All,I am trying to setup a "simple" solver for a Stokes-Cahn-Hilliard problem but I've gotten stuck trying to implement the initial conditions for the color/phase function. The problem looks like the following:Where there's a regularized surface tension where the sharp interface would normally be between two fluids. The separate fluids are tracked through the function c. Using a forward Euler scheme, and introducing a dummy variable for the curvature I end up withThe eventual weak form isn't to important yet, since I can't even build the initial conditions. At first I thought to extend Step-22 and use a block system and solve "chunks" of. In particular, solving the stokes update and then solving for the update to the phase function; but I can't figure out how to set the initial conditions for $c^0$. Now I am wondering if the correct approach is to use FETools and separate DoF handlers similar to Step-35.Any advice or direction would be greatly appreciated. I've included the very barebones implementation I have right now.



-- 
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/3c854360-3447-415e-ad8c-9d61b630a724n%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/0E8E4D69-64F6-4614-9CD3-46B95764%40gmail.com.


Re: [deal.II] Mixed codimensionality

2023-11-08 Thread Luca Heltai
Dear Alex, 

if you send me your github user, I’ll give you access to a code that does 
exactly what you are trying to do, so that you can get some inspiration on how 
to assemble the coupling matrices.

There is an open PR (the review has been stalling for some time on that) 
https://github.com/dealii/dealii/pull/15773 that tackle exactly this use case. 

Let me know if you need some assistance. 

L.

> On 8 Nov 2023, at 05:02, Wolfgang Bangerth  wrote:
> 
> 
> Alex:
> 
> > [...]
> 
> I think everything up to this point looks reasonable.
> 
>> From what I can see, the system_matrix looks right with n_blocks = 2 and   
>> start_indices = {0, 24, 72}, as expected.
>> Next, I run through the Assemble_System() to create a local cell matrix. I 
>> start with the Solid elements and cell_matrix_sld. I'm skipping the 
>> calculation of the cell matrix for brevity's sake.
>> for (const auto  : dof_handler_sld.active_cell_iterators())
>> {
>> // *** Placeholder for calculating cell_matrix_sld, a 24x24 matrix ***
>> cell->get_dof_indices(local_dof_indices_sld);
>> // Add the cell matrix to the system matrix
>> for (unsigned int i = 0; i < dofs_per_cell_sld; ++i)
>>   for (unsigned int j = 0; j < dofs_per_cell_sld; ++j)
>> system_matrix.add(local_dof_indices_sld[i],
>>   local_dof_indices_sld[j],
>>   cell_matrix_sld(i, j));
>> }  // end of cell loop
>> The bit of code 'system_matrix.add(...)' works for when i=0 and j=0, but 
>> fails on the next loop when j=1.  I get this error:
> 
> The issue here is that you're indexing into the *global* matrix with the 
> indices of only one of the DoFHandler objects. That can't go well. It 
> *should* work if you do the indexing only in the matrix block that 
> corresponds to dof_handler_sld:
> 
>system_matrix.block(block_index_sld, block_index_sld)
> .add(local_dof_indices_sld[i],
>  local_dof_indices_sld[j],
>  cell_matrix_sld(i, j));
> 
> where you define block_index_sld somewhere to either be zero or one.
> 
> In your case, this won't work yet because you hadn't built the sparsity 
> pattern yet. You can do that the same way:
> 
>  DoFTools::make_sparsity_pattern(dof_handler_sld,
>   block_dsp.block(block_index_sld, block_index_sld));
> 
> 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/9a890d55-91f6-ec16-98be-acdb730919d3%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/8FA5C3E5-1317-43A0-B1CB-C30CBDA3E786%40gmail.com.


Re: [deal.II] Getting cmake errors compiling programs

2023-10-25 Thread Luca Heltai
I have just updates my old Intel mac. I hope to get the package working in the next days. LucaIl giorno 25 ott 2023, alle ore 01:13, Lex Lee  ha scritto:I hope deal.ii group could release version 9.5.1 that works with intel processor on MacOS platform. On Monday, October 9, 2023 at 5:19:03 PM UTC-7 deal.II User Group wrote:Hello, everyoneI tried the new image in my laptop with M2 processor and the Ventura Mac OS (13.6). It worked (I successfully ran and compiled the step-1 example). Looks like the issue was with clang 15?However, I am not sure Alexander will be able to test the new image because his processor is Intel.I will test deal.II with the PRISMS-PF applications and report if I see any issues. Thank you for your help, Luca!DavidOn Monday, October 9, 2023 at 5:04:25 AM UTC-4 luca@gmail.com wrote:Alexander, 

can you try out our new dmg image?

https://github.com/dealii/dealii/releases/download/v9.5.1/dealii-9.5.1-sonoma-arm64-clang15.dmg

I’m preparing also a new one, where the compiler is shipped together with the image. This should be robust to the next upgrades in the OS.

Best,
Luca.

> On 6 Oct 2023, at 06:06, Alexander Mensah  wrote:
> 
> If I use the 'step-1' example, I get the same error (mpic++) as with the program I want to run.
> 
> 
> 
> On Thursday, October 5, 2023 at 11:42:27 PM UTC-4 Alexander Mensah wrote:
> No luck
> 
> 
> 
> On Thursday, October 5, 2023 at 6:47:07 PM UTC-4 Wolfgang Bangerth wrote:
> 
> On 10/5/23 15:14, Alexander Mensah wrote: 
> > 
> > Could someone help me fix this? 
> 
> I believe that you're trying to call cmake (to configure one of the 
> example programs) in the directory 
> /Applications/deal.II.app/Contents/Resources/Libraries/examples/... but 
> this is a system directory that you can read files in, but not write to. 
> You might have to copy the tutorial program directory you're trying to 
> configure into your home directory. 
> 
> 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+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/3f5e1911-92a1-4c0c-b5e5-42d0b8dc4f7en%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/845ec702-0f23-4fc1-a711-d10d22ffe255n%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/F93EC90F-2AFD-4C5E-9EBB-410DBA3272A0%40gmail.com.


Re: [deal.II] Getting cmake errors compiling programs

2023-10-09 Thread Luca Heltai
Alexander, 

can you try out our new dmg image?

https://github.com/dealii/dealii/releases/download/v9.5.1/dealii-9.5.1-sonoma-arm64-clang15.dmg

I’m preparing also a new one, where the compiler is shipped together with the 
image. This should be robust to the next upgrades in the OS.

Best,
Luca.

> On 6 Oct 2023, at 06:06, Alexander Mensah  wrote:
> 
> If I use the 'step-1' example, I get the same error (mpic++) as with the 
> program I want to run.
> 
> 
> 
> On Thursday, October 5, 2023 at 11:42:27 PM UTC-4 Alexander Mensah wrote:
> No luck
> 
> 
> 
> On Thursday, October 5, 2023 at 6:47:07 PM UTC-4 Wolfgang Bangerth wrote:
> 
> On 10/5/23 15:14, Alexander Mensah wrote: 
> > 
> > Could someone help me fix this? 
> 
> I believe that you're trying to call cmake (to configure one of the 
> example programs) in the directory 
> /Applications/deal.II.app/Contents/Resources/Libraries/examples/... but 
> this is a system directory that you can read files in, but not write to. 
> You might have to copy the tutorial program directory you're trying to 
> configure into your home directory. 
> 
> 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/3f5e1911-92a1-4c0c-b5e5-42d0b8dc4f7en%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/C39C814B-6759-4FA7-BC97-5E28F5FCD43B%40gmail.com.


Re: [deal.II] Getting cmake errors compiling programs

2023-10-08 Thread Luca Heltai
I managed to create a new dmg package. I’m testing that everything works 
correctly before I upload it, but I also found a quick workaround that you can 
use, without having to wait for me to upload a new package:

you need to modify the files 

/Applications/deal.II.app/Contents/Resources/Libraries/bin/mpicc
/Applications/deal.II.app/Contents/Resources/Libraries/bin/mpicxx
/Applications/deal.II.app/Contents/Resources/Libraries/bin/mpifort

in these three files, search for the line

final_ldflags="  -Wl,-commons,use_dylibs"

and replace it with

final_ldflags=“ "

The newer version of clang does not support the commons and use_dylibs flags. 

In your application, you should also add the following definition to your cmake 
command:

cmake -DCMAKE_CXX_FLAGS=-DBOOST_NO_CXX98_FUNCTION_BASE 

This is because the newer clang version has removed some deprecated functions 
from the standard library (as std::unary_functions) which are used by boost 
unless you instruct boost not to use them. This is the default behavious for 
the cxx17 standard.

You’ll get a bunch of warnings (due to clang 15 being a bit more restrictive 
than clang 14), but your application should compile and run also with the 
package that you have currently downloaded.

Best,
Luca.




> On 6 Oct 2023, at 06:06, Alexander Mensah  wrote:
> 
> If I use the 'step-1' example, I get the same error (mpic++) as with the 
> program I want to run.
> 
> 
> 
> On Thursday, October 5, 2023 at 11:42:27 PM UTC-4 Alexander Mensah wrote:
> No luck
> 
> 
> 
> On Thursday, October 5, 2023 at 6:47:07 PM UTC-4 Wolfgang Bangerth wrote:
> 
> On 10/5/23 15:14, Alexander Mensah wrote: 
> > 
> > Could someone help me fix this? 
> 
> I believe that you're trying to call cmake (to configure one of the 
> example programs) in the directory 
> /Applications/deal.II.app/Contents/Resources/Libraries/examples/... but 
> this is a system directory that you can read files in, but not write to. 
> You might have to copy the tutorial program directory you're trying to 
> configure into your home directory. 
> 
> 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/3f5e1911-92a1-4c0c-b5e5-42d0b8dc4f7en%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/66F0CEB4-4620-460A-97D6-18398BBCE6BE%40gmail.com.


Re: [deal.II] Getting cmake errors compiling programs

2023-10-08 Thread Luca Heltai
I updated to sonoma in order to find the problem, and I’m currently trying to 
recreate the package of the library.

I confirm that I observe the same behaviour.

I’ll upload a new .dmg as soon as I manage to get one working.

Best,
Luca.

> On 6 Oct 2023, at 05:42, Alexander Mensah  wrote:
> 
> No luck
> 
> 
> 
> On Thursday, October 5, 2023 at 6:47:07 PM UTC-4 Wolfgang Bangerth wrote:
> 
> On 10/5/23 15:14, Alexander Mensah wrote: 
> > 
> > Could someone help me fix this? 
> 
> I believe that you're trying to call cmake (to configure one of the 
> example programs) in the directory 
> /Applications/deal.II.app/Contents/Resources/Libraries/examples/... but 
> this is a system directory that you can read files in, but not write to. 
> You might have to copy the tutorial program directory you're trying to 
> configure into your home directory. 
> 
> 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/811147da-83e3-453b-9051-4b6b026d3b1bn%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/E5F74921-3BAD-4805-BC56-6A10BC8C8FBB%40gmail.com.


Re: [deal.II] Cannot find examples

2023-10-07 Thread Luca Heltai
Dear Sunmin,

i think there is an issue with the package: it was shipped without the actual 
examples, only with the library.

Can you download the source files of dealii, and extract the examples from 
there?

You can find the examples in the directory where you extract this file 

https://github.com/dealii/dealii/releases/download/v9.5.0/dealii-9.5.0.tar.gz

>From that terminal, you should be able to cd into the examples directory and 
>compile them.

Best,
Luca.

> On 4 Oct 2023, at 18:27, Eugene Kim  wrote:
> 
> Hi, 
> 
> I am trying to install deal.ii on my MacBook Pro with M1 Max chip, Ventura 
> 13.3. 
> 
> I downloaded dealii-9.5.0-ventura-arm64.dmg and moved it to the 
> "Applications" folder. 
> 
> So, I can see the following terminal now. 
> 
> 
> 
> But, I cannot find examples, and how to use them for my applications. 
> 
> Could you help me find the next steps?
> 
> Thanks,
> Sunmin
> 
> 
> 
> -- 
> 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/CA%2BJqsBf70tSBUXjxVtm6m-Ot_Wp5r9CYhB09L9YqoETYruZ0zA%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/A01B8593-5D7D-4723-81D7-C9EA8FF75425%40gmail.com.


Re: [deal.II] Getting cmake errors compiling programs

2023-10-07 Thread Luca Heltai
Sorry, I had not read carefully. I see you have an intel mac. However, the 
compiler you are using is not the same compiler used to compile mpich (which 
was created on a Mac OS ventura, with clang 14, not clang 15).

You will have to reinstall the full stack of packages.

You should be able to run 

spack compiler find --scope=site 
spack activate dealii
spack concretize -f -U 
spack install 

It will take some time, but at the end you should have a working system.

Best,
Luca.

> On 5 Oct 2023, at 23:14, Alexander Mensah  wrote:
> 
> deal.ii-9.5.0
> Processor: 3.6 GHz 8-Core Intel Core i9
> macOS: Sonoma 14.0
> xcode-select version 2399.
> 
> There seems to be an issue with compiler compatability. I recieve the 
> following error when attempting to compile one of my projects (%cmake .):
> -- The C compiler identification is AppleClang 15.0.0.1540
> -- The CXX compiler identification is unknown
> -- Detecting CXX compiler ABI info
> -- Detecting CXX compiler ABI info - failed
> -- Check for working CXX compiler: 
> /Applications/deal.II.app/Contents/Resources/spack/opt/mpich-4.1.1-hbtt/bin/mpic++
> -- Check for working CXX compiler: 
> /Applications/deal.II.app/Contents/Resources/spack/opt/mpich-4.1.1-hbtt/bin/mpic++
>  - broken
> CMake Error at 
> /Applications/deal.II.app/Contents/Resources/spack/opt/cmake-3.26.3-aw3s/share/cmake-3.26/Modules/CMakeTestCXXCompiler.cmake:60
>  (message):
>   The C++ compiler
> 
> 
> "/Applications/deal.II.app/Contents/Resources/spack/opt/mpich-4.1.1-hbtt/bin/mpic++"
> 
>   is not able to compile a simple test program.
> 
>   It fails with the following output:
> 
> Change Dir: 
> /Users/xmen/Desktop/PRISMS/phaseField/applications/fickianDiffusion/CMakeFiles/CMakeScratch/TryCompile-3w9jnP
> 
> Run Build 
> Command(s):/Applications/deal.II.app/Contents/Resources/spack/opt/cmake-3.26.3-aw3s/bin/cmake
>  -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_b17ed/fast && 
> /Library/Developer/CommandLineTools/usr/bin/make  -f 
> CMakeFiles/cmTC_b17ed.dir/build.make CMakeFiles/cmTC_b17ed.dir/build
> Building CXX object CMakeFiles/cmTC_b17ed.dir/testCXXCompiler.cxx.o
> 
> /Applications/deal.II.app/Contents/Resources/spack/opt/mpich-4.1.1-hbtt/bin/mpic++
> -o CMakeFiles/cmTC_b17ed.dir/testCXXCompiler.cxx.o -c 
> /Users/xmen/Desktop/PRISMS/phaseField/applications/fickianDiffusion/CMakeFiles/CMakeScratch/TryCompile-3w9jnP/testCXXCompiler.cxx
> error: unable to open output file 
> 'CMakeFiles/cmTC_b17ed.dir/testCXXCompiler.cxx.o': 'No such file or directory'
> 1 error generated.
> make[1]: *** [CMakeFiles/cmTC_b17ed.dir/testCXXCompiler.cxx.o] Error 1
> make: *** [cmTC_b17ed/fast] Error 2
> 
>   CMake will not be able to correctly generate this project.
> Call Stack (most recent call first):
>   CMakeLists.txt:39 (PROJECT)
> -- Configuring incomplete, errors occurred!
> 
> A similar error appears attempting the same in one of the example directories:
> -- The C compiler identification is unknown
> -- The CXX compiler identification is unknown
> -- Detecting C compiler ABI info
> -- Detecting C compiler ABI info - failed
> -- Check for working C compiler: 
> /Applications/deal.II.app/Contents/Resources/spack/lib/spack/env/clang/clang
> -- Check for working C compiler: 
> /Applications/deal.II.app/Contents/Resources/spack/lib/spack/env/clang/clang 
> - broken
> CMake Error at 
> /Applications/deal.II.app/Contents/Resources/spack/opt/cmake-3.26.3-aw3s/share/cmake-3.26/Modules/CMakeTestCCompiler.cmake:67
>  (message):
>   The C compiler
> 
> 
> "/Applications/deal.II.app/Contents/Resources/spack/lib/spack/env/clang/clang"
> 
>   is not able to compile a simple test program.
> 
>   It fails with the following output:
> 
> Change Dir: 
> /Applications/deal.II.app/Contents/Resources/Libraries/examples/arkode/CXX_serial/CMakeFiles/CMakeScratch/TryCompile-oKoi60
> 
> Run Build 
> Command(s):/Applications/deal.II.app/Contents/Resources/spack/opt/cmake-3.26.3-aw3s/bin/cmake
>  -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_ce711/fast && 
> /Library/Developer/CommandLineTools/usr/bin/make  -f 
> CMakeFiles/cmTC_ce711.dir/build.make CMakeFiles/cmTC_ce711.dir/build
> Building C object CMakeFiles/cmTC_ce711.dir/testCCompiler.c.o
> 
> /Applications/deal.II.app/Contents/Resources/spack/lib/spack/env/clang/clang  
>   -o CMakeFiles/cmTC_ce711.dir/testCCompiler.c.o -c 
> /Applications/deal.II.app/Contents/Resources/Libraries/examples/arkode/CXX_serial/CMakeFiles/CMakeScratch/TryCompile-oKoi60/testCCompiler.c
> [spack cc] ERROR: Spack compiler must be run from Spack! Input 
> 'SPACK_ENV_PATH' is missing.
> make[1]: *** [CMakeFiles/cmTC_ce711.dir/testCCompiler.c.o] Error 1
> make: *** [cmTC_ce711/fast] Error 2
>   CMake will not be able to correctly generate this project.
> Call Stack (most recent call first):
>   CMakeLists.txt:46 (project)
> 
> Could someone help me fix this?
> 
> 
> -- 
> The deal.II project is 

Re: [deal.II] Getting cmake errors compiling programs

2023-10-07 Thread Luca Heltai
Is this with an M2 or an Intel mac?

I think you might have installed the intel version of the library, on an M1 or 
M2 mac. Is this the case?

My mpich is installed (on an M2 mac) under 

/Applications/deal.II.app/Contents/Resources/spack/opt/mpich-4.1.1-4l2n

notice that the last 4 letters (part of the hash of the package) are different 
w.r.t. your snapshot.

L.

> On 6 Oct 2023, at 06:06, Alexander Mensah  wrote:
> 
> If I use the 'step-1' example, I get the same error (mpic++) as with the 
> program I want to run.
> 
> 
> 
> On Thursday, October 5, 2023 at 11:42:27 PM UTC-4 Alexander Mensah wrote:
> No luck
> 
> 
> 
> On Thursday, October 5, 2023 at 6:47:07 PM UTC-4 Wolfgang Bangerth wrote:
> 
> On 10/5/23 15:14, Alexander Mensah wrote: 
> > 
> > Could someone help me fix this? 
> 
> I believe that you're trying to call cmake (to configure one of the 
> example programs) in the directory 
> /Applications/deal.II.app/Contents/Resources/Libraries/examples/... but 
> this is a system directory that you can read files in, but not write to. 
> You might have to copy the tutorial program directory you're trying to 
> configure into your home directory. 
> 
> 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/3f5e1911-92a1-4c0c-b5e5-42d0b8dc4f7en%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/C4D06CC3-4522-4734-8E34-CE95FA314E90%40gmail.com.


Re: [deal.II] Using KINSOL with distributed vectors

2023-08-16 Thread Luca Heltai
The vector you pass to kinsol must be non-ghosted. In the residual assembly you 
must create a local ghosted copy. Just as you would if you were doing things 
manually. (I.e., After a solve, you copy to a ghosted vector to output or to 
compute error estimators. Here it is the same. )

Luca

> Il giorno 16 ago 2023, alle ore 09:25, 'Norihiro Watanabe' via deal.II User 
> Group  ha scritto:
> 
> Hi,
> 
> I got the below error when calling KINSOL::solve() with Trilinos MPI vectors.
> It looks KINSOL tried to call scale() for a ghosted vector.
> The vector has ghost elemets probably because I passed 
> a ghost vector as  "initial_guess_and_solution" argument to solve(). 
> 
> I can pass a non-ghosted vector as "initial_guess_and_solution", but this 
> will cause another problem in the residual assembly function which requires 
> ghosted elements.
> 
> Any advice on this issue would be appreciated.
> 
> 
> 
> An error occurred in line <2146> of file 
>  in function
>void dealii::TrilinosWrappers::MPI::Vector::scale(const 
> dealii::TrilinosWrappers::MPI::Vector&)
> The violated condition was: 
>!has_ghost_elements()
> Additional information: 
>You are trying an operation on a vector that is only allowed if the
>vector has no ghost elements, but the vector you are operating on does
>have ghost elements. Specifically, vectors with ghost elements are
>read-only and cannot appear in operations that write into these
>vectors.
> 
>See the glossary entry on 'Ghosted vectors' for more information.
> 
> Stacktrace:
> ---
> #0  /usr/local/lib/libdeal_II.g.so.9.5.0: 
> dealii::TrilinosWrappers::MPI::Vector::scale(dealii::TrilinosWrappers::MPI::Vector
>  const&)
> #1  /usr/local/lib/libdeal_II.g.so.9.5.0: double 
> dealii::SUNDIALS::internal::NVectorOperations::weighted_l2_norm(_generic_N_Vector*,
>  _generic_N_Vector*)
> #2  /lib/x86_64-linux-gnu/libsundials_kinsol.so.5: N_VWL2Norm
> #3  /lib/x86_64-linux-gnu/libsundials_kinsol.so.5: 
> #4  /lib/x86_64-linux-gnu/libsundials_kinsol.so.5: KINSol
> #5  /usr/local/lib/libdeal_II.g.so.9.5.0: 
> dealii::SUNDIALS::KINSOL::solve(dealii::TrilinosWrappers::MPI::Vector&)
> 
> 
> Best regards,
> Norihiro
> 
> -- 
> 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/TYWPR01MB7185E469D5E4148829CA3D4BC415A%40TYWPR01MB7185.jpnprd01.prod.outlook.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/B11279AE-470D-4E00-A33F-98C0F283A828%40gmail.com.


Re: [deal.II] Q: Question about extracting part of a vector

2023-07-23 Thread Luca Heltai
FEFieldFunction has the same number of components of the underlying dofhandler. If that has one component, then so does the FEFieldFunction. What you could do is wrap the FEFieldFunction into another function, e.g.The deal.II Library: VectorFunctionFromScalarFunctionObject< dim, RangeNumberType > Class Template Referencedealii.orgYou could pass a lambda function as an argument to the constructor of the function, that uses your FEFieldFunction object, I.e.,VectorFucntionFromScalarFuncObj my_fun([&](const auto ){ return fe_field_func.value(p);}, 0, 2);LucaIl giorno 21 lug 2023, alle ore 22:05, Najwa Alshehri  ha scritto:Dear Daniel, your answer makes sense, Finally it worked.Dear Luca, thank you for your answer. Indeed, the ExactSolution is a class I built myself. I followed your suggestion and it was the magic line that solved the issue. However, say that I have in another code instead of using a ExactSolution that I build myself, I used an FeFieldFunction for a reference solution, how would I make this function allocate two components?Best,NajwaOn Friday, July 21, 2023 at 1:54:42 PM UTC+3 luca@gmail.com wrote:Dear Najwa,

how many components do the `ExactSolution2` function has?

The error complains about `exact_solution.n_components, n_components` not being equal, in particular it tells you that `ExactSolution2` only has one component. 

If you built the ExactSolution class yourself, make sure at construction time you tell Function to allocate two components:

ExactSolution2::ExactSolution2( … ) 
   : Functions::Function(2)
	
Best,
Luca.


> On 20 Jul 2023, at 12:15, Najwa Alshehri  wrote:
> 
> Hello again,
> 
> I have a follow-up question. Does this ComponentSelectFunction work also with vectors that are not written as blocked vectors? I have applied it before when I was dealing with blocked vectors and it worked perfectly. 
> 
> So, I did this, 
> const ComponentSelectFunction primal_mask(0,2);
> Later,
> VectorTools::integrate_difference(omega2_dh,
> u_omega2,
> ExactSolution2(),
> cellwise_errors2,
> quadrature,
> VectorTools::L2_norm
> ,_mask);
> const double u2_l2_error =
> VectorTools::compute_global_error(triangulation_omega2,
> cellwise_errors2,
> VectorTools::L2_norm);
> 
> And I got the following error!!
> An error occurred in line <455> of file <../include/deal.II/numerics/vector_tools_integrate_difference.templates.h> in function
> void dealii::VectorTools::internal::do_integrate_difference(const dealii::hp::MappingCollection&, const dealii::DoFHandler&, const InVector&, const dealii::Function&, OutVector&, const dealii::hp::QCollection&, const dealii::VectorTools::NormType&, const dealii::Function*, double) [with int dim = 2; int spacedim = 2; InVector = dealii::Vector; OutVector = dealii::Vector; typename InVector::value_type = double]
> The violated condition was: 
> ::dealii::deal_II_exceptions::internals::compare_for_equality(exact_solution.n_components, n_components)
> Additional information: 
> Dimension 1 not equal to 2.
> 
>  Obviously, we have dimensionality mismatching between u_omega2 and the exact solution. which means that the mask is not really picking up the first component of the solution u_omega2.  Do you have any suggestions to fix this issue?
> 
> Appreciate your help,
> Najwa
> On Thursday, July 20, 2023 at 11:48:04 AM UTC+3 Najwa Alshehri wrote:
> Thank you Daniel for the clear quick answer. I will follow it.
> 
> Best,
> Najwa
> 
> On Wednesday, July 19, 2023 at 5:16:14 PM UTC+3 d.arnd...@gmail.com wrote:
> Najwa,
> 
> The documentation of VectorTools::integrate_difference(https://www.dealii.org/current/doxygen/deal.II/namespaceVectorTools.html#a676190d2c897ac5da68a9c460fa95832) says
> 
> 
> The additional argument weight allows to evaluate weighted norms. The weight function may be scalar, establishing a spatially variable weight in the domain for all components equally. This may be used, for instance, to only integrate over parts of the domain. The weight function may also be vector-valued, with as many components as the finite element: Then, different components get different weights. A typical application is when the error with respect to only one or a subset of the solution variables is to be computed, in which case the other components would have weight values equal to zero. The ComponentSelectFunction class is particularly useful for this purpose as it provides such a "mask" weight. The weight function is expected to be positive, but negative values are not filtered. The default value of this function, a null pointer, is interpreted as "no weighting function", i.e., weight=1 in the whole domain for all vector components uniformly.
> 
> Best,
> Daniel
> 
> On Wed, Jul 19, 2023 at 8:01 AM Najwa Alshehri  wrote:
> Dear group members,
> 
> I have one question, 
> 
> I am trying to calculate the L2 norm of the error of a solution. In particular, I have a vector of the solution u_omega and a FeSystem with two 

Re: [deal.II] What do the AffineConstraints::distribute_local_to_global(...) functions do on a matrix/vector level?

2023-07-21 Thread Luca Heltai
Kyle, 

what you are asking is a very difficult question. If you take a look at the 
(new) step-86 branch (https://github.com/dealii/dealii/pull/15540), you’ll find 
a similar approach to what you describe. 

Everything you said is correct, with possibly one problem (that I have 
encountered very recently, and may be related to what you are observing).

Boundary conditions and hanging nodes have a very delicate interplay. In 
particular, when you *build* the constraints, if one of the hanging nodes 
(dependent) has one of its dependencies on the boundary, then when you add 
non-homogeneous boundary conditions to the constraints, the hanging node 
constraints are also modified to take into account the values of the boundary 
conditions. This computation is done *when you compute the constraints for BC*, 
and it holds the same values for the rest of the life of the affine 
constraints. When you `distribute`, the constraints are computed with the BC 
that you had at the beginning. 

This information is retained even if you change later your (time dependent) 
boundary conditions, and may result in the hanging nodes being compute in a 
wrong manner (in your solution, you may see discontinuous solutions instead of 
continuous ones where hanging nodes interact with boundary nodes).

This affects the final call to “distribute”, not the 
“distribute_local_to_global” (with false as last argument), since that call 
condensates away the constraints. So your process is correct, but `distribute` 
does not do the right job, because the constraints on the hanging nodes have 
not been updated to take into account the new boundary conditions.

To verify that this is the case, try doing the following when you update the 
boundary conditions: clear the constraints, and recreate them from scratch, and 
see if this solves your problem. The `distribute_local_to_global` will behave 
exactly in the same way, but `distribute` should now do the right thing.

L.

> On 20 Jul 2023, at 22:28, Kyle Schwiebert  wrote:
> 
> Hello all,
> 
> Thank you for taking the time to look at my question. First, I'll ask a 
> couple of basic questions about the built-in functions, and then I'll give a 
> few details of why I ask.
> 
> Does the inhomogeneity-handling call distribute_local_to_global(...,false) do 
> the following:
> 
> Say that we have a constraint x_i = a. I would guess that the function takes 
> the following steps: (matrix is M, RHS is right hand side)
> 1) Set M(i,i) = L and set RHS(i) = 0, where L is somehow "nice" for the 
> matrix's spectrum.
> 2) Set the rest of the entries of the ith row and column of M = 0. Perhaps 
> technically we don't bother to zero the column since we plan to call 
> AffineConstraints::set_zero.
> 3) For each DoF j which is coupled to DoF i and is not itself constrained, we 
> do RHS(j) -= a*M(j,i).
> 
> Now considering the same constraint with instead a call to 
> distribute_local_to_global(local_rhs,dof_inds,global_rhs) I would guess that 
> we just set RHS(i) = 0 and do nothing else special.
> 
> Most importantly, is the above correct?
> 
> If so, I am having trouble understanding where I might be going wrong. I'm 
> solving a time dependent coupled problem with a decoupled solver. By 
> decoupled solver I mean that information from the second domain only appears 
> in the right hand side. To make matters one step more complex, one term in my 
> matrix is time-dependent and so I do not recompute the whole matrix. My 
> procedure is this:
> 
> 1) Assemble the static part of the matrix with a zero right hand side. This 
> matrix will never be touched again. The vector, RHS_bc, which will also never 
> be touched again contains no nonzero entries except for those created by the 
> call to distribute_local_to_global(...,false).
> 
> 2) I then assemble the time-dependent terms into a separate matrix and 
> vector, RHS_td, using distribute_local_to_global(...,false) and add the 
> RHS_bc to RHS_td.
> 
> 3) I then assemble the coupled terms from the other solver into RHS_c with 
> distribute_local_to_global(local_rhs,dof_inds,RHS_c).
> 
> 4) I then add RHS_c to RHS_td and solve (being careful to call 
> constraints.set_zero(solution) before the solve and 
> constraints.distribute(solution) after the solve). I am of course using a 
> custom class similar to the linear operator classes to bundle the vmult() 
> outputs of the static and time-dependent matrices.
> 
> However, I am seeing blowup in my solution and I'm seeing some indication 
> that the inhomogeneous boundary conditions are to blame. Note that I also 
> tried calling constraints.set_zero(RHS_c) in step 4 above and as I expected 
> that had no change (since presumably constrained entries are already zero).
> 
> Thank you again for taking the time to engage with my question and in advance 
> for any tips you are able to offer.
> 
> -Kyle
> 
> -- 
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see 
> 

Re: [deal.II] Extending step-54 to 3D volume constrained by CAD geometry

2023-06-15 Thread Luca Heltai
I think you are almost there. Once you have created your grid manually, you 
should be able to set the manifold ids (which you did not do in your case).

tria.set_all_manifold_ids_on_boundary(1);

and then, after creating the manifold with opencascade, you should attach it to 
the triangulation:

tria.set_manifold(1, manifold_object);

After this, the triangulation is aware of your manifold. 

The stp file you provide is not a three dimensional triangulation, but a two 
dimensional surface embedded on a three-dimensional space, and the opencascade 
utility won’t create a three-dimensional grid. Moreover, that utility is 
thought for single nurbs patches (that define internally a rectangular u-v 
space), and that’s how the grid is generated. In the case of a stanford bunny, 
the surface is triangulated already, so there is no way to define a unique u-v 
space and generate a Triangulation<2,3> out of it, and you have to proceed 
differently.

Ps: your procedure is ok, but remember that if your domain is topologically 
equivalent to a sphere, you should not start with a cube, but with a 
hypersphere (in the hypercube, the coarse cell has all faces on the boundary, 
and this will result after refinement in 8 cells that have three neighboring 
faces on a smooth boundary, with very high defromations, and give you distorted 
cells. If you refine instead the coarse mesh of a sphere attaching the manifold 
of the bunny to the its boundary, every cell only has one face on the boundary, 
and this will be preserved throughout refinement).

L.

> On 14 Jun 2023, at 15:23, Andrey Borzunov  wrote:
> 
> Hi, all.
> 
> I'm trying to create a 3D mesh from CAD file (stanford bunny) to solve a 
> heating equation in this 3D volume.
> 
> I tried gmsh, but failed to produce coarse mesh, every try resulted in too 
> fine meshes (700k cells and more).
> 
> Than i tried manually create initial-mesh with one cell (because 
> `OpenCASCADE::create_triangulation` fails on 3D case). I used FreeCAD to 
> examine .stp file, selected 8 edges and obtained its vertex coordinates using 
> python console, and than used a code from Step14 Exercise_2_3 to create 
> triangulation.
> 
> Finally, i failed to set manifolds correctly.
> I have found similar discussions Bruno & Luca, yy.wayne & Wolfgang and wiki 
> page but failed to understand the way i should modify sources (see 
> attachment, it is slightly modified step-54).
> 
> Thanks in advance!
> 
> Best, Andrey.
>  
> 
> -- 
> 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/46a757a1-33be-42a6-898c-d025246564c5n%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/22DC976E-C1BC-4DBE-9FA3-9D3DA3381DA3%40gmail.com.


Re: [deal.II] Installation Errors on MacOS M1 Max chip

2023-05-28 Thread Luca Heltai
The directory you showed seem to contain already two executables (step-10.debug 
and step-10.release). Does running any of those two work?

It’s possible that this is not the right directory (i.e., there may be a copy 
that was done in the wrong way).

I do not have the PC where I build the binary at my disposal now, but can you 
try to see if the examples directory  is also in

/Applications/deal.II.app/Contents/Resources/Libraries/examples

(notice that this is not the same as the above) 

If so, try building there.

L.

> On 24 May 2023, at 2:14, Buhari Ibrahim  wrote:
> 
> Hi Luca, as a follow up, I tried to go through the tutorial and build step-1 
> of the examples for instance, however, I run into this error;
> 
> (base) buhariibra@Bu-MacBook-Pro examples % ls
> doxygen   step-15 step-21 step-29 step-36 
> step-43 step-50 step-58 step-65 
> step-72 step-81
> step-1step-16 step-22 step-3  step-37 
> step-44 step-51 step-59 step-66 
> step-74 step-82
> step-10   step-16bstep-23 step-30 step-38 
> step-45 step-52 step-6  step-67 
> step-75 step-85
> step-11   step-17 step-24 step-31 step-39 
> step-46 step-53 step-60 step-68 
> step-76 step-9
> step-12   step-18 step-25 step-32 step-4  
> step-47 step-54 step-61 step-69 
> step-77
> step-12b  step-19 step-26 step-33 step-40 
> step-48 step-55 step-62 step-7  step-78
> step-13   step-2  step-27 step-34 step-41 
> step-49 step-56 step-63 step-70 
> step-79
> step-14   step-20 step-28 step-35 step-42 
> step-5  step-57 step-64 step-71 step-8
> (base) buhariibra@Bu-MacBook-Pro examples % cd step-10
> (base) buhariibra@Bu-MacBook-Pro step-10 % ls
> CMakeLists.txtstep-10.cc  step-10.debug   step-10.release
> (base) buhariibra@Bu-MacBook-Pro step-10 % cmake .
> CMake Warning:
>   Ignoring extra path from command line:
> 
>"."
> 
> 
> CMake Error: The source directory 
> "/Applications/deal.II.app/Contents/Resources/Libraries/share/deal.II/examples/step-10"
>  does not appear to contain CMakeLists.txt.
> Specify --help for usage, or press the help button on the CMake GUI.
> 
> It says it can’t find CMakelists.txt, but when I ls the content of ’step-1’ I 
> see it listed there. Any idea what the problem might be? Sorry if this is a 
> beginners level thing. Thank you.
> 
>> On May 23, 2023, at 5:21 PM, Buhari Ibrahim  wrote:
>> 
>> Hello Luca, 
>> 
>> That works very well. Thank you very much for your response.
>> 
>> Buhari.
>> 
>> On Tue, May 23, 2023 at 2:48 AM Luca Heltai  wrote:
>> Can you try to see if the mac binary pacakge which is available here:
>> 
>> https://github.com/dealii/dealii/releases/download/v9.4.0/dealii-9.4.0.ventura-m1.dmg
>> 
>> works for you?
>> 
>> Thanks,
>> Luca.
>> 
>> > On 23 May 2023, at 24:44, Buhari Ibrahim  wrote:
>> > 
>> > Hello everyone, 
>> > 
>> > I am new to dealii, I was trying to install on my MacOS M1 Max system by 
>> > following guide in the link;
>> > https://github.com/caveofprogramming/advanced-cplusplus/wiki
>> > 
>> > I think thing were going well until I received these errors which I tried 
>> > to resolve but couldn't. Any pointers? Thank you.
>> > 
>> > Buhari.
>> > 
>> > Build FAST version in 
>> > /Users/(username)/dealii-candi/tmp/build/p4est-2.3.2/FAST
>> > /Users/(username)/dealii-candi/tmp/unpack/p4est-2.3.2/configure: line 
>> > 4056: test: argument expected
>> > configure: error: in 
>> > `/Users/(username)/dealii-candi/tmp/build/p4est-2.3.2/FAST':
>> > configure: error: Fortran 77 compiler cannot create executables
>> > See `config.log' for more details
>> > Error: Error in configure
>> > 
>> > 
>> > 
>> > -- 
>> > 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 a

Re: [deal.II] Installation Errors on MacOS M1 Max chip

2023-05-23 Thread Luca Heltai
Can you try to see if the mac binary pacakge which is available here:

https://github.com/dealii/dealii/releases/download/v9.4.0/dealii-9.4.0.ventura-m1.dmg

works for you?

Thanks,
Luca.

> On 23 May 2023, at 24:44, Buhari Ibrahim  wrote:
> 
> Hello everyone, 
> 
> I am new to dealii, I was trying to install on my MacOS M1 Max system by 
> following guide in the link;
> https://github.com/caveofprogramming/advanced-cplusplus/wiki
> 
> I think thing were going well until I received these errors which I tried to 
> resolve but couldn't. Any pointers? Thank you.
> 
> Buhari.
> 
> Build FAST version in 
> /Users/(username)/dealii-candi/tmp/build/p4est-2.3.2/FAST
> /Users/(username)/dealii-candi/tmp/unpack/p4est-2.3.2/configure: line 4056: 
> test: argument expected
> configure: error: in 
> `/Users/(username)/dealii-candi/tmp/build/p4est-2.3.2/FAST':
> configure: error: Fortran 77 compiler cannot create executables
> See `config.log' for more details
> Error: Error in configure
> 
> 
> 
> -- 
> 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/6e8d3ea5-6a17-4431-a85a-f7f37ccfa0d3n%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/AEE06A57-220A-41F9-9FD5-6B4500206AF9%40gmail.com.


Re: [deal.II] Internal deal.II error when instantiating TrilinosWrappers::block_operator

2023-04-28 Thread Luca Heltai
Dear Lucas, 

take a look at the tests directory of deal.II:

https://github.com/dealii/dealii/blob/master/tests/lac/block_linear_operator_05.cc

there are many small examples and snippets that show how to use this.

In particular, I think the problem is in the fact that you are calling directly 
dealii::TrilinosWrappers::linear_operator and 
dealii::TrilinosWrappers::block_operator.

These are used internally by the functions in linear_operator_tools, and, btw, 
you are not required to include

#include 

as these are included by linear_operator_tools.h, and the typical usage is 
through the functions dealii::linear_operator, dealii::block_operator, 
dealii::block_diagonal_operator, etc. (notice these are in dealii namespace, 
not in dealii::TrilinosWrappers namespace).

e.g., this should compile:

using vec = dealii::LinearAlgebraTrilinos::MPI::Vector;
using block_vec = dealii::LinearAlgebraTrilinos::MPI::BlockVector;

const auto B = linear_operator(system_matrix.block(0, 0)); // Notice this 
is not dealii::TrilinosWrappers::linear_operator
const auto P_inv = block_diagonal_operator<1, block_vec 
>(std::array({{B}}));

Creating (as for your example) a block operator with a single block.

L.

Ps: I don’t see an obvious reason why your example should not compile too. 
Could you try to modify

https://github.com/dealii/dealii/blob/master/tests/lac/block_linear_operator_05.cc

to reflect your example, and open an issue with a MWE that fails to compile? 
Reading your code, I would have expected it to compile, and I think you have 
spotted a problem in deal.II due to an unusual way in which you are using the 
code. 




> On 28 Apr 2023, at 24:10, Lucas Myers  wrote:
> 
> Hi folks,
> 
> I'm trying to use the block_operator technique on Trilinos vectors and 
> matrices, but I can't quite get it to compile. For simplicity, the relevant 
> lines of code are:
> ```
> #include 
> #include 
> 
> using vec = dealii::LinearAlgebraTrilinos::MPI::Vector;
> using block_vec = dealii::LinearAlgebraTrilinos::MPI::BlockVector;
> const auto B = dealii::TrilinosWrappers::linear_operator vec>(system_matrix.block(0, 0));
> const auto P_inv = dealii::TrilinosWrappers::block_operator<1, 1, 
> block_vec>({B});
> ```
> where system_matrix is of type 
> `dealii::LinearAlgebraTrilinos::MPI::BlockSparseMatrix`.
> 
> The first error that comes up looks like:
> 
> `deal.II/lac/block_linear_operator.h:679:37: error: 
> ‘populate_linear_operator_functions’ was not declared in this scope; did you 
> mean 
> ‘dealii::internal::BlockLinearOperatorImplementation::populate_linear_operator_functions’?`
> 
> Is this a bug in deal.II? That would be my first inclination, given that I 
> cannot see how it would be template-related.
> 
> There are a few other errors that come up, so I'm attaching the error message 
> in a text file. 
> 
> Any tips on debugging this? I'm finding the compiler output basically 
> inscrutable. Any help is appreciated, so sorry for all the spam!
> 
> - Lucas
> 
> -- 
> 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/8a6be404-f323-4edc-9720-fe603c92dfe6n%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/D553461D-423F-4B77-A842-96FABE9DF0EA%40gmail.com.


Re: [deal.II] Error building with cmake on vscode

2023-04-23 Thread Luca Heltai
These errors are not related to cmake, but to intellisense. If the compilation gets through, then you can filter those errors out. They are due to the fact that the auto completion plugin was not able to find all the include files it needs. Again, you either specify in the config files the directory where you created the view, or filter these errors out. LucaIl giorno 23 apr 2023, alle ore 18:15, Vinayak Vijay  ha scritto:Hi, thank you for your message. This has indeed allowed me to run dealii from any terminal without loading spack every time. However, the following error in vscode persists:How to fix this now?ThanksVinayakOn Sunday, April 23, 2023 at 3:00:53 PM UTC+2 luca@gmail.com wrote:An easy way (but it may slow down the startup of your bash terminals) would be to directly add to your .bashrc

spack load dealii

My preferred solution, instead, is to do the following: I create a `spack view` of all packages I need (i.e., just symbolic links to libraries and exectuable), using this command:

spack view -d yes add -i /some/path/to/an/empty/directory/of/your/choice/ dealii mpich (or openmpi, if that’s what’s installed) cmake ninja (gmsh, numdiff, etc.)

-d yes: add dependencies
-i: ignore errors

Then, in my bashrc, I add

export CMAKE_PREFIX_PATH=/some/path/to/a/directory/of/your/choice/
export PATH=/some/path/to/a/directory/of/your/choice/bin:$PATH

This makes sure that cmake sees everything, without having to load dealii explicitly with spack (which may take time, if you do it at every startup).

L.


> On 23 Apr 2023, at 12:50, Vinayak Vijay  wrote:
> 
> I get the error when i try to use "make". I am able to build using vscode now though. 
> 
> On Sunday, April 23, 2023 at 11:47:50 AM UTC+2 Vinayak Vijay wrote:
> I have added the DEAL_II_DIR variable in the cmake section of vscode  as follows:
> 
> Also, i have added the following lines to the .bashrc file for setting up the environment:
> 
> export SPACK_ROOT=/home/vinayak/spack
> export PATH="$SPACK_ROOT/bin:$PATH"
> 
> MODULES_HOME=$(spack location -i environment-modules)
> source ${MODULES_HOME}/init/bash
> . $SPACK_ROOT/share/spack/setup-env.sh
> 
> Now I get a different error:
> `
> cannot open source file "mpi.h" (dependency of "deal.II/grid/tria.h")
> `
> And i am still not able to use dealii upon terminal launch without using "spack load dealii". Not sure what more changes i need to make to the vscode setting to make this work. Can you point me to it? 
> 
> Thanks
> Vinayak
> On Sunday, April 23, 2023 at 11:02:53 AM UTC+2 luca@gmail.com wrote:
> Vscode does not call “spack load dealii “ by itself. If you want to be able to compile with vscode , you have two options: you instruct it where it can find dealii (setting variables in the cmake section of vscode settings) or adding the relevant variables to your shell initialization  files. If you open a new terminal and you are able to compile deal tutorials without calling any additional commands, then vscode will work.  
> 
> Luca
> 
>> Il giorno 23 apr 2023, alle ore 11:35, Vinayak Vijay  ha scritto:
>> 
>> 
>> "Do you have the cmake extension installed in vscode?" - Yes
>> 
>> The thing is that i have installed dealii using spack. So everything works smoothly if i just try to build from the terminal but not when i try to build using vscode cmake extension. I think VSCode (or vscode cmake extension) is not able to recognize the environment variable DEAL_II_DIR even when "spack load dealii" command is made from the vscode terminal. 
>> 
>> Vinayak
>> 
>> On Saturday, April 22, 2023 at 7:50:23 PM UTC+2 luca@gmail.com wrote:
>> Cmake does not know where to find a correct version of deal.ii. 
>> 
>> Are you trying to compile an example from the GitHub repository with an earlier release of deal.ii? If that’s the case, try removing the version from the find statement in the CMakeLists.txt. Otherwise you will have to instruct vscode where your library is installed. You can initiate cmake from the command line in the build directory manually, specifying the env variable DEAL_II_DIR. When a cmake cache is present, vscode uses it, and you may be able to get through. 
>> 
>> Luca
>> 
>>> Il giorno 22 apr 2023, alle ore 20:18, Abbas  ha scritto:
>>> 
>>> Do you have the cmake extension installed in vscode? 
>>> If not give it a try
>>> 
>>> Abbas
>>> 
>>> On Saturday, April 22, 2023 at 1:44:41 PM UTC+2 vinay...@gmail.com wrote:
>>> Hi,
>>> 
>>> I am trying to build step-1 using cmake on vscode. But vscode throws me this error:
>>> 
>>> `
>>> CMake Error at CMakeLists.txt:30 (message):
>>> 
>>> *** Could not locate a (sufficiently recent) version of deal.II.  ***
>>> 
>>> 
>>> 
>>> You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake
>>> 
>>> or set an environment variable "DEAL_II_DIR" that contains this path.
>>> 
>>> `
>>> I have installed dealii using spack. I am able to build using the terminal though. 

Re: [deal.II] Error building with cmake on vscode

2023-04-23 Thread Luca Heltai
An easy way (but it may slow down the startup of your bash terminals) would be 
to directly add to your .bashrc

spack load dealii

My preferred solution, instead, is to do the following: I create a `spack view` 
of all packages I need (i.e., just symbolic links to libraries and exectuable), 
using this command:

spack view -d yes add -i /some/path/to/an/empty/directory/of/your/choice/ 
dealii mpich (or openmpi, if that’s what’s installed) cmake ninja (gmsh, 
numdiff, etc.)

-d yes: add dependencies
-i: ignore errors

Then, in my bashrc, I add

export CMAKE_PREFIX_PATH=/some/path/to/a/directory/of/your/choice/
export PATH=/some/path/to/a/directory/of/your/choice/bin:$PATH

This makes sure that cmake sees everything, without having to load dealii 
explicitly with spack (which may take time, if you do it at every startup).

L.


> On 23 Apr 2023, at 12:50, Vinayak Vijay  wrote:
> 
> I get the error when i try to use "make". I am able to build using vscode now 
> though. 
> 
> On Sunday, April 23, 2023 at 11:47:50 AM UTC+2 Vinayak Vijay wrote:
> I have added the DEAL_II_DIR variable in the cmake section of vscode  as 
> follows:
> 
> Also, i have added the following lines to the .bashrc file for setting up the 
> environment:
> 
> export SPACK_ROOT=/home/vinayak/spack
> export PATH="$SPACK_ROOT/bin:$PATH"
> 
> MODULES_HOME=$(spack location -i environment-modules)
> source ${MODULES_HOME}/init/bash
> . $SPACK_ROOT/share/spack/setup-env.sh
> 
> Now I get a different error:
> `
> cannot open source file "mpi.h" (dependency of "deal.II/grid/tria.h")
> `
> And i am still not able to use dealii upon terminal launch without using 
> "spack load dealii". Not sure what more changes i need to make to the vscode 
> setting to make this work. Can you point me to it? 
> 
> Thanks
> Vinayak
> On Sunday, April 23, 2023 at 11:02:53 AM UTC+2 luca@gmail.com wrote:
> Vscode does not call “spack load dealii “ by itself. If you want to be able 
> to compile with vscode , you have two options: you instruct it where it can 
> find dealii (setting variables in the cmake section of vscode settings) or 
> adding the relevant variables to your shell initialization  files. If you 
> open a new terminal and you are able to compile deal tutorials without 
> calling any additional commands, then vscode will work.  
> 
> Luca
> 
>> Il giorno 23 apr 2023, alle ore 11:35, Vinayak Vijay  ha 
>> scritto:
>> 
>> 
>> "Do you have the cmake extension installed in vscode?" - Yes
>> 
>> The thing is that i have installed dealii using spack. So everything works 
>> smoothly if i just try to build from the terminal but not when i try to 
>> build using vscode cmake extension. I think VSCode (or vscode cmake 
>> extension) is not able to recognize the environment variable DEAL_II_DIR 
>> even when "spack load dealii" command is made from the vscode terminal. 
>> 
>> Vinayak
>> 
>> On Saturday, April 22, 2023 at 7:50:23 PM UTC+2 luca@gmail.com wrote:
>> Cmake does not know where to find a correct version of deal.ii. 
>> 
>> Are you trying to compile an example from the GitHub repository with an 
>> earlier release of deal.ii? If that’s the case, try removing the version 
>> from the find statement in the CMakeLists.txt. Otherwise you will have to 
>> instruct vscode where your library is installed. You can initiate cmake from 
>> the command line in the build directory manually, specifying the env 
>> variable DEAL_II_DIR. When a cmake cache is present, vscode uses it, and you 
>> may be able to get through. 
>> 
>> Luca
>> 
>>> Il giorno 22 apr 2023, alle ore 20:18, Abbas  ha 
>>> scritto:
>>> 
>>> Do you have the cmake extension installed in vscode? 
>>> If not give it a try
>>> 
>>> Abbas
>>> 
>>> On Saturday, April 22, 2023 at 1:44:41 PM UTC+2 vinay...@gmail.com wrote:
>>> Hi,
>>> 
>>> I am trying to build step-1 using cmake on vscode. But vscode throws me 
>>> this error:
>>> 
>>> `
>>> CMake Error at CMakeLists.txt:30 (message):
>>> 
>>> *** Could not locate a (sufficiently recent) version of deal.II.  ***
>>> 
>>> 
>>> 
>>> You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake
>>> 
>>> or set an environment variable "DEAL_II_DIR" that contains this path.
>>> 
>>> `
>>> I have installed dealii using spack. I am able to build using the terminal 
>>> though. What changes do i need to make for building using vscode?
>>> 
>>> 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/ade9af1e-1787-4840-b9db-c49e45dc6cc3n%40googlegroups.com.
>> 
>> -- 
>> The 

Re: [deal.II] Re: Error building with cmake on vscode

2023-04-23 Thread Luca Heltai
Vscode does not call “spack load dealii “ by itself. If you want to be able to compile with vscode , you have two options: you instruct it where it can find dealii (setting variables in the cmake section of vscode settings) or adding the relevant variables to your shell initialization  files. If you open a new terminal and you are able to compile deal tutorials without calling any additional commands, then vscode will work.  LucaIl giorno 23 apr 2023, alle ore 11:35, Vinayak Vijay  ha scritto:"Do you have the cmake extension installed in vscode?" - YesThe thing is that i have installed dealii using spack. So everything works smoothly if i just try to build from the terminal but not when i try to build using vscode cmake extension. I think VSCode (or vscode cmake extension) is not able to recognize the environment variable DEAL_II_DIR even when "spack load dealii" command is made from the vscode terminal. VinayakOn Saturday, April 22, 2023 at 7:50:23 PM UTC+2 luca@gmail.com wrote:Cmake does not know where to find a correct version of deal.ii. Are you trying to compile an example from the GitHub repository with an earlier release of deal.ii? If that’s the case, try removing the version from the find statement in the CMakeLists.txt. Otherwise you will have to instruct vscode where your library is installed. You can initiate cmake from the command line in the build directory manually, specifying the env variable DEAL_II_DIR. When a cmake cache is present, vscode uses it, and you may be able to get through. LucaIl giorno 22 apr 2023, alle ore 20:18, Abbas  ha scritto:Do you have the cmake extension installed in vscode? If not give it a tryAbbasOn Saturday, April 22, 2023 at 1:44:41 PM UTC+2 vinay...@gmail.com wrote:Hi,I am trying to build step-1 using cmake on vscode. But vscode throws me this error:`CMake Error at CMakeLists.txt:30 (message):*** Could not locate a (sufficiently recent) version of deal.II.  ***You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmakeor set an environment variable "DEAL_II_DIR" that contains this path.`I have installed dealii using spack. I am able to build using the terminal though. What changes do i need to make for building using vscode?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/ade9af1e-1787-4840-b9db-c49e45dc6cc3n%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/70f20c32-2221-4195-9e1f-cb23c10507e1n%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/CA583EFF-23EF-45F5-8240-DAA14631C3EB%40gmail.com.


Re: [deal.II] Re: Error building with cmake on vscode

2023-04-22 Thread Luca Heltai
Cmake does not know where to find a correct version of deal.ii. Are you trying to compile an example from the GitHub repository with an earlier release of deal.ii? If that’s the case, try removing the version from the find statement in the CMakeLists.txt. Otherwise you will have to instruct vscode where your library is installed. You can initiate cmake from the command line in the build directory manually, specifying the env variable DEAL_II_DIR. When a cmake cache is present, vscode uses it, and you may be able to get through. LucaIl giorno 22 apr 2023, alle ore 20:18, Abbas  ha scritto:Do you have the cmake extension installed in vscode? If not give it a tryAbbasOn Saturday, April 22, 2023 at 1:44:41 PM UTC+2 vinay...@gmail.com wrote:Hi,I am trying to build step-1 using cmake on vscode. But vscode throws me this error:`CMake Error at CMakeLists.txt:30 (message):*** Could not locate a (sufficiently recent) version of deal.II.  ***You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmakeor set an environment variable "DEAL_II_DIR" that contains this path.`I have installed dealii using spack. I am able to build using the terminal though. What changes do i need to make for building using vscode?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+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/ade9af1e-1787-4840-b9db-c49e45dc6cc3n%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/10A3FA15-956D-4860-97CB-BD2081C48DFE%40gmail.com.


Re: [deal.II] Re: Trouble installing p4est from candi M1 mac

2023-04-07 Thread Luca Heltai
Can you try if the mac package for M1 Ventura (9.4.0) works for you?LucaIl giorno 7 apr 2023, alle ore 14:11, blais...@gmail.com  ha scritto:What I would suggest is to not use GCC, but instead use the clang compiler native with the Mac M1.At least this is how I did it on my apple M1 macbook pro computerOn Thursday, April 6, 2023 at 6:25:13 a.m. UTC-4 malve...@gmail.com wrote:Good afternoon.I’m truly sorry to bother you, but I’ve spent a lot of time trying to fix this problem, without any success.I’m trying to install dealii on my M1 macbook air with MacOs Ventura.Ive been following the guide on https://github.com/dealii/dealii/wiki/Apple-ARM-M1-OSXI installed brewI verified I have mac developer tools updatedUsing brew I installed cmake and openmpi.Using brew, with much more effort and not complete certainty of success, I installed gcc11.I cloned candi git repo.I set the following env variables, to use clang instead of gcc11:	export CC=mpicc; export CXX=mpicxx; export FC=mpifort; export FF=mpifort; \ 	OMPI_CC=clang; export OMPI_CXX=clang++; export OMPI_FC=gfortran-1I began installing the packages together but had troubles.So I proceeded doing them one by one.hdf5 went fineBut p4est exits with the following error:Build FAST version in /Users/matteom/dealii-candi/tmp/build/p4est-2.3.2/FAST/Users/##/dealii-candi/tmp/unpack/p4est-2.3.2/configure: line 4056: test: argument expectedconfigure: error: in `/Users/##/dealii-candi/tmp/build/p4est-2.3.2/FAST':configure: error: Fortran 77 compiler cannot create executablesSee `config.log' for more detailsError: Error in configureNote: I even tried to switch to Master branch, but nothing changed.Do you have any clue what I could try next?Thanks for your cooperation.Best wishes,Matteo Malvestiti



-- 
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/24357a2e-1b43-4ed3-b841-19760e650d96n%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/13F0DD0F-05D4-4510-B51E-B7B155EA973D%40gmail.com.


Re: [deal.II] B-spline basis functions to interpolate nodal values (control points) in 1d

2023-02-20 Thread Luca Heltai
Simon,

If you are willing to do some work, Bernstein basis functions are implemented 
in deal.II (which are B-spline basis with C0 continuity). 

You could exploit BezierExtractor  

https://onlinelibrary.wiley.com/doi/full/10.1002/nme.2968

and use the facilities of deal.II to work with cubic B-Splines. This is 
implemented in deal.II, and available with poor documentation, here:

https://github.com/mathLab/IGA-dealii

You can learn about the data structures by looking at

https://iris.sissa.it/retrieve/dd8a4bf7-09b3-20a0-e053-d805fe0a8cb0/1963_35160_Tezzele_tesi.pdf

Let me know if you need assistance in using the relative classes. 

There are two examples that solve a poisson problem and an obstacle problem. 
We’ll try to make this a gallery example to make it more accessible. 

L.

> On 19 Feb 2023, at 20:45, Wolfgang Bangerth  wrote:
> 
> On 2/15/23 06:50, Simon wrote:
>> my objective is to do an 1d-approximation
>> F(x) = N_i(x) P_i
>> where N_i are cubic B-spline basis functions and P_i known nodal values 
>> (control points).
>> To assemble my linear system, I have to compute the first and second 
>> derivatives of F at the quadrature points of the triangulation.
>> Since the number of control points P_i is quite moderate (less than 20), I 
>> think it is reasonable to evaluate all basis functions N_i in lieu of 
>> implementing an entire finite element class.
>> I scanned the dealii manual but could only find a CSpline class 
>> .
>> Just to make sure:
>> B-Spline (basis) functions are not implemented in dealii yet, right?
> 
> Simon -- that is correct. I suspect (but don't know) that you also want to 
> use spline basis functions that span across more than one cell; that is an 
> uncommon operation for finite element libraries and there is not much support 
> implemented for these kinds of things -- in particular, there are none of the 
> spline basis functions one might use for this.
> 
> 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/94d2fa54-291e-97dd-189d-01826aa687a2%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/647A374C-4D71-4204-9238-B27226D399C2%40gmail.com.


Re: [deal.II] How to apply Spherical Manifold

2023-02-20 Thread Luca Heltai
At the moment, you are setting the manifold ID on the boundary of your *domain* 
with the call to 


tri.set_all_manifold_ids_on_bounary(4);
tri.set_manifold (4, manifold_neg);

And then you are telling the triangulation to use on it the  
SphericalManifold<2> manifold_neg(center).
Then you re-do the same thing (i.e., you define all boundaries *of the 
triangulation*) with the other id (5), and again set another manifold


tri.set_all_manifold_ids_on_bounary(5);
tri.set_manifold (5, manifold_neg);

The effect of this is: your domain *boundary* now has id 5, and in fact the 
faces of the boundary, upon refinement try to refine according to polar 
coordinates around the center of `manifold_neg`.

what you really want to do is to identify the regions you want to behave like 
manifold_neg (NOT the domain boundary, so the call to 
tri.set_all_manifold_ids_on_bounary should not be there).

in your first picture, identify the cells that belong to id 4:

for cell in first region:
cell->set_all_boundary_ids(4);

then do the same with the second region:

for cell in first region:
cell->set_all_boundary_ids(5);

and at this point instruct the triangulation that those two different region, 
follow different manifold rules:

tri.set_manifold (4, manifold_neg);
tri.set_manifold (5, manifold_pos);

The logic here is this one:

1. identify what region is described by what manifold (cell, face, line, etc. 
->set_manifold_id(…)) using an identification (a manifold id)
2. tell the triangulation that the region identified by the chosen manifold id 
must obey the given manifold description (tria.set_manifold(manifold_id, 
manifold_object)

You are doing this with the boundary of the domain (that has nothing to do with 
the regions you colored differently), and you are assigning *the same id* to 
the two regions, so the triangulation does what you asked for: it uses only one 
descriptor (because the other id is not present in the triangulation), and it 
uses it in both regions *and* on the boundary.

L.




> On 20 Feb 2023, at 8:35, Deepika Kushwah  wrote:
> 
> Thank you for your response.
> 
> I have also tried to set the manifold ids of the two regions with two 
> different numbers but the problem is not solved yet.
> 
> 
> What else can I do?
> 
> 
> Thanks,
> Deepika
> 
> On Mon, Feb 20, 2023 at 12:34 PM Luca Heltai  wrote:
> You should set the manifold ids of the two regions to different numbers, and 
> add the second manifold with the second id you choose,  otherwise the second 
> call is simply overwriting the first one, and they are both described by the 
> last manifold. 
> 
> Luca
> 
>> Il giorno 20 feb 2023, alle ore 07:08, Deepika Kushwah 
>>  ha scritto:
>> 
>> 
>> Hello Everyone,
>> 
>> I have created a merged geometry by using subdivided_hyper_cube and two 
>> hyper_ball functions. See below 
>> <20.png>
>> 
>>  Now I want to apply a Spherical Manifold in place of the default manifold. 
>> I have tried the following code but it is not working for both hyper_ball 
>> simultaneously. 
>> 
>>  std::vector< unsigned int > repetitions(4);
>>   GridGenerator::subdivided_hyper_cube(tria_1, 4, -1., 1.);
>>   
>>   std::set::active_cell_iterator> cells_to_remove;
>>   
>>   for (auto  : tria_1.active_cell_iterators())
>>   {
>> if ((cell->center()[0] == -0.25) && (cell->center()[1] == -0.25))
>> {
>> cells_to_remove.insert(cell);
>> }
>> if ((cell->center()[0] == 0.25) && (cell->center()[1] == 0.25))
>>{
>> cells_to_remove.insert(cell);
>>}
>>   }
>>
>>   GridGenerator::create_triangulation_with_removed_cells(tria_1, 
>> cells_to_remove,tria_2);
>> Point<2> center (-.25,-.25);
>> GridGenerator::hyper_ball (tria_3, center, 0.354);
>>  
>>GridGenerator::merge_triangulations (tria_2, tria_3,triangulation);
>> 
>>   Point<2> center_1 (.25,.25);
>>   GridGenerator::hyper_ball (tria_4, center_1, 0.354);
>>   
>>   GridGenerator::merge_triangulations (triangulation, tria_4, tri);
>>   
>> 
>>  //tri.reset_all_manifolds();
>> //tri.set_all_manifold_ids(0);
>>   
>>  SphericalManifold<2> manifold_neg(center);
>>  SphericalManifold<2> manifold_pos(center_1);
>>   
>>  tri.set_all_manifold_ids_on_boundary(0);
>>  tri.set_manifold (0, manifold_neg);
>>  tri.set_all_manifold_ids_on_boundary(0);
>>  tri.set_manifold (0, manifold_pos);
>>  
>>   tri.refine_global(3);
>> 
>> The output of the code is:
>> 
>> 
>> 
>>

Re: [deal.II] How to apply Spherical Manifold

2023-02-19 Thread Luca Heltai
You should set the manifold ids of the two regions to different numbers, and add the second manifold with the second id you choose,  otherwise the second call is simply overwriting the first one, and they are both described by the last manifold. LucaIl giorno 20 feb 2023, alle ore 07:08, Deepika Kushwah  ha scritto:Hello Everyone,I have created a merged geometry by using subdivided_hyper_cube and two hyper_ball functions. See below <20.png> Now I want to apply a Spherical Manifold in place of the default manifold. I have tried the following code but it is not working for both hyper_ball simultaneously.  std::vector< unsigned int > repetitions(4);  GridGenerator::subdivided_hyper_cube(tria_1, 4, -1., 1.);    std::set::active_cell_iterator> cells_to_remove;    for (auto  : tria_1.active_cell_iterators())      {        if ((cell->center()[0] == -0.25) && (cell->center()[1] == -0.25))        {        cells_to_remove.insert(cell);        }        if ((cell->center()[0] == 0.25) && (cell->center()[1] == 0.25))       {        cells_to_remove.insert(cell);       }      }     GridGenerator::create_triangulation_with_removed_cells(tria_1, cells_to_remove,tria_2);    Point<2> center (-.25,-.25);    GridGenerator::hyper_ball (tria_3, center, 0.354);    GridGenerator::merge_triangulations (tria_2, tria_3,triangulation);      Point<2> center_1 (.25,.25);  GridGenerator::hyper_ball (tria_4, center_1, 0.354);    GridGenerator::merge_triangulations (triangulation, tria_4, tri);   //tri.reset_all_manifolds();//tri.set_all_manifold_ids(0);   SphericalManifold<2> manifold_neg(center); SphericalManifold<2> manifold_pos(center_1);   tri.set_all_manifold_ids_on_boundary(0); tri.set_manifold (0, manifold_neg); tri.set_all_manifold_ids_on_boundary(0); tri.set_manifold (0, manifold_pos);   tri.refine_global(3);The output of the code is:I want to apply a spherical manifold for both hyper_balls. Can you please suggest to me how I can do this? Thanks and Regard,Deepika


**
This e-mail is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. If you are not the
intended recipient, please contact the sender by reply e-mail and destroy
all copies and the original message. Any unauthorized review, use,
disclosure, dissemination, forwarding, printing or copying of this email
is strictly prohibited and appropriate legal action will be taken. 






-- 
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/CAKTdrpps7Cs2Nbt8YeNa%3Dw1RZL8qX6msXVvOxorY-2CRPEXGDg%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/0DF5F73C-EA4F-427F-A268-766CA41F3E9D%40gmail.com.


Re: [deal.II] SIPG is misbehaving at the corners which separate a Dirichlet and a Neumann BC .

2023-01-11 Thread Luca Heltai
I didn’t mean to sound too harsh, sorry for that. I could spot the mistake 
right away because it is a mistake I do all the time. 

No embarrassment is needed, and no question is ever a stupid question. Don’t 
worry! I’ve been in your shoes so many times I cannot count them anymore… 

:) 

Luca.

> On 11 Jan 2023, at 14:33, Abbas  wrote:
> 
> Well, this is embarrassing.
> Thank you very much   
> 
> On Wednesday, January 11, 2023 at 3:11:11 PM UTC+2 luca@gmail.com wrote:
> You have an issue in your boundary worker. 
> 
> 
> The boundary worker is called passing a cell, a face_no, scratch, and copy. 
> Yet, in your code, you loop again on the faces of the cell: 
> 
> 
> for (const auto  : cell->face_iterators()) 
> { 
> if ( ((face->boundary_id() == 0) || (face->boundary_id() == 1))) 
> 
> 
> this should become 
> 
> if((cell->face(face_no)->boundary_id() == 0) || 
> (cell->face(face_no)->boundary_id() == 1) { 
> 
> … 
> 
> } 
> 
> otherwise, you are going to assemble the face terms twice on the four 
> corners. 
> 
> Best, 
> Luca. 
> 
> > On 11 Jan 2023, at 12:05, Abbas  wrote: 
> > 
> > Hello, 
> > 
> > Setting: 
> > 1) Unit square domain, 
> > 2) Simple scalar Laplacian with no source term. 
> > 3) 0 and 1 Dirichlet on opposite ends of the square and zero Neumann on the 
> > other two edges. 
> > 
> > I am trying to solve the above problem using SIPG by adopting step 74. The 
> > expected solution should be perfectly linear with a constant gradient as 
> > the problem reduces to a pseudo 1-D problem. 
> > 
> > That is the case if I use CG, but with DG I do not get a perfectly linear 
> > solution and that is causing me problems. 
> > 
> > I have attached below a single image file that includes: 
> > 1) The solution. 
> > 2) The solution gradient with weird behaviour at the corners 
> > 3) Line plot of the solution across the lower wall. 
> > 
> > and the code I am using which is based on step 74. 
> > 
> > Things I tried/looked into: 
> > - I tried to adapt the code to CG and I get the expected results. I can't 
> > straight up impose BCs strongly with DG here. 
> > - I am sure this isn't a Paraview issue because I tried integrating across 
> > the boundary within deal and I am getting mesh dependent results. 
> > - The weak form is correct. The Neuman BC shows up as a boundary integral 
> > in the rhs which has no contribution. (Neumann zero at these walls). 
> > - I looked into the distributed LDG method within the dealii gallary and 
> > adopted it to these BCs and I didn't have this problem. 
> > 
> > The only thing I haven't tried yet is to do a simple problem by hand and 
> > compare the dealii and my outputs. Before doing that, any ideas on how I 
> > can debug this? Is this something associated with imposing BCs weakly with 
> > SIPG and will happen no matter what? 
> > 
> > best, 
> > 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/df72814c-0cdc-4215-819c-46f5a8d05e84n%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/35d379b6-4297-457e-90d3-14173b5c234dn%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/CE5ADBF4-98D5-47C0-A0A6-F84CB6764C05%40gmail.com.


Re: [deal.II] SIPG is misbehaving at the corners which separate a Dirichlet and a Neumann BC .

2023-01-11 Thread Luca Heltai
You have an issue in your boundary worker. 


The boundary worker is called passing a cell, a face_no, scratch, and copy. 
Yet, in your code, you loop again on the faces of the cell:


  for (const auto  : cell->face_iterators())
  {
  if ( ((face->boundary_id() == 0) || (face->boundary_id() == 1)))


this should become

if((cell->face(face_no)->boundary_id() == 0)  || 
(cell->face(face_no)->boundary_id() == 1) {

 …

}

otherwise, you are going to assemble the face terms twice on the four corners.

Best,
Luca.

> On 11 Jan 2023, at 12:05, Abbas  wrote:
> 
> Hello, 
> 
> Setting: 
> 1) Unit square domain, 
> 2) Simple scalar Laplacian with no source term.  
> 3) 0 and 1 Dirichlet on opposite ends of the square and zero Neumann on the 
> other two edges. 
> 
> I am trying to solve the above problem using SIPG by adopting step 74. The 
> expected solution should be perfectly linear with a constant gradient as the 
> problem reduces to a pseudo 1-D problem. 
> 
> That is the case if I use CG, but with DG I do not get a perfectly linear 
> solution and that is causing me problems.  
>  
> I have attached below a single image file that includes: 
> 1) The solution.
> 2) The solution gradient with weird behaviour at the corners 
> 3) Line plot of the solution across the lower wall. 
> 
> and the code I am using which is based on step 74. 
> 
> Things I tried/looked into: 
> - I tried to adapt the code to CG and I get the expected results. I can't 
> straight up impose BCs strongly with DG here. 
> - I am sure this isn't a Paraview issue because I tried integrating across 
> the boundary within deal and I am getting mesh dependent results. 
> - The weak form is correct. The Neuman BC shows up as a boundary integral in 
> the rhs which has no contribution. (Neumann zero at these walls).  
> - I looked into the distributed LDG method within the dealii gallary and 
> adopted it to these BCs and I didn't have this problem. 
> 
> The only thing I haven't tried yet is to do a simple problem by hand and 
> compare the dealii and my outputs. Before doing that, any ideas on how I can 
> debug this? Is this something associated with imposing BCs weakly with SIPG 
> and will happen no matter what? 
> 
> best,
> 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/df72814c-0cdc-4215-819c-46f5a8d05e84n%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/09F64793-8B26-4AD7-9B65-799A6CE3133C%40gmail.com.


Re: [deal.II] Re: Doubt Related to DataPostprocessor class

2022-11-23 Thread Luca Heltai
You should also change the extension of the file to “.vtu”. (When you define the file name in the program). You changed “write_vtk” to “write_vtu” but you kept the extension of the vtk format. Paraview thinks it is a vtk format, and does not recognize it. LucaIl giorno 24 nov 2022, alle ore 05:23, Deepika Kushwah  ha scritto:Thank you for your reply. Yes it is working. But now the problem is how to visualize these files in paraview?it showing the following error:       [ 66%] Linking CXX executable step-8[ 66%] Built target step-8[100%] Run step-8 with Debug configurationCycle 0:   Number of active cells:       256   Number of degrees of freedom: 578Cycle 1:   Number of active cells:       484   Number of degrees of freedom: 1082Cycle 2:   Number of active cells:       922   Number of degrees of freedom: 2030Cycle 3:   Number of active cells:       1750   Number of degrees of freedom: 3774Cycle 4:   Number of active cells:       3319   Number of degrees of freedom: 7064Cycle 5:   Number of active cells:       6301   Number of degrees of freedom: 13124Cycle 6:   Number of active cells:       11935   Number of degrees of freedom: 24838Cycle 7:   Number of active cells:       22543   Number of degrees of freedom: 46256[100%] Built target rundeepika@deepika-virtual-machine:~/dealii/examples/step-8$ paraviewWarning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.Mesa warning: Window 20971529 has no colormap!Mesa warning: Window 20971532 has no colormap!Mesa warning: Window 20971542 has no colormap!ERROR: In /home/ubuntu/OpenFOAM/ThirdParty-dev/ParaView-5.6.3/VTK/IO/XMLParser/vtkXMLParser.cxx, line 391vtkXMLDataParser (0x5640c1c302a0): Error parsing XML in stream at line 37, column 0, byte index 20093: junk after document elementERROR: In /home/ubuntu/OpenFOAM/ThirdParty-dev/ParaView-5.6.3/VTK/IO/XML/vtkXMLReader.cxx, line 488vtkXMLUnstructuredGridReader (0x5640c1c7b1a0): Error parsing input file.  ReadXMLInformation aborting.Also it is asking the reader to open the vtk & vtu files. On Wed, Nov 23, 2022 at 11:08 PM Abbas  wrote:Change "data_out.write_vtk (output);" to "data_out.write_vtu (output);" https://groups.google.com/g/dealii/c/T1ckYL0Le_U/m/54r575TiAwAJOn Wednesday, November 23, 2022 at 11:16:42 AM UTC+2 deepika...@iitgoa.ac.in wrote:Hello Everyone,I am trying to calculate the gradient of displacement for step 8, for that, I am using the Datapostprocessor Tensor class (same example code which is given in the documentation here - https://www.dealii.org/current/doxygen/deal.II/classDataPostprocessorTensor.html) but I am getting the following error: 66%] Linking CXX executable step-8[ 66%] Built target step-8[100%] Run step-8 with Debug configurationCycle 0:   Number of active cells:       256   Number of degrees of freedom: 578Exception on processing: An error occurred in line <5286> of file <./source/base/data_out_base.cc> in function    void dealii::DataOutBase::write_vtk(const std::vector >&, const std::vector >&, const std::vector, std::allocator >, dealii::DataComponentInterpretation::DataComponentInterpretation> >&, const dealii::DataOutBase::VtkFlags&, std::ostream&) [with int dim = 2; int spacedim = 2; std::ostream = std::basic_ostream]The violated condition was:     std::get<3>(nonscalar_data_range) != DataComponentInterpretation::component_is_part_of_tensorAdditional information:     You are trying to use functionality in deal.II that is currently not    implemented. In many cases, this indicates that there simply didn't    appear much of a need for it, or that the author of the original code    did not have the time to implement a particular case. If you hit this    exception, it is therefore worth the time to look into the code to    find out whether you may be able to implement the missing    functionality. If you do, please consider providing a patch to the    deal.II development sources (see the deal.II website on how to    contribute).Aborting!make[3]: *** [CMakeFiles/run.dir/build.make:71: CMakeFiles/run] Error 1make[2]: *** [CMakeFiles/Makefile2:116: CMakeFiles/run.dir/all] Error 2make[1]: *** [CMakeFiles/Makefile2:123: CMakeFiles/run.dir/rule] Error 2make: *** [Makefile:137: run] Error 2How to resolve this? Thanks & Regards,Deepika


**
This e-mail is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. If you are not the
intended recipient, please contact the sender by reply e-mail and destroy
all copies and the original message. Any unauthorized review, use,
disclosure, dissemination, forwarding, printing or copying of this email
is strictly prohibited and appropriate legal 

Re: [deal.II] UMFPACK ISSUE.

2022-07-05 Thread Luca Heltai
This part of the message contains all the information you need to fix the 
issue. 

Luca

> Il giorno 5 lug 2022, alle ore 06:46, ME20D503 NEWTON  
> ha scritto:
> 
> Additional information: 
> To call this function you need UMFPACK, but you configured deal.II
> without passing the necessary switch to 'cmake'. Please consult the
> installation instructions in doc/readme.html.

-- 
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/568CF12F-1424-4A00-9F63-8FE1ACBD2D4A%40gmail.com.


Re: [deal.II] Supported matrix/vector to LinearOperator

2022-04-20 Thread Luca Heltai
> While I can't get the entity of the matrix, I want to get the precondition 
> directly from a linear_operator. 


> SparseMatrix M; 
> auto op_M = linear_operator(M); 
> TrilinosWrapper::PreconditionILU prec_M(op_M);

This you cannot do. It is the other way around. Preconditioners need matrices 
(linear operator only store information about the *action* of the matrix, or of 
the various operations. Think of it this way: A*B*C*D_inv is still a linear 
operator. What matrix should this return to you?)

This is how you should use it, if you want your preconditioner to be a linear 
operator:

TrilinosWrapper::PreconditionILU prec_M_mat(M);
auto op prec_M = linear_operator(M, prec_M_mat);

> Can I get the entity of matrix G by TrilinosWrapper::MPI::SparseMatrix G = 
> op_G; or the precondition of op_G?

Nope. This, again, does not make sense.

A Matrix is a linear operator (therefore you can create a linear operator from 
a matrix), but a linear operator is just an action (therefore you cannot create 
a matrix from a linear operator).

L

-- 
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/7126F8FD-80F7-4766-B3C3-985274A281F0%40gmail.com.


Re: [deal.II] Supported matrix/vector to LinearOperator

2022-04-20 Thread Luca Heltai
The issue is within Trilinos itself.

The TrilinosPayload (thanks JP!) provides an interface to Epetra_LinearOperator 
(Trilinos version of our LinearOperator). However, it cannot access matrix 
elements, as it is not thought for matrix based operations. 

You can, however, create a direct solver, wrap it into a LinearOperator, and 
use the direct solver as a preconditioner, or as one block of a Block 
preconditioner/solver. Simple workflow:

YourDirectSolverHere Ainv;

Ainv.initialze(A); // A is the actual Trilinos Matrix here, not a linear 
operator, since direct solvers need access to the matrix entries

auto Aop = linear_operator(A);
auto AinvOp = linear_operator(A, Ainv);

Now you can use Aop and AinvOp, i.e., 

auto S = Bt*AinvOp*B;

would crate a Schur complement.

Take a look at step-70, in the solve() function. There you have an example on 
how to use them with a block system.

L.

> On 19 Apr 2022, at 19:19, Jean-Paul Pelteret  wrote:
> 
> Dear Chen,
> 
> Bruno pointed you to the exact example that I was going to. It is certainly 
> possible to use linear operators as preconditioners for solvers.
> 
> It looks like support for TrilinosWrappers::SolverDirect has not yet been 
> implemented:
> https://github.com/dealii/dealii/blob/master/tests/lac/linear_operator_10.cc#L371-L414
> I cannot recall what the reason was — maybe the class is simply missing some 
> functions that are defined for the iterative solvers?
> 
> As for one of your early questions which Bruno did already answer: I must 
> admit that I do not know if the PETSc linear algebra is compatible with 
> linear operators. We had to write a special TrilinosPayload for the Trilinos 
> linear algebra classes in order for them to work correctly (with the Trilinos 
> solvers, at least), and such a wrapper doesn’t exist for PETSc. But maybe it 
> works just fine if you stick to the deal.II solvers? If you try this out, it 
> would be interesting to know if it works or not.
> 
> Best,
> J-P
> 
>> On 19. Apr 2022, at 17:27, Bruno Turcksin  wrote:
>> 
>> Chen,
>> 
>> I am not sure if TrilinosWrappers::SolverDirect is supported but for your 
>> second point, you can use the linear_operator as a preconditioner. That's 
>> exactly what's done here for example. The preconditioner is wrapped in a 
>> LinearOperator and this LinearOperator is then used as preconditioner.
>> 
>> Best,
>> 
>> Bruno
>> 
>> On Tuesday, April 19, 2022 at 10:39:17 AM UTC-4 hkch...@gmail.com wrote:
>> Hi everyone,
>> 
>> More questions:
>> 1. where can I find the supported linear solver of Trilinos of 
>> linear_operator? TrilinosWrappers::SolverDirect seems not to be supported by 
>> the linear_operator
>> 2. Does linear_operator can be a preconditioner? for example, SparseMatrix 
>> A, B, C, D, E, F; Matrix G=A-B*C^{-1}*D-E^{-1}*F; So Matrix G can only 
>> represent by a linear_operator, not its entity. I want to get its inverse by 
>> inverse_operator using some linear solvers as: PreconditionILU prec_G(op_G); 
>> const auto op_G_inv = inverse_operator(G, Solver, prec_G); But it seems that 
>> the precondition of linear_operator is not supported. Is there any solution?
>> 
>> best 
>> Chen
>> 
>> 在2022年4月18日星期一 UTC+8 22:07:36 写道:
>> Bruno Turcksin
>> Thank you! it really helpful!
>> 
>> best
>> chen
>> 在2022年4月18日星期一 UTC+8 21:07:45 写道:
>> Chen,
>> 
>> Yes, LinearOperator does support Trilinos and PETSc matrices. LinearOperator 
>> even supports your own matrix type as long as you define vmult and Tvmult 
>> (see here)
>> 
>> Best,
>> 
>> Bruno
>> 
>> On Monday, April 18, 2022 at 4:19:42 AM UTC-4 hkch...@gmail.com wrote:
>> Hi everyone,
>> 
>> When solving a block matrix system, the LinearOperator is a useful tool. My 
>> question is whether the LinearOpertor supports Matrix type (the same as the 
>> Vector type) like PETSCWrapper::MPI::SparseMatrix or 
>> TrilinosWrapper::MPI::SparseMatrix?
>> 
>> Best
>> Chen
>> 
>> -- 
>> 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/6ee40751-54ae-402d-903e-ae745545387bn%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 
> 

Re: [deal.II] My problem with dealii parallel scaling

2022-02-09 Thread Luca Heltai
Another option you have on Ubuntu is to install deal.ii with apt-get. If you 
follow the instructions of our web site, it is straight forward and much 
faster. 

Luca

> Il giorno 10 feb 2022, alle ore 03:20, Wolfgang Bangerth 
>  ha scritto:
> 
> On 2/9/22 17:12, Mohammad Fazli wrote:
>> It might be possible for my case the problem comes from my installation. 
>> Therefore, how do you usually install dealli on Ubuntu along with its 
>> dependencies (like P4est, Trilinos, METIS, ...)?
> 
> I personally install everything by hand, mainly because I've always done it 
> that way. But that's a stupid approach, and using candi is exactly what you 
> should be doing.
> 
> As for the error you show, you need to scroll up to see what the error 
> actually is. What you show only says "an error has happened at some time 
> before", but you need to find what that error actually is.
> 
> 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/8fcafe24-1426-b00a-9039-d3731bdbfc14%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/E426AAA6-9380-4BCC-BB2D-4628BA3B8931%40gmail.com.


[deal.II] Re: MPI and Docker

2021-12-31 Thread Luca Heltai
This happened to me when I forgot to call `DEAL_II_SETUP_TARGET` from the 
CMakeLists.txt. Did you resolve this issue?

On Tuesday, December 14, 2021 at 9:54:42 AM UTC+1 jack urombo wrote:

> The current docker image is not finding mpi.h
>
>
>
>
>
>
>
>
>
>
>
> *[ 50%] Building CXX object CMakeFiles/cdr.dir/cdr.cc.o In file included 
> from /usr/include/deal.II/base/conditional_ostream.h:19, 
> from /home/dealii/dealii/cdr/cdr.cc:1: 
> /usr/include/deal.II/base/config.h:490:12: fatal error: mpi.h: No such file 
> or directory  490 | #  include   |^~~ 
> compilation terminated. make[2]: *** [CMakeFiles/cdr.dir/build.make:63: 
> CMakeFiles/cdr.dir/cdr.cc.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:76: 
> CMakeFiles/cdr.dir/all] Error 2 make: *** [Makefile:84: all] Error 2 
> dealii@cdab72233c4c:~/dealii/cdr$ *
>

-- 
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/17e96956-4b5a-43f9-88f9-57ef8adecbc9n%40googlegroups.com.


Re: [deal.II] Inaccurate convergence rate using ParsedConvergenceTable class

2021-08-08 Thread Luca Heltai
The other option is that you are not calling the `error_from_exact` function 
that takes a mapping argument, but the one without it, and your boundary cells 
are introducing some error due to a worse mapping…. Are you calling 
`error_from_exact` with mapping as a first argument?

Luca

> Il giorno 8 ago 2021, alle ore 6:49 PM, Luca Heltai  
> ha scritto:
> 
> 
> Ciao Marco,
> 
>> I was expanding step-12 using a manufactured solution to check the order p 
>> in H^1 (and p+1 in L^2) norm on a uniformly refined mesh for the DG upwind 
>> method. I've used the ParsedConvergenceTable with a parameter file as 
>> described in the docs. As Rate_key I'm using the DoFs, while as Rate_mode I 
>> have reduction_rate_log2. 
>> 
>> With p=1 and p=2 everything is fine. But if I set the finite element degree 
>> to 3, then the H^1 convergence rate decreases, as you can see in the 
>> attached image.
>> 
> 
> Is it possible that you are using different quadrature rules in the two 
> cases? Your image shows a deterioration of the error on the order of 1e-8 for 
> H1, and 1e-12 for L2, which is very close to machine precision.
> 
> Internally the parsed convergence table does the exact same thing you wrote 
> explicitly. (If you check the source code, you’ll see that it calls 
> integrate_difference and compute_global_error for each error type you specify 
> in the parameter file).
> 
>> This, however, doesn't happen if I use a classical ConvergenceTable. Namely, 
>> I first compute the local error in each cell, and then the global error in 
>> the classical way:
>> VectorTools::integrate_difference(mapping,dof_handler,solution, 
>> Solution(),H1_error_per_cell, 
>> QGauss(fe->tensor_degree()+1),VectorTools::H1_norm);
>> 
>> const double H1_error = VectorTools::compute_global_error(triangulation, 
>> H1_error_per_cell,  VectorTools::H1_norm); //assuming I provided also the 
>> gradient method for the Solution class
>> 
>> 
>> 
>> Does anyone have any idea why this is happening? My guess was that while 
>> computing the H^1 semi-norm the ParsedConvergenceTable class does some 
>> approximation to compute the gradient from the exact solution expression and 
>> hence that could be the source of the issue. Conversely, in the 
>> "ConvergenceTable" way I do define explicitly the gradient of the exact 
>> solution in the Solution class.
> 
> If the Solution class implements the Gradient, then 
> ParsedConvergenceTable should use that. 
> 
> You are calling “error_from_exact” of that class, right?
> 
> This is where it is called:
> 
> https://www.dealii.org/current/doxygen/deal.II/parsed__convergence__table_8h_source.html
> 
> Line 621. As you see, the quadrature rule used is a Gauss formula of order 
> (dh.get_fe().degree+1)*2.
> 
> Can you check if you get the same results with this order?
> 
> L.

-- 
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/1D73F9DA-128C-4CB4-B154-D915344238A0%40gmail.com.


Re: [deal.II] Inaccurate convergence rate using ParsedConvergenceTable class

2021-08-08 Thread Luca Heltai
Ciao Marco,

> I was expanding step-12 using a manufactured solution to check the order p in 
> H^1 (and p+1 in L^2) norm on a uniformly refined mesh for the DG upwind 
> method. I've used the ParsedConvergenceTable with a parameter file as 
> described in the docs. As Rate_key I'm using the DoFs, while as Rate_mode I 
> have reduction_rate_log2. 
> 
> With p=1 and p=2 everything is fine. But if I set the finite element degree 
> to 3, then the H^1 convergence rate decreases, as you can see in the attached 
> image.
> 

Is it possible that you are using different quadrature rules in the two cases? 
Your image shows a deterioration of the error on the order of 1e-8 for H1, and 
1e-12 for L2, which is very close to machine precision.

Internally the parsed convergence table does the exact same thing you wrote 
explicitly. (If you check the source code, you’ll see that it calls 
integrate_difference and compute_global_error for each error type you specify 
in the parameter file).

> This, however, doesn't happen if I use a classical ConvergenceTable. Namely, 
> I first compute the local error in each cell, and then the global error in 
> the classical way:
> VectorTools::integrate_difference(mapping,dof_handler,solution, 
> Solution(),H1_error_per_cell, 
> QGauss(fe->tensor_degree()+1),VectorTools::H1_norm);
> 
> const double H1_error = VectorTools::compute_global_error(triangulation, 
> H1_error_per_cell,  VectorTools::H1_norm); //assuming I provided also the 
> gradient method for the Solution class
> 
> 
> 
> Does anyone have any idea why this is happening? My guess was that while 
> computing the H^1 semi-norm the ParsedConvergenceTable class does some 
> approximation to compute the gradient from the exact solution expression and 
> hence that could be the source of the issue. Conversely, in the 
> "ConvergenceTable" way I do define explicitly the gradient of the exact 
> solution in the Solution class.

If the Solution class implements the Gradient, then ParsedConvergenceTable 
should use that. 

You are calling “error_from_exact” of that class, right?

This is where it is called:

https://www.dealii.org/current/doxygen/deal.II/parsed__convergence__table_8h_source.html

Line 621. As you see, the quadrature rule used is a Gauss formula of order 
(dh.get_fe().degree+1)*2.

Can you check if you get the same results with this order?

L.

-- 
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/61AB78FA-4C0E-4B8E-8D75-CC9303D89F16%40gmail.com.


Re: [deal.II] errors in running step-18 within Xcode

2021-08-03 Thread Luca Heltai
Actually, not exactly. The instructions are i the screen shot. 

Open a Rosetta terminal, and then source the conf file, i.e.

./Appl/dealii.conf

The command you called opens a normal terminal, and then sources the conf file. 

Luca

> Il giorno 3 ago 2021, alle ore 13:28, Alberto Salvadori 
>  ha scritto:
> 
> 
> Luca,
> this is what I have done, if I got what you meant:
> 
> 1. opened a Rosetta terminal
> 2. /Applications/deal.II.app/Contents/MacOS/dealii-terminal
> 
>   __   _  _ _
> |  _  \ | ||_   _|_   _|
> | | | |___  __ _| |  | |   | |
> | | | / _ \/ _| | |  | |   | |
> | |/ /  __/ (_| | |__| |_ _| |_
> |___/ \___|\__,_|_(_)___/ \___/
> 
> This is a bash shell with CMAKE_PREFIX_PATH and DYLD_LIBRARY_PATH set to work
> with Deal.II. A full spack installation with deal.II is available under 
> 
> /Applications/deal.II.app/Contents/Resources/spack
> 
> If you want to set up your daily Terminal to work with deal.II, add these 
> lines
> to your ~/.profile (or ~/.zshrc, if you prefer zsh):
> 
>export DEAL_II_CONF_SILENT=ON# Turn off this message
>. /Applications/deal.II.app/Contents/MacOS/dealii.conf
> 
> deal.II and all its dependencies were installed using spack, and are also
> available through spack, e.g.:
> 
> spack find # Shows all installed packages
> 
> You can find the deal.II examples directory under 
> 
> 
> /Applications/deal.II.app/Contents/Resources/Libraries/share/deal.II/examples
> 
> 
> 
> 3. cmake -G 'Unix Makefiles'
> 4. make release
> 5. make
> 6.  ./step-18 
> Illegal instruction: 4
> 
> 
> 
> 
> 
> Alberto Salvadori
>  Dipartimento di Ingegneria Meccanica e Industriale (DIMI)
>  Universita` di Brescia, via Branze 43, 25123 Brescia
>  Italy
>  tel 030 3715426
> 
> e-mail: 
>  alberto.salvad...@unibs.it
> web-page:
>  http://m4lab.unibs.it/faculty.html
> 
> 
> 
>> On Tue, Aug 3, 2021 at 1:10 PM Luca Heltai  wrote:
>> Can you open a Rosetta terminal and follow the instructions to parse deal.ii 
>> init files? I think it is just the fact that you are not running under 
>> Rosetta, but cannot confirm...
>> 
>> Luca
>> 
>>>> Il giorno 3 ago 2021, alle ore 11:28, Alberto Salvadori 
>>>>  ha scritto:
>>>> 
>>> Dear community
>>> 
>>> I successfully installed 9.3 on my mac M1 from the dmg . However, I am at 
>>> present unable to run examples, as for the step-18. For this reason, I 
>>> share my attempts. 
>>> I am using Xcode 12.5.1 (12E507) on BigSur 11.2.3 (20D91).
>>> 
>>> After opening a deal.ii terminal from deal.ii.app, the step-18 code 
>>> compiles well both inside Xcode and from Makefile. When it comes to run the 
>>> executable, neither of the two apparently work. The output message from 
>>> terminal is
>>> 
>>> bash-3.2$ ./step-18 
>>> 
>>> Illegal instruction: 4
>>> 
>>> whereas the debugger provides some further notifications, as in figure, 
>>> which I am not able to discern. 
>>> 
>>> 
>>> 
>>> 
>>> I had at my disposal a former installation of deal.ii.9.2, that I made with 
>>> spack and gcc in a rosetta terminal. In such a case, within a rosetta 
>>> terminal, the step-18 compiles and runs well. Note that deal.ii9.3 does not 
>>> open a rosetta terminal.
>>> 
>>> Hope these evidences can be of help.
>>> 
>>> Best and thanks, as always!
>>> 
>>> Alberto
>>> 
>>> 
>>> 
>>> Informativa sulla Privacy: http://www.unibs.it/node/8155
>>> -- 
>>> 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/9014a8cd-0df9-499d-8aa0-d1b0a3427cfcn%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

Re: [deal.II] errors in running step-18 within Xcode

2021-08-03 Thread Luca Heltai
Can you open a Rosetta terminal and follow the instructions to parse deal.ii 
init files? I think it is just the fact that you are not running under Rosetta, 
but cannot confirm...

Luca

> Il giorno 3 ago 2021, alle ore 11:28, Alberto Salvadori 
>  ha scritto:
> 
> Dear community
> 
> I successfully installed 9.3 on my mac M1 from the dmg . However, I am at 
> present unable to run examples, as for the step-18. For this reason, I share 
> my attempts. 
> I am using Xcode 12.5.1 (12E507) on BigSur 11.2.3 (20D91).
> 
> After opening a deal.ii terminal from deal.ii.app, the step-18 code compiles 
> well both inside Xcode and from Makefile. When it comes to run the 
> executable, neither of the two apparently work. The output message from 
> terminal is
> 
> bash-3.2$ ./step-18 
> 
> Illegal instruction: 4
> 
> whereas the debugger provides some further notifications, as in figure, which 
> I am not able to discern. 
> 
> 
> 
> 
> 
> I had at my disposal a former installation of deal.ii.9.2, that I made with 
> spack and gcc in a rosetta terminal. In such a case, within a rosetta 
> terminal, the step-18 compiles and runs well. Note that deal.ii9.3 does not 
> open a rosetta terminal.
> 
> Hope these evidences can be of help.
> 
> Best and thanks, as always!
> 
> Alberto
> 
> 
> 
> Informativa sulla Privacy: http://www.unibs.it/node/8155
> -- 
> 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/9014a8cd-0df9-499d-8aa0-d1b0a3427cfcn%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/F3E122B8-F84B-406D-BC55-37144F3E6607%40gmail.com.


Re: [deal.II] Re: issue in installing dealii 9.2 and .3 on centos

2021-07-30 Thread Luca Heltai
Can you try 

spack edit gmsh

And Comment out the line “depends_on(‘gl2ps’)”?

That line brings in too many deps, and it’s not really necessary. 

Luca

> Il giorno 30 lug 2021, alle ore 16:39, Alberto Salvadori 
>  ha scritto:
> 
> 
> Thank you, Bruno.
> It looks like gmsh is the package which requires med:
> 
> 
> ^gmsh@4.8.4%gcc@7.4.0+alglib~cairo+cgns+compression~eigen~external+fltk+gmp~hdf5~ipo+med+metis+mmg~mpi+netgen+oce~opencascade~openmp~petsc~privateapi+shared~slepc+tetgen+voropp
>  build_type=RelWithDebInfo arch=linux-centos7-broadwell
> 
> I am using 
> 
> [asalvado@r000u07l02 uBS21_CivSal_0]$ spack --version
> 0.16.2-3715-a904418
> 
> Your help is appreciated.
> Alberto
> 
> 
> 
> Alberto Salvadori
>  Dipartimento di Ingegneria Meccanica e Industriale (DIMI)
>  Universita` di Brescia, via Branze 43, 25123 Brescia
>  Italy
>  tel 030 3715426
> 
> e-mail: 
>  alberto.salvad...@unibs.it
> web-page:
>  http://m4lab.unibs.it/faculty.html
> 
> 
> 
>> On Fri, Jul 30, 2021 at 4:12 PM Bruno Turcksin  
>> wrote:
>> Alberto,
>> 
>> I have no clue what med is, so it's not a basic dependency of deal.II. Which 
>> version of spack are you using? I don't see a dependency on med when I do 
>> `spack speck dealii` You can tell spack not to install med but you need to 
>> know which package pulled it.
>> 
>> Best,
>> 
>> Bruno
>> 
>>> On Friday, July 30, 2021 at 8:48:04 AM UTC-4 Alberto Salvadori wrote:
>>> Dear community
>>> 
>>> while installing deal.ii on a centos cluster, I am facing the following 
>>> issue related to med :
>>> 
>>> ==> Installing med-4.0.0-d65qwjrfigoxirhf5xy6lsumdwpcvluf
>>> 
>>> ==> Warning: Spack will not check SSL certificates. You need to update your 
>>> Python to enable certificate verification.
>>> 
>>> ==> No binary for med-4.0.0-d65qwjrfigoxirhf5xy6lsumdwpcvluf found: 
>>> installing from source
>>> 
>>> ==> Using cached archive: 
>>> /marconi_work/uBS21_CivSal_0/spack/var/spack/cache/_source-cache/archive/a4/a474e90b5882ce69c5e9f66f6359c53b8b73eb448c5f631fa96e8cd2c14df004.tar.gz
>>> 
>>> ==> No patches needed for med
>>> 
>>> ==> med: Executing phase: 'cmake'
>>> 
>>> ==> Error: ProcessError: Command exited with status 1:
>>> 
>>> 'cmake' '-G' 'Unix Makefiles' 
>>> '-DCMAKE_INSTALL_PREFIX:STRING=/marconi_work/uBS21_CivSal_0/spack/opt/spack/linux-centos7-broadwell/gcc-7.4.0/med-4.0.0-d65qwjrfigoxirhf5xy6lsumdwpcvluf'
>>>  '-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo' 
>>> '-DCMAKE_INTERPROCEDURAL_OPTIMIZATION:BOOL=OFF' 
>>> '-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON' 
>>> '-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=OFF' 
>>> '-DCMAKE_INSTALL_RPATH:STRING=/marconi_work/uBS21_CivSal_0/spack/opt/spack/linux-centos7-broadwell/gcc-7.4.0/med-4.0.0-d65qwjrfigoxirhf5xy6lsumdwpcvluf/lib;/marconi_work/uBS21_CivSal_0/spack/opt/spack/linux-centos7-broadwell/gcc-7.4.0/med-4.0.0-d65qwjrfigoxirhf5xy6lsumdwpcvluf/lib64;/marconi_work/uBS21_CivSal_0/spack/opt/spack/linux-centos7-broadwell/gcc-7.4.0/hdf5-1.10.7-nrpa5xndtz4a2yo6xjulubsoqufllvpo/lib;/marconi_work/uBS21_CivSal_0/spack/opt/spack/linux-centos7-broadwell/gcc-7.4.0/numactl-2.0.14-qtf6zwk7cppy35evzpg5bvngl4uioe7v/lib;/marconi_work/uBS21_CivSal_0/spack/opt/spack/linux-centos7-broadwell/gcc-7.4.0/openmpi-4.1.1-ctp6zbck3skxoohx24qake6oljk6ufzr/lib;/marconi_work/uBS21_CivSal_0/spack/opt/spack/linux-centos7-broadwell/gcc-7.4.0/hwloc-2.5.0-g27bmqmr42ruvvwvhvxuqoyk22xokrah/lib;/marconi_work/uBS21_CivSal_0/spack/opt/spack/linux-centos7-broadwell/gcc-7.4.0/libpciaccess-0.16-3lmrc4ak3cqlrwdmu3rwgmdzj6256j6q/lib;/marconi_work/uBS21_CivSal_0/spack/opt/spack/linux-centos7-broadwell/gcc-7.4.0/libxml2-2.9.10-r7ofye65rymwgmbdqgka3tnwbzw3kcvx/lib;/marconi_work/uBS21_CivSal_0/spack/opt/spack/linux-centos7-broadwell/gcc-7.4.0/libiconv-1.16-meyg2avc5ldglxqayvrmzltjirkpgplv/lib;/marconi_work/uBS21_CivSal_0/spack/opt/spack/linux-centos7-broadwell/gcc-7.4.0/xz-5.2.5-wczw77mhc2n2anwdvurydxw45nifh5ik/lib;/marconi_work/uBS21_CivSal_0/spack/opt/spack/linux-centos7-broadwell/gcc-7.4.0/zlib-1.2.11-w4v4ex6wf3qcmkuxdnmga7snctdxiz6h/lib;/marconi_work/uBS21_CivSal_0/spack/opt/spack/linux-centos7-broadwell/gcc-7.4.0/ncurses-6.2-73efdut6ehthgyksblf3qjpmgm7rtced/lib;/marconi_work/uBS21_CivSal_0/spack/opt/spack/linux-centos7-broadwell/gcc-7.4.0/libevent-2.1.12-2y4ktlntxfx32bacu2rrpvmummy7zslt/lib;/marconi_work/uBS21_CivSal_0/spack/opt/spack/linux-centos7-broadwell/gcc-7.4.0/openssl-1.1.1k-p5o7iymffnfrwrakncqzibjwoxoutlsj/lib'
>>>  
>>> 

Re: [deal.II] problem with CylindricalManifold<3> after removing cells from a triangulation

2021-04-26 Thread Luca Heltai
The issue is with the function that removes the cells. It creates the grid 
correctly but forgets to set the ids of the edges. It is not with your code. 
For boundary ids this is usually not an issue, since interpolation and boundary 
conditions are set using the face ids (not the edges), but for manifold ids 
this is a problem.  

I'll open an issue, and use your test to check things. 

Thanks for coming up with such a minimal working example. :-)

Luca

> Il giorno 26 apr 2021, alle ore 10:44, Simon  ha 
> scritto:
> 
> 
> Hello Luca,
> 
> your suggestion fixed my problem, so thank you very much!
> 
> Just to make sure that I understand it correctly: 
> In my code snippet from above I call the member function 
> "triangulation.set_all_manifold_ids_on_boundary(1,1). 
> I actually thought that this call does the same thing as you suggested, i.e. 
> cell->face(f)->set_all_manifold_ids(1).
> But I guess the problem is that in my version I only set the manifold ids of 
> the face and not its four edges as well, is it?
> 
> Best
> Simon
> 
> 
> 
> luca@gmail.com schrieb am Montag, 26. April 2021 um 09:56:17 UTC+2:
>> There may be a problem with the way boundary ids are set. 
>> 
>> Can you try the following? 
>> 
>> after creating the grid with removed cells, loop over all cells and all 
>> faces, and if at boundary with boundary id == 1, then call 
>> 
>> cell->face(f)->set_all_manifold_ids(1); 
>> 
>> notice the “_all_”, i.e., it is not “set_manifold_id(1)”. This ensures you 
>> set manifold ids also on edges. 
>> 
>> It may be that boundary ids are not set correctly on edges when creating the 
>> triangulation with removed cells. In this case this is a bug (simple to fix, 
>> btw), that you only see in 3d, because refinement starts from edges. 
>> 
>> L. 
>> 
>> 
>> 
>> > On 26 Apr 2021, at 9:36, Simon  wrote: 
>> > 
>> > By the way, I forgot to precise my question in more detail: 
>> > 
>> > In the code snippet above I set the corresponding Manifold Descriptions 
>> > for dim=2 (spherical) and dim=3 (cylindrical) on the inner boundary 
>> > created by GridGenerator::hyper_cube_with_cylindrical_hole and removed 
>> > after that some cells by calling 
>> > GridGenerator::create_triangulation_with_removed_cells . 
>> > However, for the 3D-Case, after adaptively refining the inner hole there 
>> > is still a FlatManifold attached to it and not a CylindricalManifold. For 
>> > dim=2, I get the desired SphericalManifold and everything is fine. 
>> > I am pretty sure that I set the manifold_id on the inner boundary 
>> > correctly, because after visualizing the mesh the cells are actually 
>> > adaptively refined around the inner boundary, but as I said a FlatManifold 
>> > is used in the 3D-Case. 
>> > 
>> > -So does GridGenerator::hyper_cube_with_cylindrical_hole attach some 
>> > important "information" in terms of id_s,... to my triangulation which my 
>> > new triangulation created by 
>> > GridGenerator::create_triangulation_with_removed_cell does not have? 
>> > -Or does the CylindricalManifold only work for closed boundaries? Because 
>> > without calling GridGenerator::create_triangulation_with_removed_cells 
>> > also in the 3D-Case I get the desired CylindricalManifold. 
>> > 
>> > Best 
>> > Simon 
>> > Simon schrieb am Freitag, 23. April 2021 um 22:02:41 UTC+2: 
>> > Dear all, 
>> > 
>> > I created a mesh using GridGenerator::hyper_cube_with_cylindrical_hole and 
>> > removed after that half of the total number of the cells in order to make 
>> > use of symmetry. 
>> > Then I set a SphericalManifold<2> (2D) respectively CylindricalManifold<3> 
>> > (3D) in order to get a true circle (2D) respectively a true cylinder (3D) 
>> > after global and/or adaptive refining. 
>> > 
>> > Without removing some cells, i.e. just using the 
>> > GridGenerator::hyper_cube_with_cylindrical_hole without using symmetry, 
>> > both 2D and 3D variants work fine. 
>> > With removing some cells, i.e. using symmetry, only in 2D I get a true 
>> > circle as result. In 3D however, the SphericalManifold<3> does not work 
>> > anymore. (I can adaptively refine the inner hole, but the result is not a 
>> > true cylinder anymore which was the case without removing the cells). 
>> > 
>> > In the following is a snippet of my code. It´s hard for me to find out 
>> > what the problem actually is, since in 2D the manifold description worked 
>> > after removing some cells. 
>> > 
>> > Thanks for helping! 
>> > 
>> > Best 
>> > Simon 
>> > 
>> > 
>> > 
>> > 
>> > const double outer_radius = 1.0; 
>> > const double inner_radius = 0.5; 
>> > const Point center; 
>> > 
>> > GridGenerator::hyper_cube_with_cylindrical_hole(triangulation_tmp, 
>> > inner_radius, 
>> > outer_radius, 
>> > 0.5, 
>> > 1, 
>> > false /*boundary_id_inner_hole is set to 1*/); 
>> > 
>> > std::set::active_cell_iterator> 
>> > cells_to_remove; 
>> > typename Triangulation::active_cell_iterator cell 
>> > =triangulation_tmp.begin_active(), 
>> > endc = 

Re: [deal.II] Installing dealii on MacOS and step-40: .dmg file or cloning the repo?

2021-03-17 Thread Luca Heltai
Il giorno 17 mar 2021, alle ore 18:30, bob bill  ha scritto:
> 
> So far I have deal.II 9.2.0 installed with .dmg, but also the "unnecessary" 
> installation in /usr/local/bin/deal_9.2.0 obtained with .tar.gz. 
> To remove the latter, is it sufficient to drag the deal_9.2.0 folder into 
> bin? 

Yes.
:-)

-- 
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/4930A894-A246-477E-B618-BE576BF29D99%40gmail.com.


Re: [deal.II] Installing dealii on MacOS and step-40: .dmg file or cloning the repo?

2021-03-17 Thread Luca Heltai
Dear Bob,

The dmg package comes already with deal.II 9.2 installed, so your compilation 
is not necessary.

As far as your problem is concerned, can you try to start from a clean 
directory? Remove everything except the cc file and the CMakeLists.txt file and 
try again. 

Step 40 works for me using the installation from the dmg file directly. 

Luca

> Il giorno 17 mar 2021, alle ore 16:36, bob bill  ha scritto:
> 
> Okay, here's what I did:
> 1) installed the .dmg file
> 2) I unpacked the .tar.gz 9.2.0 version and installed it in /usr/local/bin 
> using the deal.II app terminal
> 
> Now, *from within the deal.II app* terminal, I can compile step-40 and all 
> the others that are located at 
> 
> /Applications/deal.II.app/Contents/Resources/examples
> 
> 
> But if I try to compile step-40 (always within the deal.II app terminal) 
> located at 
> 
> /Desktop/dealii-9.2.0/examples/ (i.e. the source directory, not in the folder 
> above)
> 
> I got this error:
>  However, the deal.II library found at /usr/local/bin/deal_9.2.0 was 
> configured with these options
> 
>   DEAL_II_WITH_PETSC = OFF
> 
>   DEAL_II_PETSC_WITH_COMPLEX = 
> 
>   DEAL_II_WITH_P4EST = OFF
> 
>   DEAL_II_WITH_TRILINOS = OFF
> 
>   which conflict with the requirements.
> 
> 
> The problem is that it's not using the "setup 
> /Applications/deal.II.app/Contents/Resources/Libraries", but this is 
> happening for step-40 only! Indeed, if I try to compile step-50( 17,56,...) 
> it compiles, since it's using the correct setup. 
> 
> How is this possible?
> 
> 
> 
> Thanks for your patience.
> Best, Lukas
> 
> Il giorno mercoledì 17 marzo 2021 alle 11:41:09 UTC+1 luca@gmail.com ha 
> scritto:
>> If you install the dmg package, and compile the library just like you did 
>> before *within the terminal that opens when you click on the deal.II app*, 
>> the compilation process would find correctly all the installed libraries. 
>> 
>> Best, 
>> Luca. 
>> 
>> > On 17 Mar 2021, at 10:08, bob bill  wrote: 
>> > 
>> > Thanks for your answer. 
>> > 
>> > > My personal option is to install the dmg, then recompile the library (to 
>> > > have the master version). 
>> > 
>> > So I have to install the dmg, even if I still have the library installed 
>> > from GitHub with the command line procedure ? 
>> > 
>> > If so, once I installed the dmg successfully , how can I "recompile the 
>> > library"? 
>> > 
>> > 
>> > Best, 
>> > Lukas 
>> > 
>> > Il giorno mercoledì 17 marzo 2021 alle 07:57:14 UTC+1 luca@gmail.com 
>> > ha scritto: 
>> > 
>> > 
>> >> Il giorno 16 mar 2021, alle ore 23:56, bob bill  ha 
>> >> scritto: 
>> >> 
>> >> 1) If I install dealii by using the prepackaged .dmg file, will I have 
>> >> all the libraries to compile and run step-40? 
>> >> 
>> > 
>> > Yes. 
>> > 
>> >> 2) Is there a way to install dealii and have all those libraries? I've 
>> >> seen the MacOS instructions, but I can't find a workaround for my 
>> >> problem. Should I install PETSc (and the others) manually on my laptop? 
>> >> 
>> >> 
>> > The dmg contains all of the supported external libraries. My personal 
>> > option is to install the dmg, then recompile the library (to have the 
>> > master version). 
>> > 
>> > Best, 
>> > Luca. 
>> > 
>> > 
>> > 
>> > -- 
>> > 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/b0f44c4d-9e57-4e6b-9b83-36b6c13de71dn%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/f2f27bf5-f891-40c8-8c42-fd9956cc1c4fn%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/AADD4623-360C-46BB-AEC9-1CFA51866605%40gmail.com.


Re: [deal.II] Installing dealii on MacOS and step-40: .dmg file or cloning the repo?

2021-03-17 Thread Luca Heltai


> Il giorno 16 mar 2021, alle ore 23:56, bob bill  ha scritto:
> 
> 1) If I install dealii by using the prepackaged .dmg file, will I have all 
> the libraries to compile and run step-40?
> 

Yes. 
> 2) Is there a way to install dealii and have all those libraries? I've seen 
> the MacOS instructions, but I can't find a workaround for my problem. Should 
> I install PETSc (and the others) manually on my laptop? 
> 
The dmg contains all of the supported external libraries. My personal option is 
to install the dmg, then recompile the library (to have the master version).

Best, 
Luca. 


-- 
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/2F8D614F-B5E0-4D10-AD23-2C11D252944A%40gmail.com.


Re: [deal.II] More recent version of deal.II (9.2) co-installed with previous one (9.0), is not linked with PETSc (and other external libraries)

2021-01-06 Thread Luca Heltai
Yes. That is correct. My suggestion is to keep using spack, also for 9.2. 

:-)

Luca.  

Il giorno 6 gen 2021, alle ore 14:01, Behrooz Karami  ha 
scritto:
> 
> Thanks very much for the guidance.
> Just to make sure, since I also need some other libraries such as Trilinos, 
> do I need to rebuild deal.II with all that I anticipate might be needed?
> Thank you.

-- 
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/9EEAED57-FAF9-4E64-8054-E6ACBE754350%40gmail.com.


Re: [deal.II] install problems with clang@12.0.0 and Xcode12.0 from spack

2020-09-29 Thread Luca Heltai
Dear Alex,

what happens after loading dealii with `spack load dealii`, if you try to
build (from scratch) `step-40`?

Can you send us the output of  cmake and make?

Luca.

On Mon, Sep 28, 2020 at 4:46 PM 'Alexander Greiner' via deal.II User Group <
dealii@googlegroups.com> wrote:

> Hi Luca,
>
> I installed environment-modules and currently have the following lines in
> my .bash_profile:
>
> ### dealii 9.2 ###
> SPACK_ROOT=/Users/alexandergreiner/spack
> export PATH=$SPACK_ROOT/bin:$PATH
> MODULES_HOME=$(spack location -i environment-modules)
> source ${MODULES_HOME}/init/zsh
> . $SPACK_ROOT/share/spack/setup-env.sh
>
> After spack load dealii, spack find --loaded shows (attached).
>
> But, echo $DYLD_LIBRARY_PATH shows nothing. Do I have to pay attention to
> something due to its clumsiness? Is there any further helpful
> information/files that I can provide to you?
> I highly appreciate the help I am receiving from all of you!
>
> Regards
> Alex
> luca@gmail.com schrieb am Montag, 28. September 2020 um 14:23:46
> UTC+2:
>
>> My suggestion is to install also environment-modules, and then use
>>
>> spack load dealii
>>
>> This will popolate DYLD_LIBRARY_PATH with the correct values and allows
>> your cmake to find all libraries.
>>
>> Unfortunately, recent updates to spack have made its functionality a bit
>> clumsy in Mac OS...
>>
>> L.
>>
>> > On 28 Sep 2020, at 13:40, 'Alexander Greiner' via deal.II User Group <
>> dea...@googlegroups.com> wrote:
>> >
>> > Hi, thanks for your suggestions.
>> >
>> > Yes, Trilinos is installed by spack and
>> > ls `spack location -i trilinos`/lib/libmuelu*
>> > shows me the correct paths to the libmuelu libraries.
>> > I also enabled Full Disk Access for Terminal.app and restarted the App
>> as described.
>> > Still, the libraries are not linked properly.
>> >
>> > Best
>> > Alex
>> >
>> > Praveen C schrieb am Montag, 28. September 2020 um 13:08:14 UTC+2:
>> > No, you dont have to recompile deal.II for what I am suggesting.
>> >
>> > I suppose that lib is installed by spack, have you checked
>> >
>> > ls `spack location -i trilinos`/lib/libmuelu*
>> >
>> > Not sure if this will help, but
>> >
>> > Have you enabled Full Disk Access for Terminal.app
>> >
>> > If not, can you enable it and try. See this
>> >
>> >
>> https://macperformanceguide.com/blog/2020/20200208_2004macOS-Catalina-add-fullDiskAccess-Terminal.html
>> >
>> > best
>> > praveen
>> >
>> >
>> >> On 28-Sep-2020, at 3:53 PM, 'Alexander Greiner' via deal.II User Group
>>  wrote:
>> >>
>> >> Hi Praveen,
>> >>
>> >> "Stupid" question beforehand: Do I have to reinstall deal.II? If yes,
>> you can skip the remainder. If no, I did the following:
>> >>
>> >> I added that line to my ./bash_profile opened a new terminal window
>> and executed
>> >> source ./bash_profile
>> >> spack load dealii
>> >> cd spack/opt/.../deal.II/examples/step-1
>> >> cmake . (I removed all previously generated "make"-files to obtain the
>> initial directory content of step-1)
>> >> make run
>> >> Unfortunately, libmuelu is still not found. I attached a printout of
>> my environment variables, if this might help...
>> >
>> >
>> > --
>> > 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/97294b8d-4815-4f96-a346-8d8d6037ff35n%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/661b4cf3-dd9d-46ff-9d15-9cc6f074290en%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/CADZnUoBTzgzpdh3%3D_6mqbqnm7pnU-w7TorE-yYqAB5%2B3mzSQBw%40mail.gmail.com.


Re: [deal.II] step-1 Error

2020-09-19 Thread Luca Heltai
Are you running the terminal, or the deal.II application?

When you run the deal.II application, you are dropped into a terminal (with 
instructions) to run deal.II examples. Including how to set up your bashrc (or 
zshrc) to point to the deal.II 
Installation/the module command. 

Only after you instructed the terminal of the right paths, you’ll be able to 
run deal.II from the standard terminal. 

Luca

> Il giorno 18 set 2020, alle ore 23:37, Scott Ziegler 
>  ha scritto:
> 
> Thanks for the response! I might be misunderstanding, but in my directory 
> for step-1 I tried running the command exactly as "module load dealii" and I 
> just get "bash: module: command not found" in return. What am I doing wrong?
> 
>> On Wednesday, August 26, 2020 at 12:14:41 PM UTC-6 luca@gmail.com wrote:
>> The 9.0.0 image contains a spack installation. Can you run "module load 
>> dealii" before trying to run?
>> 
>> Luca. 
>> 
>> Il giorno mer 26 ago 2020 alle 19:51 Scott Ziegler 
>>  ha scritto:
>>> Hello,
>>> 
>>> I tried running the first tutorial on my machine and I am getting an error 
>>> message I don't understand. The "cmake step-1.cc ." and "make step-1.cc" 
>>> commands ran fine, but when I try "make run step-1.cc" I get the following 
>>> error:
>>> 
>>> Scanning dependencies of target step-1
>>> 
>>> [ 33%] Building CXX object CMakeFiles/step-1.dir/step-1.cc.o
>>> 
>>> [ 66%] Linking CXX executable step-1
>>> 
>>> [ 66%] Built target step-1
>>> 
>>> Scanning dependencies of target run
>>> 
>>> [100%] Run step-1 with Debug configuration
>>> 
>>> dyld: Library not loaded: libiomp5.dylib
>>> 
>>>   Referenced from: 
>>> /Applications/deal.II-9.0.0.app/Contents/Resources/spack/opt/spack/darwin-highsierra-x86_64/clang-6.0.0/assimp-4.0.1-pdlrx32676yct2pztierxgvynk5gx277/lib/libassimp.4.dylib
>>> 
>>>   Reason: image not found
>>> 
>>> make[3]: *** [CMakeFiles/run] Abort trap: 6
>>> 
>>> make[2]: *** [CMakeFiles/run.dir/all] Error 2
>>> 
>>> make[1]: *** [CMakeFiles/run.dir/rule] Error 2
>>> 
>>> make: *** [run] Error 2
>>> 
>>> 
>>> 
>>> I am running an older version of deal.ii (deal.ii.9.0.0) because the latest 
>>> version wasn't compatible with my laptop. I have a 2012 MacBook Pro running 
>>> macOS 10.13.6. Any help would be greatly appreciated, thank you.
>>> 
>> 
>>> -- 
>>> 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/b46da6bf-895b-4cb2-b5aa-c60845f85c61n%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/6d79eb30-84bf-4419-964b-5747beefb15fn%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/48A4C1D5-57E8-4F74-9C2E-B99C494F494B%40gmail.com.


Re: [deal.II] step-1 Error

2020-08-26 Thread Luca Heltai
The 9.0.0 image contains a spack installation. Can you run "module load
dealii" before trying to run?

Luca.

Il giorno mer 26 ago 2020 alle 19:51 Scott Ziegler <
scott...@rams.colostate.edu> ha scritto:

> Hello,
>
> I tried running the first tutorial on my machine and I am getting an error
> message I don't understand. The "cmake step-1.cc ." and "make step-1.cc"
> commands ran fine, but when I try "make run step-1.cc" I get the following
> error:
>
> *Scanning dependencies of target step-1*
>
> [ 33%] Building CXX object CMakeFiles/step-1.dir/step-1.cc.o
>
> [ 66%] *Linking CXX executable step-1*
>
> [ 66%] Built target step-1
>
> *Scanning dependencies of target run*
>
> [100%] *Run step-1 with Debug configuration*
>
> dyld: Library not loaded: libiomp5.dylib
>
>   Referenced from:
> /Applications/deal.II-9.0.0.app/Contents/Resources/spack/opt/spack/darwin-highsierra-x86_64/clang-6.0.0/assimp-4.0.1-pdlrx32676yct2pztierxgvynk5gx277/lib/libassimp.4.dylib
>
>   Reason: image not found
>
> make[3]: *** [CMakeFiles/run] Abort trap: 6
>
> make[2]: *** [CMakeFiles/run.dir/all] Error 2
>
> make[1]: *** [CMakeFiles/run.dir/rule] Error 2
>
> make: *** [run] Error 2
>
>
> I am running an older version of deal.ii (deal.ii.9.0.0) because the
> latest version wasn't compatible with my laptop. I have a 2012 MacBook Pro
> running macOS 10.13.6. Any help would be greatly appreciated, thank you.
>
> --
> 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/b46da6bf-895b-4cb2-b5aa-c60845f85c61n%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/CADZnUoDK5gFrgABwpy3%2B%2BKf0hRNVp_LbfjX4KhT9x5pn1WP24w%40mail.gmail.com.


Re: [deal.II] Problem implementing Neumann boundary condition

2020-08-21 Thread Luca Heltai
You use it to compute the Neumann boundary condition in your program. You 
compute the gradient of the boundary function and dot it with the normal 
vector. 

You could get by if you knew beforehand the value of 

grad(g).n

But your  code uses grad(g) (which is not defined in Neumann.h), hence the 
error. 

Luca

> Il giorno 21 ago 2020, alle ore 10:07, Umair Hussain 
>  ha scritto:
> 
> 
> Thanx Luca. I got it. But I still don’t understand what is this “gradient” 
> used for?
> 
>> On Fri, 21 Aug 2020 at 12:22 PM, Luca Heltai  wrote:
>> Did you actually read the error message? :-)
>> 
>> It tells you exactly what you have to do. In particolar, you are using 
>> bc.gradient to evaluate the Neumann boundary value, but you did not 
>> implement the gradient in your Neumann.h file. This explained in detail in 
>> the error message you got. 
>> 
>> The default implementation of "gradient" for the class Function simply 
>> throws an exception. Id you implement it, everything should work. 
>> 
>> Best,
>> Luca
>> 
>>>> Il giorno 21 ago 2020, alle ore 04:59, husain.u...@gmail.com 
>>>>  ha scritto:
>>>> 
>>> 
>> 
>>> 
>>> Hello Deal II community,
>>> I have just started with deal ii, so I am trying to solve a basic laplace 
>>> equation on a square domain with dirichilet bc on two faces and neumann bc 
>>> on the remaining two. I have used steps from step-7 to implement neumann 
>>> bc, but i am running into the following error:
>>> 
>>> 
>>> 
>>> An error occurred in line <133> of file 
>>> 
>>>  in function
>>> dealii::Tensor<1, dim, Number> dealii::Function>> RangeNumberType>::gradient(const dealii::Point&, unsigned int) const 
>>> [with int dim = 2; RangeNumberType = double]
>>> The violated condition was: 
>>> false
>>> Additional information: 
>>> You (or a place in the library) are trying to call a function that is 
>>> declared as a virtual function in a base class but that has not been 
>>> overridden in your derived class.
>>> 
>>> This exception happens in cases where the base class cannot provide a 
>>> useful default implementation for the virtual function, but where we also 
>>> do not want to mark the function as abstract (i.e., with '=0' at the end) 
>>> because the function is not essential to the class in many contexts. In 
>>> cases like this, the base class provides a dummy implementation that makes 
>>> the compiler happy, but that then throws the current exception.
>>> 
>>> A concrete example would be the 'Function' class. It declares the existence 
>>> of 'value()' and 'gradient()' member functions, and both are marked as 
>>> 'virtual'. Derived classes have to override these functions for the values 
>>> and gradients of a particular function. On the other hand, not every 
>>> function has a gradient, and even for those that do, not every program 
>>> actually needs to evaluate it. Consequently, there is no *requirement* that 
>>> a derived class actually override the 'gradient()' function (as there would 
>>> be had it been marked as abstract). But, since the base class cannot know 
>>> how to compute the gradient, if a derived class does not override the 
>>> 'gradient()' function and it is called anyway, then the default 
>>> implementation in the base class will simply throw an exception.
>>> 
>>> The exception you see is what happens in cases such as the one just 
>>> illustrated. To fix the problem, you need to investigate whether the 
>>> function being called should indeed have been called; if the answer is 
>>> 'yes', then you need to implement the missing override in your class.
>>> 
>>> Stacktrace:
>>> ---
>>> #0  /usr/local/lib/libdeal_II.g.so.9.1.1: dealii::Function<2, 
>>> double>::gradient(dealii::Point<2, double> const&, unsigned int) const
>>> #1  /home/umair/CLionProjects/MyLaplace2/cmake-build-debug/MyLaplace2: 
>>> laplace_solver::assemble_system()
>>> #2  /home/umair/CLionProjects/MyLaplace2/cmake-build-debug/MyLaplace2: 
>>> laplace_solver::run()
>>> #3  /home/umair/CLionProjects/MyLaplace2/cmake-build-debug/MyLaplace2: main
>>> 
>>> 
>>> 
>>> I have attached my code for more help.
>>> Thank you in

Re: [deal.II] Problem implementing Neumann boundary condition

2020-08-21 Thread Luca Heltai
Did you actually read the error message? :-)

It tells you exactly what you have to do. In particolar, you are using 
bc.gradient to evaluate the Neumann boundary value, but you did not implement 
the gradient in your Neumann.h file. This explained in detail in the error 
message you got. 

The default implementation of "gradient" for the class Function simply throws 
an exception. Id you implement it, everything should work. 

Best,
Luca

> Il giorno 21 ago 2020, alle ore 04:59, husain.u...@gmail.com 
>  ha scritto:
> 
> 
> Hello Deal II community,
> I have just started with deal ii, so I am trying to solve a basic laplace 
> equation on a square domain with dirichilet bc on two faces and neumann bc on 
> the remaining two. I have used steps from step-7 to implement neumann bc, but 
> i am running into the following error:
> 
> 
> 
> An error occurred in line <133> of file 
> 
>  in function
> dealii::Tensor<1, dim, Number> dealii::Function RangeNumberType>::gradient(const dealii::Point&, unsigned int) const 
> [with int dim = 2; RangeNumberType = double]
> The violated condition was: 
> false
> Additional information: 
> You (or a place in the library) are trying to call a function that is 
> declared as a virtual function in a base class but that has not been 
> overridden in your derived class.
> 
> This exception happens in cases where the base class cannot provide a useful 
> default implementation for the virtual function, but where we also do not 
> want to mark the function as abstract (i.e., with '=0' at the end) because 
> the function is not essential to the class in many contexts. In cases like 
> this, the base class provides a dummy implementation that makes the compiler 
> happy, but that then throws the current exception.
> 
> A concrete example would be the 'Function' class. It declares the existence 
> of 'value()' and 'gradient()' member functions, and both are marked as 
> 'virtual'. Derived classes have to override these functions for the values 
> and gradients of a particular function. On the other hand, not every function 
> has a gradient, and even for those that do, not every program actually needs 
> to evaluate it. Consequently, there is no *requirement* that a derived class 
> actually override the 'gradient()' function (as there would be had it been 
> marked as abstract). But, since the base class cannot know how to compute the 
> gradient, if a derived class does not override the 'gradient()' function and 
> it is called anyway, then the default implementation in the base class will 
> simply throw an exception.
> 
> The exception you see is what happens in cases such as the one just 
> illustrated. To fix the problem, you need to investigate whether the function 
> being called should indeed have been called; if the answer is 'yes', then you 
> need to implement the missing override in your class.
> 
> Stacktrace:
> ---
> #0  /usr/local/lib/libdeal_II.g.so.9.1.1: dealii::Function<2, 
> double>::gradient(dealii::Point<2, double> const&, unsigned int) const
> #1  /home/umair/CLionProjects/MyLaplace2/cmake-build-debug/MyLaplace2: 
> laplace_solver::assemble_system()
> #2  /home/umair/CLionProjects/MyLaplace2/cmake-build-debug/MyLaplace2: 
> laplace_solver::run()
> #3  /home/umair/CLionProjects/MyLaplace2/cmake-build-debug/MyLaplace2: main
> 
> 
> 
> I have attached my code for more help.
> Thank you in advance,
> Umair.
> 
> -- 
> 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/2fc8eb10-f1e3-4706-80a1-9837450f7874n%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/734FBBD3-BB93-4D2D-8E23-13CA8574BE5B%40gmail.com.


Re: [deal.II] Reading a Tensor from parameter file

2020-08-05 Thread Luca Heltai

> Thank you. This really shortens the code. Is it also possible to set the 
> delimiter to a user desired value, say "|" instead of ",".

All functions of the Convert class take a unique pointer to a pattern. You can 
specify your own pattern, and use that in the conversion. The code is all in

deal.II/base/patterns_tools.h

After the Class declarations, you’ll find the implementations for the basic 
classes of deal.II, including vector, map, pairs and tuples of them. 

Best,
Luca 

> Also, where exactly is the procedure for conversion from string to 
> deali::Tensor or some other type say std::vector defined? I could not 
> find it in the source code.
> 
> Best regards,
> Paras
> 
>> On Tuesday, August 4, 2020 at 6:15:47 PM UTC+2, Paras Kumar wrote:
>> Hi,
>> 
>> Could you please provide an MWE to describe how the 
>> Patterns::Convert::to_value() function would work in this case.
>> 
>> Is it must to use prm.add_parameter()  to be able to do so? I usually use 
>> prm.declare_entry() and prm.get(). 
>> 
>> Best regards,
>> Paras
>> 
>>> On Wednesday, April 15, 2020 at 6:01:53 PM UTC+2, Luca Heltai wrote:
>>> Currently, this is also the simplest way:
>>> 
>>> Tensor tens;
>>> prm.add_parameter("Tensor", tens);
>>> 
>>> Take a look at the documentation of the add parameter method.
>>> 
>>> Patterns::Tools::to_string(tens);
>>> 
>>> And 
>>> 
>>> Patterns::Tools::to_value 
>>> 
>>> Are also available to simplify what you want to achieve. 
>>> 
>>> Alternatively: Patterns::Tools::Convert offers ways to construct default 
>>> Patterns for many types, including Tensors. 
>>> 
>>> Best,
>>> Luca
>>> 
>>  
> 
> -- 
> 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/01e0068e-205b-4984-a5e8-f9d23ab1bb72o%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/2D1BF7D2-3C55-41E7-988F-110467401FAF%40gmail.com.


Re: [deal.II] Installation didn't give any errors but when I tried make test, it failed all tests

2020-07-30 Thread Luca Heltai
Take a look at your parameter file. It is probably trying to write output file 
to a directory that does not exist. 

Luca

> Il giorno 30 lug 2020, alle ore 10:58, kaleem iqbal  
> ha scritto:
> 
> 
> Dear Prof. Wolfgang; 
> During running step-70. I found the following error  
> Exception on processing: 
> 
> 
> An error occurred in line <1360> of file 
> 
>  in function
> void dealii::ParameterHandler::print_parameters(const string&, 
> dealii::ParameterHandler::OutputStyle) const
> The violated condition was: 
> out
> Additional information: 
> An input/output error has occurred. There are a number of reasons why 
> this may be happening, both for reading and writing operations.
> 
> If this happens during an operation that tries to read data: First, you may 
> be trying to read from a file that doesn't exist or that is not readable 
> given its file permissions. Second, deal.II uses this error at times if it 
> tries to read information from a file but where the information in the file 
> does not correspond to the expected format. An example would be a truncated 
> file, or a mesh file that contains not only sections that describe the 
> vertices and cells, but also sections for additional data that deal.II does 
> not understand.
> 
> If this happens during an operation that tries to write data: you may be 
> trying to write to a file to which file or directory permissions do not allow 
> you to write. A typical example is where you specify an output file in a 
> directory that does not exist.
> 
> 
> Aborting!
> 
> CMakeFiles/run.dir/build.make:57: recipe for target 'CMakeFiles/run' failed
> make[3]: *** [CMakeFiles/run] Error 1
> CMakeFiles/Makefile2:131: recipe for target 'CMakeFiles/run.dir/all' failed
> make[2]: *** [CMakeFiles/run.dir/all] Error 2
> CMakeFiles/Makefile2:138: recipe for target 'CMakeFiles/run.dir/rule' failed
> make[1]: *** [CMakeFiles/run.dir/rule] Error 2
> Makefile:144: recipe for target 'run' failed
> make: *** [run] Error 2
> Please guide me
> Regards
> Kaleem iqbal
> -- 
> 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/168928f6-65e2-40e2-924a-84bfe514e2bco%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/2E791A8D-2E6F-4FF2-A232-0ABDD68618BF%40gmail.com.


Re: [deal.II] Re: KDTree implementation error

2020-07-24 Thread Luca Heltai
If you are using version 9.3pre of deal.II, kdtree was removed. Use RTree 
instead, which is faster and more flexible. 

Luca

> Il giorno 24 lug 2020, alle ore 05:41, heena patel  ha 
> scritto:
> 
> 
> Dear Bruno,
>I had already added kdree.h header file, check 
> the question again. But it seems it does not read KDTree; something is not 
> compatible between class and header file.
> 
> Regards,
> Heena
> 
>> On Thu, Jul 23, 2020 at 9:03 PM Bruno Turcksin  
>> wrote:
>> Heena,
>> 
>> You are missing an include. Try adding #include 
>> 
>> Best,
>> 
>> Bruno
>> 
>>> On Thursday, July 23, 2020 at 2:55:53 PM UTC-4, heena patel wrote:
>>> 
>>> Dear all,
>>>   I had tried to implement KDTree in step_1 tutoria 
>>> and header file for kdtree is added to the codel. It is as follows:
>>> 
>>> void first_grid()
>>> {
>>> 
>>>   Triangulation<2> triangulation;
>>> 
>>>   GridGenerator::hyper_cube(triangulation);
>>>   triangulation.refine_global(4);
>>>   Point<2>  p;
>>>KDTree<2> tree(10,triangulation.get_vertices());
>>>auto w = tree.get_closest_points(p, 3);
>>>   std::ofstream out("grid-1.svg");
>>>   GridOut   grid_out;
>>>   grid_out.write_svg(triangulation, out);
>>>   std::cout << "Grid written to grid-1.svg" << std::endl;
>>> }
>>> 
>>> 
>>> 
>>> It gives me error as below 
>>> 
>>> /home/heena/Project/examples/step-1/step-1.cc:76:4: error: ‘KDTree’ was not 
>>> declared in this scope
>>> KDTree<2> tree(10,triangulation.get_vertices());
>>> ^~
>>> /home/heena/Project/examples/step-1/step-1.cc:76:4: note: suggested 
>>> alternative: ‘free’
>>> KDTree<2> tree(10,triangulation.get_vertices());
>>> ^~
>>> free
>>> /home/heena/Project/examples/step-1/step-1.cc:76:14: error: ‘tree’ was not 
>>> declared in this scope
>>> KDTree<2> tree(10,triangulation.get_vertices());
>>>   ^~~~
>>> /home/heena/Project/examples/step-1/step-1.cc:76:14: note: suggested 
>>> alternative: ‘free’
>>> KDTree<2> tree(10,triangulation.get_vertices());
>>>   ^~~~
>>>   free
>>> 
>>> 
>>> 
>>> Is there something missing?
>>> 
>>> 
>>> 
>>> Regards,
>>> Heena
>> 
>> -- 
>> 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/d761c989-ef92-4603-8c8e-85ec4eeb3766o%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/CAG_OxbgYqw02b4TnJAvBgWo7dvjRvf7zr6V%2BcBDKE_5hafCDJA%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/82AC7F19-2444-4E74-90B0-DCAC8F3722C2%40gmail.com.


Re: [deal.II] Particles and field interpolation error

2020-07-15 Thread Luca Heltai
Franco,

The interpolated field says that the field value is zero (on the line above 
your arrow). This is how it is documented: if a particle is removed, its 
interpolated value is left unchanged in the target vector. Zero in your case. 

Luca

> Il giorno 15 lug 2020, alle ore 18:18, Franco Milicchio 
>  ha scritto:
> 
> 
> Dear all,
> 
> I am playing with 9.2 and particles, but I've encountered a weird problem. If 
> I remove a particle, the interpolated field on particle locations yields a 
> wrong answer.
> 
> My code does (now) everything by hand:
> 
>   // Here be drangons...
> 
>   Point<2> p_0(0.1,0.5);
>   auto ref_cell_0 = GridTools::find_active_cell_around_point(dof_handler, 
> p_0);
>   Point<2> ref_p_0 = 
> StaticMappingQ1<2>::mapping.transform_real_to_unit_cell(ref_cell_0, p_0);
> 
>   Point<2> p_1(0.5,0.5);
>   auto ref_cell_1 = GridTools::find_active_cell_around_point(dof_handler, 
> p_1);
>   Point<2> ref_p_1 = 
> StaticMappingQ1<2>::mapping.transform_real_to_unit_cell(ref_cell_1, p_1);
> 
>   Point<2> p_2(0.9,0.5);
>   auto ref_cell_2 = GridTools::find_active_cell_around_point(dof_handler, 
> p_2);
>   Point<2> ref_p_2 = 
> StaticMappingQ1<2>::mapping.transform_real_to_unit_cell(ref_cell_2, p_2);
> 
>   particle_handler.insert_particle(Particles::Particle<2>(p_0, ref_p_0, 0), 
> ref_cell_0);
>   particle_handler.insert_particle(Particles::Particle<2>(p_1, ref_p_1, 1), 
> ref_cell_1);
>   particle_handler.insert_particle(Particles::Particle<2>(p_2, ref_p_2, 2), 
> ref_cell_2);
> 
>   particle_handler.update_cached_numbers();
> 
>   std::cout << "Printing particle id, location and reference location" << 
> std::endl;
>   for(auto :particle_handler)
>   {
> std::cout << "id: " << p.get_id() << "  loc: " << p.get_location() << "  
> ref_loc: " << p.get_reference_location() << std::endl;
>   }
> 
>   field_on_particles.reinit(particle_handler.n_global_particles());
>   Particles::Utilities::interpolate_field_on_particles(dof_handler, 
> particle_handler, field, field_on_particles);
> 
>   std::cout << "Printing field value on particle location" << std::endl;
>   for(int pp = 0; pp< particle_handler.n_global_particles(); pp++)
>   {
>   std::cout << "fluid id: " << pp << " value: " << field_on_particles[pp] 
> << std::endl;
>   }
> 
>   // 
>   // NOW REMOVE A PARTICLE...
>   // 
> 
>   for(auto itr=particle_handler.begin(); itr != particle_handler.end(); itr++)
>   {
> if(itr->get_id()==1) particle_handler.remove_particle(itr);
>   }
> 
>   particle_handler.update_cached_numbers();
> 
> 
>   // ***
>   // ...AND VALUES ARE WRONG
>   // ***
> 
>   std::cout << "Printing particle id, location and reference location after 
> removing particle" << std::endl;
> 
>   for(auto itr_2=particle_handler.begin(); itr_2 != particle_handler.end(); 
> itr_2++)
>   {
> std::cout << "id: " << itr_2->get_id() << "  loc: " << 
> itr_2->get_location() << "  ref_loc: " << itr_2->get_reference_location() << 
> std::endl;
>   }
> 
>   field_on_particles.reinit(particle_handler.n_global_particles());
>   Particles::Utilities::interpolate_field_on_particles(dof_handler, 
> particle_handler, field, field_on_particles);
> 
> 
>   std::cout << "Printing field value on particles location after removing 
> particle" << std::endl;
> 
>   for(int ppp = 0; ppp < particle_handler.n_global_particles(); ppp++)
>   {
>   std::cout << "fluid id: " << ppp << " value: " << 
> field_on_particles[ppp] << std::endl;
>   }
> 
> The scalar field is generated with the X component, so its range is [0-1], 
> and as you can see before the removal the field is perfect. After, though, I 
> have weird numbers (forgive the ugly code and the useless reinit):
> 
> 
> Number of active cells: 1024
> Number of degrees of freedom: 1089
> Printing particle id, location and reference location
> id: 0  loc: 0.1 0.5  ref_loc: 0.2 1
> id: 1  loc: 0.5 0.5  ref_loc: 1 1
> id: 2  loc: 0.9 0.5  ref_loc: 0.8 1
> Printing field value on particles location
> fluid id: 0 value: 0.1   <--- OK!
> fluid id: 1 value: 0.5   <--- OK!
> fluid id: 2 value: 0.9   <--- OK!
> Printing particle id, location and reference location after removing particle
> id: 0  loc: 0.1 0.5  ref_loc: 0.2 1
> id: 2  loc: 0.9 0.5  ref_loc: 0.8 1
> Printing field value on particles location after removing particle
> fluid id: 0 value: 0.1   <-- STILL OK, I HOPE IT IS
> fluid id: 1 value: 0.<-- 
> 
> Am I using the particles the way they're not intended? Any hints are really 
> welcome!
> 
> Thanks!
>Franco
> 
> PS. I am attaching a ZIP file with a minimal working code adapting the step 3 
> of the tutorial.
> 
> 
> -- 
> 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 

Re: [deal.II] parallel::distributed::SolutionTransfer for FE_FaceQ element

2020-07-13 Thread Luca Heltai
Dear Yu,

It is unclear what it means to transfer a solution for FE_FaceQ. On refined 
cells, the central part of the skeleton cannot be transferred from the outer 
skeleton (I.e., a refined grid is not a subspace Of the coarse grid), so 
technically we cannot transfer solutions for FE spaces defined only on faces. 
You should construct the solution transfer by hand, if you really need that. 

Luca

> Il giorno 13 lug 2020, alle ore 22:21, Yu Leng  ha 
> scritto:
> 
> 
> Wolfgang,
> 
> Thanks for your quick response. I added a function ( local_refine(),  line 
> 959 - 1010 ) to step-61, please see the example in the attachment.
> 
> I have this error in serial as well. The error comes from 
> SolutionTransfer.interpolate().
> 
> 
> Thanks,
> Yu 
> 
>> On Monday, July 13, 2020 at 3:08:41 PM UTC-4, Wolfgang Bangerth wrote:
>> On 7/12/20 5:06 PM, Yu Leng wrote: 
>> > 
>> > I am encountered with this error while using adaptive mesh refinement in 
>> > parallel. 
>> > 
>> > virtual const FullMatrix ::FiniteElement<2, 
>> > 2>::get_prolongation_matrix(const unsigned int, const RefinementCase 
>> > &) const 
>> > The violated condition was: 
>> >  prolongation[refinement_case - 1][child].n() == this->dofs_per_cell 
>> > Additional information: 
>> >You are trying to access the matrices that describe how to embed a 
>> > finite 
>> > element function on one cell into the finite element space on one of its 
>> > children (i.e., the 'embedding' or 'prolongation' matrices). However, the 
>> > current finite element can either not define this sort of operation, or it 
>> > has 
>> > not yet been implemented. 
>> 
>> Yu -- could you try to come up with a minimal example that demonstrates the 
>> error? It doesn't have to do anything useful -- just set up the FE, a 
>> DoFHandler, call SolutionTransfer. This way, it would be much simpler for us 
>> to reproduce the error. 
>> 
>> 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/4a80b18b-a555-4049-9f05-58a2182c0a3do%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/7DB329F0-8117-4C3E-958E-9E70EB024F05%40gmail.com.


Re: [deal.II] Setting up dealii through Docker

2020-06-28 Thread Luca Heltai
If you want to develop using an ide, you could use visual studio code, with the 
remote development extension. This allows you to compile inside the docker as 
if it was a local compiler (including code completion, and debugging 
facilities):

https://code.visualstudio.com/docs/remote/containers

Best,
Luca

> Il giorno 28 giu 2020, alle ore 03:34, Bhavesh Shrimali 
>  ha scritto:
> 
> 
> Hi Luca, 
> 
> Thanks a lot for the reply! After a fresh pull of the container (with vim 
> installed) and changing CMakeLists.txt accordingly, everything works like 
> charm  
> 
> 
> Best,
> Bhavesh
> 
>> On Saturday, 27 June 2020 01:58:07 UTC-5, Luca Heltai wrote:
>> Are you using an example from deal.II master? If this is the case, the 
>> example looks for 9.3pre but the image we provide only has 9.1 installed.  
>> Try inspecting the CMakeList.txt to see which version is being looked for, 
>> and try changing to 9.1. 
>> 
>> Luca
>> 
>>>> Il giorno 27 giu 2020, alle ore 06:58, Bhavesh Shrimali 
>>>>  ha scritto:
>>>> 
>>> 
>>> Hi Daniel, 
>>> 
>>> Thanks for your reply. So the error above was pretty obvious 
>>> 
>>> So I was going to update this after today's try. I did see (after posting 
>>> this) yesterday that I could see
>>> 
>>> /usr/includ/deal.II
>>> 
>>> the directories therein. Also I sourced  `.bashrc` in /home/dealii, which I 
>>> thought would set the proper paths. I couldn't view the contents of .bashrc 
>>> (my bad that I didn't install a text editor inside the container). Now it 
>>> at least (perhaps) locates deal.II properly, but throws:
>>> 
>>> bshrima2@golubh1:/projects/meca/bshrima2/Deal2/examples/step-1$ cmake .
>>> -- The C compiler identification is GNU 7.5.0
>>> -- The CXX compiler identification is unknown
>>> -- Check for working C compiler: /usr/bin/gcc
>>> -- Check for working C compiler: /usr/bin/gcc -- works
>>> -- Detecting C compiler ABI info
>>> -- Detecting C compiler ABI info - done
>>> -- Detecting C compile features
>>> -- Detecting C compile features - done
>>> CMake Error at CMakeLists.txt:38 (PROJECT):
>>>   The CMAKE_CXX_COMPILER:
>>> 
>>> /usr/local/gcc/7.2.0/bin/c++
>>> 
>>>   is not a full path to an existing compiler tool.
>>> 
>>>   Tell CMake where to find the compiler by setting either the environment
>>>   variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full 
>>> path
>>>   to the compiler, or to the compiler name if it is in the PATH.
>>> 
>>> 
>>> I am using cmake/3.12 that is installed on our cluster. I would update the 
>>> container with a text editor and redo the entire process. 
>>> 
>>> As for building step-1, I copied step-1.cc and CMakeLists.txt in a new 
>>> folder and did `cmake .` following the instructions on the dealii website. 
>>> 
>>> Thanks
>>> Bhavesh
>>> 
>>>> On Friday, 26 June 2020 23:04:14 UTC-5, Daniel Arndt wrote:
>>>> Bhavesh,
>>>> 
>>>> It's hard to tell if there is something going wrong and if so what it is 
>>>> from just the information you provided.
>>>> If you inspect your container can you find the deal.II library, i.e. the 
>>>> include files and the shared library?
>>>> If so, how did you try to invoke CMake when trying to build step-1? Do you 
>>>> set any environment variables like DEAL_II_DIR?
>>>> 
>>>> Best,
>>>> Daniel
>>>> 
>>>>> Am Do., 25. Juni 2020 um 18:51 Uhr schrieb Bhavesh Shrimali 
>>>>> :
>>>>> Hi dealii users,
>>>>> 
>>>>> I wanted to get started with dealii (and in the long run hopefully use it 
>>>>> for my research). Naturally, I sought the easiest way forward through 
>>>>> docker. Since I use Singularity more often than docker (due to seamless 
>>>>> transition to running on our HPC cluster) I put together a container 
>>>>> here. It basically pulls the corresponding `tagged` image from DockerHub 
>>>>> and installs a bunch of other libraries that I use in my research.
>>>>> 
>>>>> However when I try to execute step-1 as listed in the tutorials section, 
>>>>> it seems that dealii isn't installed on the docker image (or maybe I am 
>>>>> missing something)
>>>>&g

Re: [deal.II] Setting up dealii through Docker

2020-06-27 Thread Luca Heltai
Are you using an example from deal.II master? If this is the case, the example 
looks for 9.3pre but the image we provide only has 9.1 installed.  Try 
inspecting the CMakeList.txt to see which version is being looked for, and try 
changing to 9.1. 

Luca

> Il giorno 27 giu 2020, alle ore 06:58, Bhavesh Shrimali 
>  ha scritto:
> 
> 
> Hi Daniel, 
> 
> Thanks for your reply. So the error above was pretty obvious 
> 
> So I was going to update this after today's try. I did see (after posting 
> this) yesterday that I could see
> 
> /usr/includ/deal.II
> 
> the directories therein. Also I sourced  `.bashrc` in /home/dealii, which I 
> thought would set the proper paths. I couldn't view the contents of .bashrc 
> (my bad that I didn't install a text editor inside the container). Now it at 
> least (perhaps) locates deal.II properly, but throws:
> 
> bshrima2@golubh1:/projects/meca/bshrima2/Deal2/examples/step-1$ cmake .
> -- The C compiler identification is GNU 7.5.0
> -- The CXX compiler identification is unknown
> -- Check for working C compiler: /usr/bin/gcc
> -- Check for working C compiler: /usr/bin/gcc -- works
> -- Detecting C compiler ABI info
> -- Detecting C compiler ABI info - done
> -- Detecting C compile features
> -- Detecting C compile features - done
> CMake Error at CMakeLists.txt:38 (PROJECT):
>   The CMAKE_CXX_COMPILER:
> 
> /usr/local/gcc/7.2.0/bin/c++
> 
>   is not a full path to an existing compiler tool.
> 
>   Tell CMake where to find the compiler by setting either the environment
>   variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
>   to the compiler, or to the compiler name if it is in the PATH.
> 
> 
> I am using cmake/3.12 that is installed on our cluster. I would update the 
> container with a text editor and redo the entire process. 
> 
> As for building step-1, I copied step-1.cc and CMakeLists.txt in a new folder 
> and did `cmake .` following the instructions on the dealii website. 
> 
> Thanks
> Bhavesh
> 
>> On Friday, 26 June 2020 23:04:14 UTC-5, Daniel Arndt wrote:
>> Bhavesh,
>> 
>> It's hard to tell if there is something going wrong and if so what it is 
>> from just the information you provided.
>> If you inspect your container can you find the deal.II library, i.e. the 
>> include files and the shared library?
>> If so, how did you try to invoke CMake when trying to build step-1? Do you 
>> set any environment variables like DEAL_II_DIR?
>> 
>> Best,
>> Daniel
>> 
>>> Am Do., 25. Juni 2020 um 18:51 Uhr schrieb Bhavesh Shrimali 
>>> :
>>> Hi dealii users,
>>> 
>>> I wanted to get started with dealii (and in the long run hopefully use it 
>>> for my research). Naturally, I sought the easiest way forward through 
>>> docker. Since I use Singularity more often than docker (due to seamless 
>>> transition to running on our HPC cluster) I put together a container here. 
>>> It basically pulls the corresponding `tagged` image from DockerHub and 
>>> installs a bunch of other libraries that I use in my research.
>>> 
>>> However when I try to execute step-1 as listed in the tutorials section, it 
>>> seems that dealii isn't installed on the docker image (or maybe I am 
>>> missing something)
>>> 
>>> CMake Error at CMakeLists.txt:30 (MESSAGE):
>>> 
>>> 
>>>   *** Could not locate a (sufficiently recent) version of deal.II.  ***
>>> 
>>> 
>>> 
>>>   You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake
>>> 
>>>   or set an environment variable "DEAL_II_DIR" that contains this path.
>>> 
>>> 
>>> -- Configuring incomplete, errors occurred!
>>> 
>>> 
>>> 
>>> 
>>> Does anyone know, what am I missing here ? 
>>> 
>>> Thanks in advance! 
>>> -- 
>>> 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 dea...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/dealii/d2840b63-7278-4519-a8dc-1282035dad2ao%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/3a602a9e-51b3-445d-99a1-ed564c37ccc3o%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 

Re: [deal.II] Reading a Tensor from parameter file

2020-04-15 Thread Luca Heltai
Currently, this is also the simplest way:

Tensor tens;
prm.add_parameter("Tensor", tens);

Take a look at the documentation of the add parameter method.

Patterns::Tools::to_string(tens);

And 

Patterns::Tools::to_value 

Are also available to simplify what you want to achieve. 

Alternatively: Patterns::Tools::Convert offers ways to construct default 
Patterns for many types, including Tensors. 

Best,
Luca

> Il giorno 15 apr 2020, alle ore 14:57, Ahmad Shahba  ha 
> scritto:
> 
> 
> Ooops! The background was too dark :-)
> 
> #include 
> #include 
> #include 
> #include 
> #include 
> #include 
> 
> using namespace dealii;
> 
> int main() {
> 
> 
> // Let's read this tensor from an istringstream. You may read it from 
> istream in your
> // application
> std::istringstream is("set Tensor3x3 = 11, 12, 13, 21, 22, 23, 31, 32, 
> 33");
> 
> 
> // Now let's set up the ParameterHandler object. Since you are reading 
> 3x3 tensor, you are
> // dealing with 9 components and the default value should also have 9 
> components (here 9
> // zeros) in it
> ParameterHandler prm;
> 
> using Patterns::List;
> using Patterns::Double;
> prm.declare_entry("Tensor3x3",
>   "0,0,0,0,0,0,0,0,0",
>   List(Double(), 9, 9),
>   "Tensor components");
> 
> 
> // Let's read it in now
> prm.parse_input(is);
> const std::string tensorString = prm.get("Tensor3x3");
> 
> // Now let's split the string into individual components
> const std::vector tensorComponentsString =
> Utilities::split_string_list(tensorString);
> 
> // Now go over each component, convert it into double and put it in the 
> tensor
> Tensor<2, 3> tensor;
> unsigned int counter = 0;
> for (unsigned ii = 0; ii < tensor.dimension; ++ii) {
> for (unsigned jj = 0; jj < tensor.dimension; ++jj) {
> tensor[ii][jj] = 
> Utilities::string_to_double(tensorComponentsString[counter++]);
> }
> }
> 
> 
> // Let's check if we read the tensor correctly
> for (unsigned ii = 0; ii < tensor.dimension; ++ii) {
> for (unsigned jj = 0; jj < tensor.dimension; ++jj) {
> std::cout << "component [" << ii << ", " << jj << " ] = "
>   << tensor[ii][jj] << std::endl;
> }
> }
> 
> 
> }
> 
> 
> Enter code here...
> 
> 
> 
>> On Wednesday, April 15, 2020 at 8:53:55 AM UTC-4, Ahmad Shahba wrote:
>> Here is the code that does what I explained. I just switched up step 5 with 
>> a much simpler approach. Note that you can simply make this into a 
>> function/class template so that you could read general tensors, not just 3x3 
>> tensors. I leave that to you :-)
>> 
>> #include 
>> #include 
>> #include 
>> #include 
>> #include 
>> #include 
>> 
>> using namespace dealii;
>> 
>> int main() {
>> 
>> 
>> // Let's read this tensor from an istringstream. You may read it from 
>> istream in your
>> // application
>> std::istringstream is("set Tensor3x3 = 11, 12, 13, 21, 22, 23, 31, 32, 
>> 33");
>> 
>> 
>> // Now let's set up the ParameterHandler object. Since you are reading 
>> 3x3 tensor, you are
>> // dealing with 9 components and the default value should also have 9 
>> components (here 9 
>> // zeros) in it
>> ParameterHandler prm;
>> 
>> using Patterns::List;
>> using Patterns::Double;
>> prm.declare_entry("Tensor3x3",
>>   "0,0,0,0,0,0,0,0,0",
>>   List(Double(), 9, 9),
>>   "Tensor components");
>> 
>> 
>> // Let's read it in now
>> prm.parse_input(is);
>> const std::string tensorString = prm.get("Tensor3x3");
>> 
>> // Now let's split the string into individual components
>> const std::vector tensorComponentsString =
>> Utilities::split_string_list(tensorString);
>> 
>> // Now go over each component, convert it into double and put it in the 
>> tensor
>> Tensor<2, 3> tensor;
>> unsigned int counter = 0;
>> for (unsigned ii = 0; ii < tensor.dimension; ++ii) {
>> for (unsigned jj = 0; jj < tensor.dimension; ++jj) {
>> tensor[ii][jj] = 
>> Utilities::string_to_double(tensorComponentsString[counter++]);
>> }
>> }
>> 
>> 
>> // Let's check if we read the tensor correctly
>> for (unsigned ii = 0; ii < tensor.dimension; ++ii) {
>> for (unsigned jj = 0; jj < tensor.dimension; ++jj) {
>> std::cout << "component [" << ii << ", " << jj << " ] = "
>>   << tensor[ii][jj] << std::endl;
>> }
>> }
>> 
>> 
>> }
>> 
>> 
>> 
>> 
>> 
>> 
>>> On Wednesday, April 15, 2020 at 3:54:57 AM UTC-4, Paras Kumar wrote:
>>> Ahmad,
>>> 
 On Tuesday, April 14, 2020 at 5:39:06 PM UTC+2, Ahmad Shahba wrote:
 I don't know if it is the optimal way but I would use the following 
 approach
 Read tensor components as Patterns::List 
 Use  

Re: [deal.II] Deal.II on Docker

2020-03-13 Thread Luca Heltai
The examples you are using are likely looking for deal.II 9.2.pre. Try changing 
the makefile, and see if that works. :-)

Luca

> Il giorno 13 mar 2020, alle ore 02:47, Robert Kopp  
> ha scritto:
> 
> 
> After some false starts, I was able to use deal.II on Ubuntu 18.04 by 
> installing it from the backport PPA. It occurred to me that I might want to 
> use it during a Windows session, and since Windows does not support it 
> natively, the use of a pre-built Docker container came to mind.
> 
> The most likely candidate was dealii/dealii:latest. I was disappointed to 
> note the the "examples" weren't there (or, at least, I can't find them) so I 
> downloaded these from Github. As in the case of my abortive attempts on bare 
> metal, I received such messages as the following:
> 
> dealii@5ee4b768bb50:~/dealii/examples/step-5$ cmake .
> CMake Error at CMakeLists.txt:30 (MESSAGE):  
> 
>   *** Could not locate a (sufficiently recent) version of deal.II.  ***  
> 
>   You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake
> 
>   or set an environment variable "DEAL_II_DIR" that contains this path.
> 
> I was hoping that it would be a complete kit, but upbeat_albattani had let me 
> down. Can anyone suggest a good way (reference, etc.) to get up to speed on 
> this container? I can do everything I need to do on Linux, but there would be 
> some advantage to being able to use it on Windows as well. 
> 
> -- 
> 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/e007aee1-2057-4541-9eed-92c9bf5b0cf6%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/088BCB8C-962C-41AA-9166-1B45C0C212AE%40gmail.com.


[deal.II] Intensive course on Finite Element Methods using deal.II @ SISSA

2020-01-17 Thread Luca Heltai
Dear All, 

the Master in High Performance Computing (www.mhpc.it) is organising an 
intensive 5 days course dedicated to MHPC and PhD students. The course will 
take place @ SISSA (www.sisssa.it), in Trieste, Italy:

Course title: “The Finite Element Method using deal.II”
Course lecturers: Wolfgang Bangerth and Luca Heltai

More information on the course schedule is available here:

http://tiny.cc/xqttiz

A limited number of seats is available for external PhD students, postdocs, and 
researcher. No fee is required, but registration is mandatory.

To reserve a seat, please complete this form: 

https://forms.gle/TwupiUvcXdUDTQ2F8

Best,
Luca.

--
Luca Heltai 
http://people.sissa.it/~heltai/
Scuola Internazionale Superiore di Studi Avanzati
Phone:  +39 040 3787 449, Office: 608
--
There are no answers, only cross references.

-- 
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/AC456EB0-FA21-4F58-B504-7E0E93949FB8%40sissa.it.


Re: [deal.II] Particle contact detection

2019-10-14 Thread Luca Heltai
Take a look at the Particles namespace, and at the rtree boost documentation 
(we wrap rtree from boost into the RTree alias, which is compatible with 
Point, BoundingBox and Segment).

The tests/boost directory contains some examples that may be useful. 

Luca

> Il giorno 14 ott 2019, alle ore 06:55, Shahab Golshan 
>  ha scritto:
> 
> Dear all,
> I am writing a code for handling collisions between large numbers of 
> particles.
> I need to find all the available classes in dealII, which might be useful.
> These classes may include methods to find neighbor particles in the system or 
> calculation of particles' overlap during a collision.
> Any information would be appreciated.
> Best
> Shahab
> -- 
> 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/e0a2bf26-e56a-408a-84a7-914b9c7c488a%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/462DADB8-EEEF-494F-A3E9-647DE8691E9E%40gmail.com.


Re: [deal.II] Reading mesh from vtk file

2019-08-05 Thread Luca Heltai
Dear Andreas,

You are trying to read a vtk file that was generated by DataOut. 

Try to write the file with GridOut::write_vtk. 

DataOut produces files that are split cell wise (to allow for some flexibility 
in discontinuos fields. 

Luca

> Il giorno 5 ago 2019, alle ore 03:05, Andreas Rupp  ha 
> scritto:
> 
> Dear all,
> 
> I am trying to read a grid from a vtk file created by Paraview. 
> Unfortunately, this does not work.
> Moreover, reading a vtk file that has been created using deal.ii also does 
> not work for me. It seems to me that deal.ii reads the file but does not 
> connect the faces to form a mesh. This is underlined by the attached minimal 
> toy example which creates a two dimensional cross, prints the cross' interior 
> and boundary faces, writes it to a vtk file, reads the mesh from the file, 
> and again prints the interior and boundary faces. Execution of the program 
> gives the following output:
> 
> Self Interface  1  0 -0.5
> Self Interface  2  -0.5 0
> Self Interface  3  0.5 0
> Self Boundaryface  1  1 -0.5
> Self Interface  4  0 0.5
> Self Boundaryface  2  -0.5 1
> Self Boundaryface  3  1 0.5
> Self Boundaryface  4  0.5 1
> Self Boundaryface  5  -1 -0.5
> Self Boundaryface  6  -1.5 0
> Self Boundaryface  7  -1 0.5
> Self Boundaryface  8  1.5 0
> Self Boundaryface  9  -0.5 -1
> Self Boundaryface  10  0 -1.5
> Self Boundaryface  11  0.5 -1
> Self Boundaryface  12  0 1.5
> 
> Read Boundaryface  1  0 -0.5
> Read Boundaryface  2  -0.5 0
> Read Boundaryface  3  0.5 0
> Read Boundaryface  4  0 0.5
> Read Boundaryface  5  -1 -0.5
> Read Boundaryface  6  -1.5 0
> Read Boundaryface  7  -0.5 0
> Read Boundaryface  8  -1 0.5
> Read Boundaryface  9  1 -0.5
> Read Boundaryface  10  0.5 0
> Read Boundaryface  11  1.5 0
> Read Boundaryface  12  1 0.5
> Read Boundaryface  13  0 -1.5
> Read Boundaryface  14  -0.5 -1
> Read Boundaryface  15  0.5 -1
> Read Boundaryface  16  0 -0.5
> Read Boundaryface  17  0 0.5
> Read Boundaryface  18  -0.5 1
> Read Boundaryface  19  0.5 1
> Read Boundaryface  20  0 1.5
> 
> Is there any quick fix to this issue (except for not using vtk)? I failed 
> with merging the mesh with itself to eliminate the double boundary faces 
> (e.g. 1 and 16).
> Thank you very much!
> 
> Best regards,
> Andreas
> -- 
> 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/bfb4e975-63ab-4be0-9e3e-f9bf0a131ce6%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/D093DD55-276E-4DAF-BFB1-AFA73376A34B%40gmail.com.


[deal.II] Old Mac Users wanted.

2018-05-19 Thread Luca Heltai
Dear All, 

I just uploaded a version of deal.II 9.1.0pre (master version of yesterday) 
here:

https://github.com/luca-heltai/dealii/releases/tag/v9.1.0-pre-1 
<https://github.com/luca-heltai/dealii/releases/tag/v9.1.0-pre-1>

This was compiled with clang 6.0.0, downloaded from the official llvm website. 
The compiler is included in the package, making this a good candidate for users 
of older Macs that did not (or do not want to) update Xcode to get Apple clang 
9.1.0.

This package should work for you too. If there is anyone that has not updated 
yet to Apple clang 9.1.0, can you try to see if this package works for you?

Thanks!
Luca.

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[deal.II] Re: Mac testers wanted

2018-05-06 Thread Luca Heltai
Sorry. The address is the following:

https://github.com/dealii/dealii/releases/v9.0.0-rc2

Luca

> Il giorno 06 mag 2018, alle ore 11:30, luca.heltai  ha 
> scritto:
> 
> Dear all, 
> 
> I have just uploaded a new package for deal.II-9.0.0-rc2 here:
> 
> https://github.com/dealii/dealii/releases/edit/v9.0.0-rc2
> 
> This was compiled with Apple clang 9.1.0, and gfortran from gcc 7.3.
> 
> Please test, and let me know if everything is ok.
> 
> Best,
> Luca.

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [deal.II] New Mac OSX brew package

2017-11-09 Thread Luca Heltai
I'm using clang+gfortran. I have not tried using gcc for everything, but I 
could give it a shot if you think it would be worth it. 

Luca

> On 9 Nov 2017, at 17:59, Timo Heister  wrote:
> 
> thanks, Luca!
> 
> Are you using the system clang with the fortran compiler from gcc? Are
> the spack packages compiled with gcc or with clang?
> 
>> On Thu, Nov 9, 2017 at 3:40 AM, luca.heltai  wrote:
>> Dear All,
>> 
>> I just finished uploading a new brew based package for deal.II with a 
>> 9.0pre.1 version:
>> 
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_luca-2Dheltai_dealii_releases_tag_v9.0.pre.1=DwIFaQ=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4=4k7iKXbjGC8LfYxVJJXiaYVu6FRWmEjX38S7JmlS9Vw=B4_I7m9Fb7UJr3fQ0YmopMCt2BsnKOY2uoFIQ28VKXs=UQTroVQ4XmKFbV4qTi4pGa6KPdjCdxglDVCGB7IPIo4=
>>  
>> 
>> It was compiled on a Mac OS X High Sierra: 10.13 (17A405), with Xcode 9.0.1 
>> (9A1004).
>> 
>> The application contains a full `spack` installation at
>> 
>> `/Applications/deal.II-9.0-spack/Contents/Resources/spack`
>> 
>> You’ll have access to all spack facilities (including modules) by adding
>> 
>> . 
>> /Applications/deal.II-9.0-spack.app/Contents/Resources/share/deal.II/dealii.conf
>> 
>> to your ~/.profile file.
>> 
>> Summary.log:
>> 
>> ###
>> #
>> #  deal.II configuration:
>> #CMAKE_BUILD_TYPE:   DebugRelease
>> #BUILD_SHARED_LIBS:  ON
>> #CMAKE_INSTALL_PREFIX:   
>> /Applications/deal.II-9.0-spack.app/Contents/Resources
>> #CMAKE_SOURCE_DIR:   /Users/heltai/dealii/dealii
>> #(version 9.0.0-pre, shortrev 88babf1a4d)
>> #CMAKE_BINARY_DIR:   /Users/heltai/dealii/dealii/build-9.0-spack
>> #CMAKE_CXX_COMPILER: AppleClang 9.0.0.938 on platform Darwin 
>> x86_64
>> #
>> /Applications/deal.II-9.0-spack.app/Contents/Resources/spack/view/bin/mpic++
>> #
>> #  Configured Features (DEAL_II_ALLOW_BUNDLED = ON, 
>> DEAL_II_ALLOW_AUTODETECTION = ON):
>> #  ( DEAL_II_WITH_64BIT_INDICES = OFF )
>> #DEAL_II_WITH_ADOLC set up with external dependencies
>> #DEAL_II_WITH_ARPACK set up with external dependencies
>> #DEAL_II_WITH_ASSIMP set up with external dependencies
>> #DEAL_II_WITH_BOOST set up with external dependencies
>> #  ( DEAL_II_WITH_CUDA = OFF )
>> #DEAL_II_WITH_CXX14 = ON
>> #DEAL_II_WITH_CXX17 = ON
>> #DEAL_II_WITH_GSL set up with external dependencies
>> #DEAL_II_WITH_HDF5 set up with external dependencies
>> #DEAL_II_WITH_LAPACK set up with external dependencies
>> #DEAL_II_WITH_METIS set up with external dependencies
>> #DEAL_II_WITH_MPI set up with external dependencies
>> #DEAL_II_WITH_MUPARSER set up with external dependencies
>> #DEAL_II_WITH_NANOFLANN set up with external dependencies
>> #DEAL_II_WITH_NETCDF set up with external dependencies
>> #DEAL_II_WITH_OPENCASCADE set up with external dependencies
>> #DEAL_II_WITH_P4EST set up with external dependencies
>> #DEAL_II_WITH_PETSC set up with external dependencies
>> #DEAL_II_WITH_SLEPC set up with external dependencies
>> #DEAL_II_WITH_SUNDIALS set up with external dependencies
>> #DEAL_II_WITH_THREADS set up with external dependencies
>> #DEAL_II_WITH_TRILINOS set up with external dependencies
>> #DEAL_II_WITH_UMFPACK set up with external dependencies
>> #DEAL_II_WITH_ZLIB set up with external dependencies
>> #
>> #  Component configuration:
>> #  ( DEAL_II_COMPONENT_DOCUMENTATION = OFF )
>> #  ( DEAL_II_COMPONENT_EXAMPLES = OFF )
>> #DEAL_II_COMPONENT_PACKAGE
>> #  ( DEAL_II_COMPONENT_PYTHON_BINDINGS = OFF )
>> #
>> #  Detailed information (compiler flags, feature configuration) can be found 
>> in detailed.log
>> #
>> #  Run  $ ninja info  to print a help message with a list of top level 
>> targets
>> #
>> ###
>> 
>> And this is the output of spack find:
>> 
>> ==> 74 installed packages.
>> -- darwin-highsierra-x86_64 / clang@9.0.0-apple -
>> adol-c@develop  freetype@2.7.1lcms@2.8 
>> nasm@2.11.06pkg-config@0.29.2
>> arpack-ng@3.5.0 gcc@7.2.0 libjpeg-turbo@1.5.0  
>> ncurses@6.0 python@2.7.14
>> assimp@4.0.1gdbm@1.13 libpng@1.6.29
>> netcdf@4.4.1.1  readline@7.0
>> astyle@2.04 gettext@0.19.8.1  libsigsegv@2.11  
>> netcdf-cxx@4.2  slepc@3.8.0
>> autoconf@2.69   ghostscript@9.21  libtiff@4.0.8
>> netlib-scalapack@2.0.2  sqlite@3.20.0
>> automake@1.15.1 glm@0.9.7.1   libtool@2.4.6
>> ninja@1.8.2 suite-sparse@4.5.5
>> bison@3.0.4 gmp@6.1.2 libxml2@2.9.4
>> numdiff@5.9.0   sundials@3.0.0
>> boost@1.63.0   

[deal.II] New Mac OSX brew package

2017-11-09 Thread luca . heltai
Dear All, 

I just finished uploading a new brew based package for deal.II with a 9.0pre.1 
version:

https://github.com/luca-heltai/dealii/releases/tag/v9.0.pre.1

It was compiled on a Mac OS X High Sierra: 10.13 (17A405), with Xcode 9.0.1 
(9A1004).

The application contains a full `spack` installation at 

`/Applications/deal.II-9.0-spack/Contents/Resources/spack`

You’ll have access to all spack facilities (including modules) by adding

. 
/Applications/deal.II-9.0-spack.app/Contents/Resources/share/deal.II/dealii.conf
 

to your ~/.profile file.

Summary.log:

###
#
#  deal.II configuration:
#CMAKE_BUILD_TYPE:   DebugRelease
#BUILD_SHARED_LIBS:  ON
#CMAKE_INSTALL_PREFIX:   
/Applications/deal.II-9.0-spack.app/Contents/Resources
#CMAKE_SOURCE_DIR:   /Users/heltai/dealii/dealii
#(version 9.0.0-pre, shortrev 88babf1a4d)
#CMAKE_BINARY_DIR:   /Users/heltai/dealii/dealii/build-9.0-spack
#CMAKE_CXX_COMPILER: AppleClang 9.0.0.938 on platform Darwin 
x86_64
#
/Applications/deal.II-9.0-spack.app/Contents/Resources/spack/view/bin/mpic++
#
#  Configured Features (DEAL_II_ALLOW_BUNDLED = ON, DEAL_II_ALLOW_AUTODETECTION 
= ON):
#  ( DEAL_II_WITH_64BIT_INDICES = OFF )
#DEAL_II_WITH_ADOLC set up with external dependencies
#DEAL_II_WITH_ARPACK set up with external dependencies
#DEAL_II_WITH_ASSIMP set up with external dependencies
#DEAL_II_WITH_BOOST set up with external dependencies
#  ( DEAL_II_WITH_CUDA = OFF )
#DEAL_II_WITH_CXX14 = ON
#DEAL_II_WITH_CXX17 = ON
#DEAL_II_WITH_GSL set up with external dependencies
#DEAL_II_WITH_HDF5 set up with external dependencies
#DEAL_II_WITH_LAPACK set up with external dependencies
#DEAL_II_WITH_METIS set up with external dependencies
#DEAL_II_WITH_MPI set up with external dependencies
#DEAL_II_WITH_MUPARSER set up with external dependencies
#DEAL_II_WITH_NANOFLANN set up with external dependencies
#DEAL_II_WITH_NETCDF set up with external dependencies
#DEAL_II_WITH_OPENCASCADE set up with external dependencies
#DEAL_II_WITH_P4EST set up with external dependencies
#DEAL_II_WITH_PETSC set up with external dependencies
#DEAL_II_WITH_SLEPC set up with external dependencies
#DEAL_II_WITH_SUNDIALS set up with external dependencies
#DEAL_II_WITH_THREADS set up with external dependencies
#DEAL_II_WITH_TRILINOS set up with external dependencies
#DEAL_II_WITH_UMFPACK set up with external dependencies
#DEAL_II_WITH_ZLIB set up with external dependencies
#
#  Component configuration:
#  ( DEAL_II_COMPONENT_DOCUMENTATION = OFF )
#  ( DEAL_II_COMPONENT_EXAMPLES = OFF )
#DEAL_II_COMPONENT_PACKAGE
#  ( DEAL_II_COMPONENT_PYTHON_BINDINGS = OFF )
#
#  Detailed information (compiler flags, feature configuration) can be found in 
detailed.log
#
#  Run  $ ninja info  to print a help message with a list of top level targets
#
###

And this is the output of spack find:

==> 74 installed packages.
-- darwin-highsierra-x86_64 / clang@9.0.0-apple -
adol-c@develop  freetype@2.7.1lcms@2.8 nasm@2.11.06 
   pkg-config@0.29.2
arpack-ng@3.5.0 gcc@7.2.0 libjpeg-turbo@1.5.0  ncurses@6.0  
   python@2.7.14
assimp@4.0.1gdbm@1.13 libpng@1.6.29
netcdf@4.4.1.1  readline@7.0
astyle@2.04 gettext@0.19.8.1  libsigsegv@2.11  
netcdf-cxx@4.2  slepc@3.8.0
autoconf@2.69   ghostscript@9.21  libtiff@4.0.8
netlib-scalapack@2.0.2  sqlite@3.20.0
automake@1.15.1 glm@0.9.7.1   libtool@2.4.6ninja@1.8.2  
   suite-sparse@4.5.5
bison@3.0.4 gmp@6.1.2 libxml2@2.9.4
numdiff@5.9.0   sundials@3.0.0
boost@1.63.0graphviz@2.38.0   m4@1.4.18oce@0.18.2   
   superlu-dist@5.2.2
bzip2@1.0.6 gsl@2.4   matio@1.5.9  
openblas@0.2.20 tar@1.29
cmake@3.9.4 hdf5@1.10.1   metis@5.1.0  
openmpi@3.0.0   tcl@8.6.6
dealii@develop  help2man@1.47.4   mpc@1.0.3
openssl@1.0.2k  trilinos@12.12.1
doxygen@1.8.12  hwloc@1.11.8  mpfr@3.1.5   p4est@2.0
   xz@5.2.3
environment-modules@3.2.10  hypre@2.12.1  mumps@5.1.1  
parmetis@4.0.3  zip@3.0
expat@2.2.2 intel-tbb@2018.1  muparser@2.2.5   perl@5.24.1  
   zlib@1.2.11
flex@2.6.4  isl@0.18  nanoflann@1.2.3  petsc@3.8.1

You can also load individual module files.

module avail:
bash-3.2$ module avail

- 
/Applications/deal.II-9.0-spack.app/Contents/Resources/spack/share/spack/modules/dar

Re: [deal.II] Re: Deal for Mac OS 10.13

2017-10-11 Thread Luca Heltai
No need to revert OS. Xcode comes with developers toolkits. Newer versions of 
xcode allow users to develop codes for older macs. In order to do that, you 
have to install the corresponding developers toolkit. Namely 10.12. 

I never tried this, but it should work. The other way around is more difficult, 
I.e., it's difficult to make the package work on an older Mac with 10.y, y<12. 

Luca

> On 11 Oct 2017, at 12:25, Deepak Kukrety <deepak.kukr...@gmail.com> wrote:
> 
> Alberto
> 
> I am having similar problem as posted by Alberto. 
> 
> Luca
> 
> Thanks for the suggestion. I am new to both Mac OS and Deal. Can you possibly 
> advise how may I install 10.12 SDK. Would it mean reverting to an older 
> version of the OS for iMac as well? 
> 
> Regards 
> Deepak
> 
>> On Wednesday, 11 October 2017 15:21:15 UTC+8, Luca Heltai wrote:
>> Yes. It is trying to use the accelerate framework, but since it was 
>> installed using 10.12, it links to that one. 
>> 
>> If you install the 10.12 SDK you should have what you need. 
>> 
>> L. 
>> 
>> > On 11 Oct 2017, at 8:58, Alberto Salvadori <alberto@unibs.it> wrote: 
>> > 
>> > Sure, I will. Am I understanding properly that deal.ii is trying to use 
>> > the accelerate framework (I guess because of some lapack calls) when 
>> > compiled for MacOS? 
>> > 
>> > Alberto Salvadori 
>> >  Dipartimento di Ingegneria Civile, Architettura, Territorio, Ambiente e 
>> > di Matematica (DICATAM) 
>> >  Universita` di Brescia, via Branze 43, 25123 Brescia 
>> >  Italy 
>> >  tel 030 3711239 
>> >  fax 030 3711312 
>> > 
>> > e-mail: 
>> >  alberto@unibs.it 
>> > web-pages: 
>> >  http://m4lab.unibs.it/faculty.html 
>> >  http://dicata.ing.unibs.it/salvadori 
>> > 
>> > On Wed, Oct 11, 2017 at 8:44 AM, Luca Heltai <luca@gmail.com> wrote: 
>> > Alberto, 
>> > 
>> > In the options of xcode, you should be able to install also the 10.12 sdk. 
>> > Can you try that? 
>> > 
>> > Luca 
>> > 
>> > On 11 Oct 2017, at 08:30, Alberto Salvadori <alberto@unibs.it> wrote: 
>> > 
>> >> Hi Daniel. 
>> >> 
>> >> After installation of High Sierra, Xcode9, upgrading cmake and using 
>> >> deal.ii/8.5.1 provided by Timo, I run usual regression tests that worked 
>> >> well under Xcode8.x. 
>> >> It turned out that they could not be linked anymore with this error 
>> >> (sorry for the code name): 
>> >> 
>> >> make[2]: *** No rule to make target 
>> >> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Accelerate.framework',
>> >>  needed by `crap_code'.  Stop. 
>> >> 
>> >> make[1]: *** [CMakeFiles/crap_code.dir/all] Error 2 
>> >> 
>> >> make: *** [all] Error 2 
>> >> 
>> >> 
>> >> The simplest code that I attempted to run was the hello world, which run 
>> >> fine without being linked to deal.ii libraries but that provided the very 
>> >> same error with deal.ii. 
>> >> Hope it helps 
>> >> 
>> >> Alberto 
>> >> 
>> >> 
>> >> Il giorno martedì 10 ottobre 2017 14:53:37 UTC+2, Daniel Arndt ha 
>> >> scritto: 
>> >> Alberto and Deepak, 
>> >> 
>> >> what exactly are the problems you are facing? 
>> >> What kind of errors do you get? 
>> >> 
>> >> Best, 
>> >> Daniel 
>> >> 
>> >> 
>> >> Informativa sulla Privacy: http://www.unibs.it/node/8155 
>> >> 
>> >> -- 
>> >> 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. 
>> >> For more options, visit https://groups.google.com/d/optout. 
>> > 
>> > -- 
>> > 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 
>&

Re: [deal.II] Re: Deal for Mac OS 10.13

2017-10-11 Thread Luca Heltai
Alberto,

In the options of xcode, you should be able to install also the 10.12 sdk. Can 
you try that?

Luca

> On 11 Oct 2017, at 08:30, Alberto Salvadori  
> wrote:
> 
> Hi Daniel.
> 
> After installation of High Sierra, Xcode9, upgrading cmake and using 
> deal.ii/8.5.1 provided by Timo, I run usual regression tests that worked well 
> under Xcode8.x.
> It turned out that they could not be linked anymore with this error (sorry 
> for the code name):
> 
> make[2]: *** No rule to make target 
> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Accelerate.framework',
>  needed by `crap_code'.  Stop.
> 
> make[1]: *** [CMakeFiles/crap_code.dir/all] Error 2
> 
> make: *** [all] Error 2
> 
> 
> The simplest code that I attempted to run was the hello world, which run fine 
> without being linked to deal.ii libraries but that provided the very same 
> error with deal.ii. 
> Hope it helps
> 
> Alberto
> 
> 
> Il giorno martedì 10 ottobre 2017 14:53:37 UTC+2, Daniel Arndt ha scritto:
>> 
>> Alberto and Deepak,
>> 
>> what exactly are the problems you are facing?
>> What kind of errors do you get?
>> 
>> Best,
>> Daniel
> 
> 
> Informativa sulla Privacy: http://www.unibs.it/node/8155
> -- 
> 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.
> For more options, visit https://groups.google.com/d/optout.

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [deal.II] opencascade shape id

2016-08-05 Thread Luca Heltai
Hi Chang,

If you use salome to open your iges files, then it should tell you what is 
what. 

Best,

Luca

> On 05 ago 2016, at 09:19, Chang-Pao Chang  wrote:
> 
> Hello,
> 
> I am trying to follow step-54 to register shapes in occ and cells in tria 
> through projector.
> 
> However, in complex structure, the order and the type of shapes might be hard 
> to identify.
> 
> For example, in step-54, they use wire[0] and bow_surface, since there are 
> only 1 wire and 1 face involved.
> 
> If I create a complex structure, I wouldn't know which part of structure do 
> wire[i] or compounds refer to.
> 
> Is there any good method to visualize these information in my iges file?
> 
> 
> -- 
> 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.
> For more options, visit https://groups.google.com/d/optout.

-- 
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.
For more options, visit https://groups.google.com/d/optout.