Re: [deal.II] SLEPcWrappers::SolverKrylovSchur Zero pivot problem

2022-10-31 Thread Sebastian D.-R.
I wonder if there was any follow up replies about this. 

I started to work a few days ago on an eigensolver for linear elasticity 
with the use of the SLEPc wrappers in deal.II  (based on step-8 and 
step-36), and I came across the same issue Leonhard described above. After 
some debugging I realised the issue was in the fact that I was not 
assembling the mass matrix correctly. Essentially, if following step-8, 
then you need to only add terms to the local mass matrix whenever comp(i) 
== comp(j) (following the notation in step-8 documentation), as it is done 
for the \nabla\phi_i\dot\nabla\phi_j term. 

Another way to go around this issue is to use "FEValuesExtractors::Vector" 
for the displacement (the only unknown in the system). With this way the 
assemble looks a lot more closer to how one would write a primal 
formulation for linear elasticity. So far, both ways give the same 
eigenvalues, which also make sense (in 2 and 3D, and on different domains).

On Monday, February 28, 2022 at 11:16:50 a.m. UTC-6 Wolfgang Bangerth wrote:

>
> Leonhard,
>
> > I find that if FE_Q is replaced by FESystem in step-36 it reports that 
> > error.
> > I printed all diagonal element of two matrices and they are all 
> > non-zero, so the matrices are invertable.
>
> That is not the right criterion. The following matrix also has all 
> nonzero diagonal entries and it still isn't invertible:
> [1 1]
> [1 1]
>
> > My problem is a 3-dim beam eigenvalue calculation and I use FESystem 
> > just like step-18.
> > And if I use FE_Q rather than FESystem, the function 
> > shape_grad_component will report error.
> > I use that function to calculate stiffness_matrix, called by 
> > get_strain() like step-18.
> > And the theoretical formulae are as follows:
> > 
> > \begin{array}{l}
> > K = \int {{D^{\rm{T}}}ED{\rm{d}}{V_e}} \\
> > \varepsilon  = Du\\
> > \sigma  = \varepsilon E
> > \end{array}%
> > 
> > I guess that here exits conflict between FESystem and SolverKrylovSchur 
> > or just because it is a vector-value problem?
> > Is it a vector-value the 3-dim eigenvalue calculation?
>
> There are many things that can go wrong, of course. You need to start 
> with a simple problem and make incremental changes to find out where the 
> problem is. I would start with using a bilinear form for the stiffness 
> matrix that matches what step-36 does, so
> (grad u, grad v)
> where now u,v are vector valued. Make sure you have zero Dirichlet 
> boundary conditions for all components. That should work. If it does, 
> move on to more complicated bilinear forms; with each modification, make 
> sure that it continues to work, and if it doesn't, you know what 
> modification was the problem.
>
> 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/9e159e96-d2f9-4c5b-af21-88677e1c7da5n%40googlegroups.com.


[deal.II] error while running step_17

2022-10-31 Thread HIMAL MAGAR
I have received following error while running step_17. How do I solve the 
problem?
[image: Screenshot from 2022-11-01 09-45-30.png]

-- 
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/3dda8fbb-7476-4935-9a4c-f6cffc810581n%40googlegroups.com.


Re: [deal.II] MacOS Installation - Monterey - M1 - spack

2022-10-31 Thread 'Francesco Costanzo' via deal.II User Group
Thank you Bruno!

The package that requested the OpenGL was gmsh. I excluded it and this time ran

spack install dealii~gmsh

and various things got installed but I also got other errors, the first of 
which is

openblasrequired by trilinos
oce
hdf5
symengine


I’ll start investigating what can be done to resolve some of these issues, 
especially the trilinos one.

Thanks again, Francesco.


> On Oct 31, 2022, at 9:47 AM, Bruno Turcksin  wrote:
> 
> Francesco,
> 
> You can do 
> 
> spack spec dealii%clang
> 
> to see what spack will install. You can then check which package requires 
> OpenGL (it is not deal.II) and then remove support for this package if you 
> don't need it. For instance, let's say that it's trilinos that's pulling 
> OpenGL and you don't need it, you can do
> 
> spack install dealii%clang~trilinos
> 
> Best,
> 
> Bruno
> 
> 
> -- 
> 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/43fb4901-6aaa-4dea-a397-b96be16327d7n%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/C5D8C74A-B716-442F-B218-913B13D3290E%40me.com.


Re: [deal.II] How to extract the the matrix A in crs format

2022-10-31 Thread Wolfgang Bangerth

On 10/31/22 09:16, ztdep...@gmail.com wrote:

**

I want to extract the matrix A and rhs in crs format , and pass them to my own 
solver. Could you pleae give me some advices.


The SparseMatrix class has various print functions that output the matrix in a 
variety of ways. You can use those to obtain a representation of the matrix 
that you can then read back in elsewhere.


Note that there is no "crs format" in the sense that there would be an 
agreed-upon file format. CRS is a data structure, and it can be written into 
files in many different ways. So if you're expecting a specific file format, 
you have to state which one you mean and how it is defined.


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/9fb3e03b-f229-0b07-49ec-3fbe0292637e%40colostate.edu.


[deal.II] How to extract the the matrix A in crs format

2022-10-31 Thread ztdep...@gmail.com
I want to extract the matrix A and rhs in crs format , and pass them to my 
own solver. Could you pleae give me some advices. 

-- 
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/1a5ed3d5-71d9-45d5-9459-ba96b5946011n%40googlegroups.com.


Re: [deal.II] Applying a zero constraints to cell based on material_id

2022-10-31 Thread blais...@gmail.com
Elegant solution, I like it.
Thanks!


On Monday, October 31, 2022 at 9:19:51 a.m. UTC-4 d.arnd...@gmail.com wrote:

> Bruno,
>
> I don't think we have a function that would do that already. I would just 
> loop over all (locally relevant) cells, and add the respective (locally 
> relevant) dofs to the AffineConstraints object with add_line().
>
> Best,
> Daniel
>
> On Mon, Oct 31, 2022 at 8:36 AM blais...@gmail.com  
> wrote:
>
>> Dear all, I hope you are all doing fine :)!
>>
>> I am trying to do some quick testing of something and this would require 
>> me applying a zero constraint to a set of cells which have a specific 
>> material id. I could surely do that from the weak form, but I was wondering 
>> if there was a way to do it strongly by applying a constraint like we do 
>> with boundary conditions (e.g. using VectorTools). I looked around in the 
>> documentation but I could not find anyway (but maybe I did not look 
>> carefully enough).
>>
>> Thanks!
>> Bruno
>>
>> -- 
>> 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/0605a226-d35e-4286-ad2e-13a7b1c185e9n%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/d6095dd4-4979-429a-a420-983bb2cc1561n%40googlegroups.com.


[deal.II] Re: MacOS Installation - Monterey - M1 - spack

2022-10-31 Thread Bruno Turcksin
Francesco,

You can do 

spack spec dealii%clang

to see what spack will install. You can then check which package requires 
OpenGL (it is not deal.II) and then remove support for this package if you 
don't need it. For instance, let's say that it's trilinos that's pulling 
OpenGL and you don't need it, you can do

spack install dealii%clang~trilinos

Best,

Bruno

-- 
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/43fb4901-6aaa-4dea-a397-b96be16327d7n%40googlegroups.com.


[deal.II] MacOS Installation - Monterey - M1 - spack

2022-10-31 Thread 'Francesco Costanzo' via deal.II User Group
I have been trying to install deal.II via spack on an M1Max MacBook with macOS 
Monterey (12.6.1).

I run the command
spack install dealii%clang

Things were going well but the installation stopped with a request to install 
OpenGL, which I believe is deprecated under Monterey. It turns out that the 
OpenGL libraries are still available but they are packaged as .tbd files 
instead of .dylib.

Any suggestions on how to proceed?

Cheers, Francesco.
-- 
Francesco Costanzo, Associate Department Head
Engineering Science and Mechanics Department
Professor of Engineering Science and Mechanics,
   Mathematics, Mechanical Engineering,
   and Biomedical Engineering

Address:
   Center for Neural Engineering
   The Pennsylvania State University
   W-315 Millennium Science Complex
   University Park, PA 16802
   USA
Phone:   (814) 863-2030
Fax: (814) 865-9974
mailto:f...@psu.edu
http://www.esm.psu.edu/Faculty/Costanzo/


-- 
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/F64DA6EE-92E4-49BD-8501-A60330D59884%40me.com.


Re: [deal.II] Applying a zero constraints to cell based on material_id

2022-10-31 Thread Daniel Arndt
Bruno,

I don't think we have a function that would do that already. I would just
loop over all (locally relevant) cells, and add the respective (locally
relevant) dofs to the AffineConstraints object with add_line().

Best,
Daniel

On Mon, Oct 31, 2022 at 8:36 AM blais...@gmail.com 
wrote:

> Dear all, I hope you are all doing fine :)!
>
> I am trying to do some quick testing of something and this would require
> me applying a zero constraint to a set of cells which have a specific
> material id. I could surely do that from the weak form, but I was wondering
> if there was a way to do it strongly by applying a constraint like we do
> with boundary conditions (e.g. using VectorTools). I looked around in the
> documentation but I could not find anyway (but maybe I did not look
> carefully enough).
>
> Thanks!
> Bruno
>
> --
> 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/0605a226-d35e-4286-ad2e-13a7b1c185e9n%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/CAOYDWb%2Be%2B2YfWJVDnc_%2BUpFrG3h3ZKDoSOSsf2saFLqOKhs_8A%40mail.gmail.com.


[deal.II] Applying a zero constraints to cell based on material_id

2022-10-31 Thread blais...@gmail.com
Dear all, I hope you are all doing fine :)!

I am trying to do some quick testing of something and this would require me 
applying a zero constraint to a set of cells which have a specific material 
id. I could surely do that from the weak form, but I was wondering if there 
was a way to do it strongly by applying a constraint like we do with 
boundary conditions (e.g. using VectorTools). I looked around in the 
documentation but I could not find anyway (but maybe I did not look 
carefully enough).

Thanks!
Bruno

-- 
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/0605a226-d35e-4286-ad2e-13a7b1c185e9n%40googlegroups.com.