Re: [deal.II] Finite Strain Compressibility problem with PETSc Data Structures

2021-01-24 Thread Animesh Rastogi IIT Gandhinagar
Dear Prof. Bangerth,

Thank you for your reply. I was able to setup the slepc eigenvalue solver. 
The issue is that it is taking a lot of time to calculate the smallest 
eigenvalue for just 1 degrees of freedom. Largest eigenvalue is 
calculated pretty fast. I tried many solvers in slepc - Krylov Schur, JD, 
Arnoldi iteration, Lanczos etc. However, I am facing the same issue. Also, 
the KrylovSchur solver is giving me following error after taking a lot of 
time - *The number of converged eigenvectors is 0 but 1 were requested. *Could 
you please help me with this. I also tried to do shift-invert operation 
(wondering if that would help) and got the following error - 

[0]PETSC ERROR: - Error Message 
--
[0]PETSC ERROR: Shift-and-invert requires a target 'which' (see 
EPSSetWhichEigenpairs), for instance -st_type sinvert -eps_target 0 
-eps_target_magnitude
[0]PETSC ERROR: See https://www.mcs.anl.gov/petsc/documentation/faq.html 
for trouble shooting.
[0]PETSC ERROR: Petsc Release Version 3.13.1, May 02, 2020 
[0]PETSC ERROR: ./cook_membrane on a arch-linux-c-debug named 
animesh-Inspiron-7572 by animesh Sun Jan 24 18:14:28 2021
[0]PETSC ERROR: Configure options --download-mumps --download-scalapack 
--download-ptscotch=0 --with-shared-libraries
[0]PETSC ERROR: #1 EPSCheckCompatibleST() line 112 in 
/home/animesh/Documents/slepc-3.13.4/src/eps/interface/epssetup.c
[0]PETSC ERROR: #2 EPSSetUp() line 303 in 
/home/animesh/Documents/slepc-3.13.4/src/eps/interface/epssetup.c
[0]PETSC ERROR: #3 EPSSolve() line 136 in 
/home/animesh/Documents/slepc-3.13.4/src/eps/interface/epssolve.c




Code snippet - 

  std::cout<<"Calculating the smallest eigenvalue at  
"< On 1/18/21 1:29 PM, Animesh Rastogi IIT Gandhinagar wrote:
> > 
> > How should I initialize the "index set" that is required for this 
> function? In 
> > step-17 
> > <
> https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.dealii.org%2Fcurrent%2Fdoxygen%2Fdeal.II%2Fstep_17.html&data=04%7C01%7CWolfgang.Bangerth%40colostate.edu%7C2c8127fe83f34bdd8e4308d8bbefc22d%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637465985723412724%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=wri%2BF49jx4BqWdoLNTpAT3ZrLf%2FNj69MqkKbc%2FtkUsg%3D&reserved=0>,
>  
>
> > it uses the locally_owned_dofs to initialize the index set, however, 
> that 
> > program was for multiple machines which is not the case with me.
>
> If you have only one processor, then the locally_owned_dofs are simply all 
> DoFs. You can use the same function you use to get the locally_owned_dofs 
> set 
> on every processor in the parallel context, but an easier way is to call
> complete_index_set(dof_handler.n_dofs())
>
> 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/d6b1aa0c-e432-4ee8-902e-8f5cd1c00df8n%40googlegroups.com.


Re: [deal.II] Finite Strain Compressibility problem with PETSc Data Structures

2021-01-18 Thread Animesh Rastogi IIT Gandhinagar
Dear Prof. Bangerth,

Thank you for your reply. I have changed the required data structures using 
PETSc wrappers. I have another doubt regarding this. Since I am running on 
a single machine, how should I use the reinit() function for PETSc Sparse 
Matrix. I was thinking to use the (3/5th) reinit() function. 


How should I initialize the "index set" that is required for this function? 
In step-17 , 
it uses the locally_owned_dofs to initialize the index set, however, that 
program was for multiple machines which is not the case with me.

Below is my system_setup() function currently - 

template 
  void Solid::system_setup()
  {
timer.enter_subsection("Setup system");

//std::vector block_component(n_components, u_dof); // 
Displacement

// The DOF handler is then initialised and we renumber the grid in an
// efficient manner. We also record the number of DOFs per block.

dof_handler_ref.distribute_dofs(fe);
DoFRenumbering::Cuthill_McKee(dof_handler_ref);

//DoFRenumbering::component_wise(dof_handler_ref, block_component);
//DoFTools::count_dofs_per_block(dof_handler_ref, dofs_per_block,
 //  block_component);

std::cout << "Triangulation:"
  << "\n\t Number of active cells: " << 
triangulation.n_active_cells()
  << "\n\t Number of degrees of freedom: " << 
dof_handler_ref.n_dofs()
  << std::endl;

// Setup the sparsity pattern and tangent matrix
tangent_matrix.clear();
{
  //const types::global_dof_index n_dofs_u = dofs_per_block[u_dof];

  DynamicSparsityPattern csp(dof_handler_ref.n_dofs());

  //csp.block(u_dof, u_dof).reinit(n_dofs_u, n_dofs_u);
  //csp.collect_sizes();

  Table<2, DoFTools::Coupling> coupling(n_components, n_components);
  for (unsigned int ii = 0; ii < n_components; ++ii)
for (unsigned int jj = 0; jj < n_components; ++jj)
  coupling[ii][jj] = DoFTools::always;
  DoFTools::make_sparsity_pattern(dof_handler_ref,
  coupling,
  csp,
  constraints,
  false);
  sparsity_pattern.copy_from(csp);
}

 
*   tangent_matrix.reinit(, , 
sparsity_pattern,mpi_communicator);*


system_rhs.reinit(mpi_communicator,dof_handler_ref.n_dofs(),dof_handler_ref.n_dofs());
//system_rhs.collect_sizes();


solution_n.reinit(mpi_communicator,dof_handler_ref.n_dofs(),dof_handler_ref.n_dofs());
//solution_n.collect_sizes();

setup_qph();

timer.leave_subsection();
  }

Thanks! 

Animesh


On Sunday, January 17, 2021 at 12:03:22 PM UTC-6 Wolfgang Bangerth wrote:

>
> > I would like to use SparseDirectMumps to solve the linear system 
> > <
> https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdealii%2Fcode-gallery%2Fblob%2Fmaster%2FQuasi_static_Finite_strain_Compressible_Elasticity%2Fcook_membrane.cc%23L2171&data=04%7C01%7CWolfgang.Bangerth%40colostate.edu%7C632a418808d74ae65e4e08d8ba51cd69%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637464207804492937%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=3quCIk6VKgjyi7Zuln4b7yBND9kqpixCRnmmH830xMA%3D&reserved=0>.
>  
>
> > The documentation tells that I would need an mpi_communicator object to 
> use 
> > this solver. Since my code is running on a single machine in serial 
> (only the 
> > assembly is hyper-threaded), how do I need to initialize 
> mpi_communicator?
>
> Just use MPI_COMM_SELF in all places where you need to pass a communicator.
>
> 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/f54e6e80-a5cc-4315-9e89-dd82ad97a2een%40googlegroups.com.


Re: [deal.II] Finite Strain Compressibility problem with PETSc Data Structures

2021-01-16 Thread Animesh Rastogi IIT Gandhinagar
Dear Prof. Bangerth,

Thank you for your explanation. I have converted matrices and vectors into 
non-blocked objects and have changed them into PETScWrappers::MPI data 
types.

I would like to use SparseDirectMumps to solve the linear system 
.
 
The documentation tells that I would need an mpi_communicator object to use 
this solver. Since my code is running on a single machine in serial (only 
the assembly is hyper-threaded), how do I need to initialize 
mpi_communicator? Do I need to pass this mpi_communicator object when I 
setup the sparsity pattern, tangent matrix etc in the system_setup() 
function. I could not understand what other changes do I need to bring in 
my code so that I can use SparseDirectMumps solver. Ultimately, my plan is 
to use the SLEPc eigenvalue solver after the solution convergences at every 
load/displacement step.

Thanks a lot!

Animesh

On Friday, January 15, 2021 at 10:53:17 PM UTC-6 Wolfgang Bangerth wrote:

>
> > Thank you for your reply. I tried as you suggested. However, I am 
> getting the 
> > following error -
> > 
> > 
> /home/animesh/Documents/dealii/dealii-9.2.0/examples/Quasi_Static_Finite_Strain_Beam_Buckling_Analysis/Quasi_Static_Finite_Strain_Beam_Buckling_Analysis.cc:873:20:
>  
>
> > error: ‘BlockSparseMatrix’ in namespace ‘dealii::PETScWrappers’ does not 
> name 
> > a type
> >  PETScWrappers::BlockSparseMatrix tangent_matrix;
>
> I now remember that we removed the non-MPI class at some point.
>
>
> > So I used as suggested in the documentation and am getting the following 
> error 
> > related to that.
> > 
> > 
> /home/animesh/Documents/dealii/dealii-9.2.0/examples/Quasi_Static_Finite_Strain_Beam_Buckling_Analysis/Quasi_Static_Finite_Strain_Beam_Buckling_Analysis.cc:1288:37:
>  
>
> > error: no matching function for call to 
> > ‘dealii::PETScWrappers::MPI::BlockVector::reinit(std::vector int>&)’
> >  system_rhs.reinit(dofs_per_block);
>
> Look up the documentation of that class and what arguments the reinit() 
> and 
> constructor functions take:
>
> https://www.dealii.org/current/doxygen/deal.II/classPETScWrappers_1_1MPI_1_1BlockVector.html
>
>
> > Also, I wish to use a Direct solver by PETSc and could not find any 
> related to 
> > the PETSc block vector. In my current code, I am using 
> SparseDirectUMFPACK. Do 
> > I need to convert my entire code to be using non-blocked vectors and 
> matrices 
> > to use the Direct Solver by PETSc? (Although the system is "blocked", it 
> only 
> > has one block that contains the displacement degree of freedom).
>
> Correct. PETSc does not know the concept of "block" vectors and matrices. 
> So 
> if you want to use a direct solver via PETSc, then you have to put 
> everything 
> into non-blocked objects.
>
> The point of blocks is to facilitate block-based solvers such as Schur 
> complements etc. If you don't intend to build solvers this way, there is 
> no 
> benefit to using block matrices and vectors. Just because you have 
> multiple 
> solution components doesn't mean that you *have* to split your linear 
> algebra 
> objects into blocks.
>
> 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/49df65b6-2bfd-4e92-89d0-b72f2231f233n%40googlegroups.com.


Re: [deal.II] Finite Strain Compressibility problem with PETSc Data Structures

2021-01-15 Thread Animesh Rastogi IIT Gandhinagar
Dear Prof. Bangerth,

Thank you for your reply. I tried as you suggested. However, I am getting 
the following error - 

/home/animesh/Documents/dealii/dealii-9.2.0/examples/Quasi_Static_Finite_Strain_Beam_Buckling_Analysis/Quasi_Static_Finite_Strain_Beam_Buckling_Analysis.cc:873:20:
 
error: ‘BlockSparseMatrix’ in namespace ‘dealii::PETScWrappers’ does not 
name a type
 PETScWrappers::BlockSparseMatrix tangent_matrix;


For vectors, the documentation 
<https://www.dealii.org/8.4.1/doxygen/deal.II/classPETScWrappers_1_1BlockVector.html>
 
says that "This class is deprecated, use PETScWrappers::MPI::BlockVector 
<https://www.dealii.org/8.4.1/doxygen/deal.II/classPETScWrappers_1_1MPI_1_1BlockVector.html>".
 
So I used as suggested in the documentation and am getting the following 
error related to that.

/home/animesh/Documents/dealii/dealii-9.2.0/examples/Quasi_Static_Finite_Strain_Beam_Buckling_Analysis/Quasi_Static_Finite_Strain_Beam_Buckling_Analysis.cc:1288:37:
 
error: no matching function for call to 
‘dealii::PETScWrappers::MPI::BlockVector::reinit(std::vector&)’
 system_rhs.reinit(dofs_per_block);

Also, I wish to use a Direct solver by PETSc and could not find any related 
to the PETSc block vector. In my current code, I am using SparseDirectUMFPACK. 
Do I need to convert my entire code to be using non-blocked vectors and 
matrices to use the Direct Solver by PETSc? (Although the system is 
"blocked", it only has one block that contains the displacement degree of 
freedom).

Thanks!

Animesh
On Friday, January 15, 2021 at 2:51:30 PM UTC-6 Wolfgang Bangerth wrote:

> On 1/15/21 10:46 AM, Animesh Rastogi IIT Gandhinagar wrote:
> > 
> > I am using a modified version of Code Gallery Quasi Static 
> Compressibility 
> > <
> https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdealii.org%2Fdeveloper%2Fdoxygen%2Fdeal.II%2Fcode_gallery_Quasi_static_Finite_strain_Compressible_Elasticity.html&data=04%7C01%7CWolfgang.Bangerth%40colostate.edu%7C3f03e1b7a92342c0331e08d8b97d7f35%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C63746329594804%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=wukJxVr%2BMJ0%2BGymh3b5cYRkeUH%2BFCzH2qsBBiujG2h8%3D&reserved=0>
>  
>
> > program to compute eigenvalues and eigenvectors of my system matrix. I 
> have 
> > used ARPACK solver, however, I did not get the expected results. Bruno 
> > suggested me to go for PETSc/Slepsc solver to compute the eigenvalues. 
> For 
> > this, I would need to convert the dealii data structures to the PETSc 
> data 
> > structures using PETSc wrappers.
>
> All objects that relate to the linear system you are solving (or to the 
> eigenvalue problem you are solving). So, matrices and vectors.
>
>
> > I looked at the Step-17 and Step-36 for this. However, I am unable to 
> > understand how I can change my current dealii data structures to the one 
> using 
> > PETSc wrappers. I am also confused regarding what all variables do I 
> need to 
> > convert using PETScWrappers. Also, for the system matrix, do I need to 
> use 
> > PETScWrappers::MPI::BlockSparseMatrix or 
> PETScWrappers::BlockSparseMatrix.
>
> That depends on whether you want to run your problem on multiple machines 
> using MPI. If you've been using ARPACK, then I suspect that you're not 
> using 
> MPI. So then PETScWrappers::BlockSparseMatrix.
>
>
> > This finite strain code already assembles the system matrix in parallel 
> using 
> > multi-threading. What changes do I need to do in the assembly if I go on 
> to 
> > use PETSc data structures.
>
> None, really. The functions filling matrices should work on PETSc data 
> structures just fine.
>
> 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/9ddc7abf-1252-48c9-bab1-94d71f50416en%40googlegroups.com.


[deal.II] Finite Strain Compressibility problem with PETSc Data Structures

2021-01-15 Thread Animesh Rastogi IIT Gandhinagar
Dear Dealii community,

I am using a modified version of Code Gallery Quasi Static Compressibility 

 
program to compute eigenvalues and eigenvectors of my system matrix. I have 
used ARPACK solver, however, I did not get the expected results. Bruno 
suggested me to go for PETSc/Slepsc solver to compute the eigenvalues. For 
this, I would need to convert the dealii data structures to the PETSc data 
structures using PETSc wrappers.

I looked at the Step-17 and Step-36 for this. However, I am unable to 
understand how I can change my current dealii data structures to the one 
using PETSc wrappers. I am also confused regarding what all variables do I 
need to convert using PETScWrappers. Also, for the system matrix, do I need 
to use PETScWrappers::MPI::BlockSparseMatrix or 
PETScWrappers::BlockSparseMatrix.

This finite strain code already assembles the system matrix in parallel 
using multi-threading. What changes do I need to do in the assembly if I go 
on to use PETSc data structures.

It would be great if someone could provide help with the above queries.

Thanks a lot!

Animesh

-- 
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/f1291d98-663f-4a7b-89b3-c09bb4386558n%40googlegroups.com.


Re: [deal.II] Re: Some changes in arpack.h (Functionality to compute only eigenvalues)

2021-01-11 Thread Animesh Rastogi IIT Gandhinagar
Hi Bruno,

Probably my above message got lost somewhere in the conversations of this 
group. Thought to remind you regarding my query in this thread. Let me know 
if you need more information regarding my queries.

Thanks a lot!

Animesh

On Tuesday, December 29, 2020 at 6:44:35 PM UTC+5:30 Animesh Rastogi IIT 
Gandhinagar wrote:

> Hi Bruno,
>
>
> It's not in deal.II. Anasazi is part of Trilinos. If you are using 
>
>> Trilinos vector, it's pretty straightforward. You just copy the code 
>> from 
>> https://github.com/ORNL-CEES/mfmg/blob/master/include/mfmg/dealii/anasazi.templates.hpp
>>  
>> The solver is used here: 
>>
>> https://github.com/ORNL-CEES/mfmg/blob/4026049f0d5e3904562e394954f76cd86aac2ef3/include/mfmg/dealii/amge_host.templates.hpp#L209-L275
>
>
> Response - I am not using Trilinos vectors. I am using normal BlockVectors 
> and BlockSparseMatrix from dealii Linear Algebra class. Is it possible for 
> me to convert my BlockVectors and BlockSparseMatrix to the one from 
> Trilinos::BlockSparseMatrix and  Trilinos::BlockVectors? 
>
>>
>> If you want to use a different kind of vectors, drop these files in 
>> your code 
>> https://github.com/ORNL-CEES/mfmg/blob/master/include/mfmg/dealii/multivector.hpp,
>>  
>>
>>
>> https://github.com/ORNL-CEES/mfmg/blob/master/include/mfmg/dealii/anasazi_traits.hpp,
>>  
>>
>> and 
>> https://github.com/ORNL-CEES/mfmg/blob/master/include/mfmg/dealii/belos_traits.hpp.
>>  
>>
>>
>
> Response - I could not understand when you suggest to drop these files in 
> my code. Do I need to download these files in my project folder and then 
> include these files as header files?  
>
> You will need to remove the ASSERT, if you don't want to pull more 
>> files.
>
>  
> Response - Could you please let me know which "ASSERT" do you suggest to 
> remove? Also, what exactly is meant by "don't want to pull more". I did not 
> understand this part as well. Apologies for too many questions!
>
> Thanks a lot!
>
> Animesh
>

-- 
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/a3be0029-16c6-436d-bc66-44648a716c8bn%40googlegroups.com.


Re: [deal.II] Re: Some changes in arpack.h (Functionality to compute only eigenvalues)

2020-12-29 Thread Animesh Rastogi IIT Gandhinagar
Hi Bruno,


It's not in deal.II. Anasazi is part of Trilinos. If you are using 

> Trilinos vector, it's pretty straightforward. You just copy the code 
> from 
> https://github.com/ORNL-CEES/mfmg/blob/master/include/mfmg/dealii/anasazi.templates.hpp
>  
> The solver is used here: 
>
> https://github.com/ORNL-CEES/mfmg/blob/4026049f0d5e3904562e394954f76cd86aac2ef3/include/mfmg/dealii/amge_host.templates.hpp#L209-L275


Response - I am not using Trilinos vectors. I am using normal BlockVectors 
and BlockSparseMatrix from dealii Linear Algebra class. Is it possible for 
me to convert my BlockVectors and BlockSparseMatrix to the one from 
Trilinos::BlockSparseMatrix and  Trilinos::BlockVectors? 

>
> If you want to use a different kind of vectors, drop these files in 
> your code 
> https://github.com/ORNL-CEES/mfmg/blob/master/include/mfmg/dealii/multivector.hpp,
>  
>
>
> https://github.com/ORNL-CEES/mfmg/blob/master/include/mfmg/dealii/anasazi_traits.hpp,
>  
>
> and 
> https://github.com/ORNL-CEES/mfmg/blob/master/include/mfmg/dealii/belos_traits.hpp.
>  
>
>

Response - I could not understand when you suggest to drop these files in 
my code. Do I need to download these files in my project folder and then 
include these files as header files?  

You will need to remove the ASSERT, if you don't want to pull more 
> files.

 
Response - Could you please let me know which "ASSERT" do you suggest to 
remove? Also, what exactly is meant by "don't want to pull more". I did not 
understand this part as well. Apologies for too many questions!

Thanks a lot!

Animesh

-- 
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/09c8195c-0abb-46ee-bd5d-b69e2eef64dfn%40googlegroups.com.


[deal.II] Re: Problem about modifying CMakeList.txt to add library

2020-12-24 Thread Animesh Rastogi IIT Gandhinagar
Hi Daniel,

I was able to sort this issue out. What I did was removed everything 
related to armadillo in the cmakelists.txt and just linked armadillo to my 
target using  the following line in the end of the file 
TARGET_LINK_LIBRARIES(${TARGET} armadillo)
I am able to run small programs using armadillo within dealii.

I have another question which might not be in the scope of this forum. 
However, since you and Jean have worked with armadillo (by looking at the 
Ceres code gallery program), I was wondering if any of you can help. 

My question is, I want to use the eigenvalue problem solving capability of 
armadillo in my code. However, my matrix type is of BlockSparseMatrix in 
dealii. How do I go about using my BlockSparseMatrix with the available 
armadillo functions that use sp_mat type matrices 
<http://arma.sourceforge.net/docs.html#SpMat>? One idea that I thought was 
to print my block_sparse_matrix using the function block_write() 
<https://www.dealii.org/current/doxygen/deal.II/classSparseMatrix.html#a8b32b99a054482f06fc026248c27bb74>
 
that prints the dealii Sparse_matrix in a binary format. However, I am not 
able to read that file using armadillo's functionality to load binary files 
<http://arma.sourceforge.net/docs.html#save_load_mat>.

Thanks!

Animesh

On Wednesday, December 23, 2020 at 2:22:38 PM UTC+5:30 Animesh Rastogi IIT 
Gandhinagar wrote:

> Hi Daniel, 
>
> I also want to use armadillo for one of my projects. I did exactly as you 
> suggested in the link above. The cmake worked perfectly. However, on doing 
> make run, I am getting the following error. I installed armadillo using the 
> apt-get package manager - command was - *sudo apt-get install 
> libarmadillo-dev*
>
> Error:
>
> /usr/bin/ld.gold: error: /usr/include/armadillo:1:4: syntax error, 
> unexpected STRING
> /usr/bin/ld.gold: error: /usr/include/armadillo: not an object or archive
> collect2: error: ld returned 1 exit status
> CMakeFiles/Quasi_Static_Finite_Strain_Beam_Buckling_Analysis.dir/build.make:122:
>  
> recipe for target 'Quasi_Static_Finite_Strain_Beam_Buckling_Analysis' failed
> make[3]: *** [Quasi_Static_Finite_Strain_Beam_Buckling_Analysis] Error 1
> CMakeFiles/Makefile2:163: recipe for target 
> 'CMakeFiles/Quasi_Static_Finite_Strain_Beam_Buckling_Analysis.dir/all' 
> failed
> make[2]: *** 
> [CMakeFiles/Quasi_Static_Finite_Strain_Beam_Buckling_Analysis.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
>
> I was wondering if you can help me with this issue!
>
> Thanks a lot!
>
> Animesh
>
> On Thursday, May 17, 2018 at 3:17:11 AM UTC+5:30 Daniel Arndt wrote:
>
>> Pal,
>>
>> We also just updated the CMakeLists.txt file for an example in our 
>> code-gallery that uses armadillo.
>> You might want to look at 
>> https://github.com/dealii/code-gallery/blob/master/CeresFE/CMakeLists.txt
>> .
>>
>> Best,
>> Daniel
>>
>

-- 
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/87d9b5dd-a635-4f6a-9c24-a39b6f0f0a2en%40googlegroups.com.


[deal.II] Re: Problem about modifying CMakeList.txt to add library

2020-12-23 Thread Animesh Rastogi IIT Gandhinagar
Hi Daniel, 

I also want to use armadillo for one of my projects. I did exactly as you 
suggested in the link above. The cmake worked perfectly. However, on doing 
make run, I am getting the following error. I installed armadillo using the 
apt-get package manager - command was - *sudo apt-get install 
libarmadillo-dev*

Error:

/usr/bin/ld.gold: error: /usr/include/armadillo:1:4: syntax error, 
unexpected STRING
/usr/bin/ld.gold: error: /usr/include/armadillo: not an object or archive
collect2: error: ld returned 1 exit status
CMakeFiles/Quasi_Static_Finite_Strain_Beam_Buckling_Analysis.dir/build.make:122:
 
recipe for target 'Quasi_Static_Finite_Strain_Beam_Buckling_Analysis' failed
make[3]: *** [Quasi_Static_Finite_Strain_Beam_Buckling_Analysis] Error 1
CMakeFiles/Makefile2:163: recipe for target 
'CMakeFiles/Quasi_Static_Finite_Strain_Beam_Buckling_Analysis.dir/all' 
failed
make[2]: *** 
[CMakeFiles/Quasi_Static_Finite_Strain_Beam_Buckling_Analysis.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

I was wondering if you can help me with this issue!

Thanks a lot!

Animesh

On Thursday, May 17, 2018 at 3:17:11 AM UTC+5:30 Daniel Arndt wrote:

> Pal,
>
> We also just updated the CMakeLists.txt file for an example in our 
> code-gallery that uses armadillo.
> You might want to look at 
> https://github.com/dealii/code-gallery/blob/master/CeresFE/CMakeLists.txt.
>
> Best,
> Daniel
>

-- 
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/a1545c39-e2e5-41e4-b92f-d5462ff9b1bdn%40googlegroups.com.


Re: [deal.II] Using external libraries with deal.II

2020-12-23 Thread Animesh Rastogi IIT Gandhinagar
Dear Prof. Maier and Prof. Bangerth,

Thank you for your help. I was able to fix the issue with your suggestions.

Animesh

On Tuesday, December 22, 2020 at 1:41:08 AM UTC+5:30 Matthias Maier wrote:

> Hi,
>
> No, the problem is much simpler. You have to reorganize your
> CMakeLists.txt so that you search for your libraries and add them to
> your link interface after the PROJECT() call and after the
> DEAL_II_INVOKE_AUTOPILOT CALL(). It is simplest to put everything last:
>
>
> # The default CMakeLists.txt file does the following:
>
> FIND_PACKAGE(deal.II 9.1 QUIET [...]) # finds deal.II configuration
>
> DEAL_II_INITIALIZE_CACHED_VARIABLES() # sets compiler and other cached 
> variables
> PROJECT(${TARGET}) # initializes compiler toolchain
>
> DEAL_II_INVOKE_AUTOPILOT() # defines executable target with the name 
> stored in
> # variable "${TARGET}"
>
>
> # NOW, you can search for your external libraries:
>
> FIND_PACKAGE(Eigen3 REQUIRED)
> FIND_PACKAGE(Spectra REQUIRED)
>
> # and NOW you can add them to the target. (Simply use the variable
> # ${TARGET} where you already stored the name of the project):
>
> TARGET_LINK_LIBRARIES(${TARGET} Spectra::Spectra)
>
>
>
> Best,
> Matthias
>

-- 
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/f5d2baf9-f8b6-42bf-848d-f1b7a4a1ab71n%40googlegroups.com.


Re: [deal.II] Using external libraries with deal.II

2020-12-21 Thread Animesh Rastogi IIT Gandhinagar
What I understood after struggling through the issue is that my 
cmakelists.txt is in autopilot style. In the autopilot style, it doesn't 
build the executable right away after doing "cmake .". It builds the 
executable after I run "make" command (as per my observation). I think this 
is why it is saying that *"Cannot specify link libraries for target  
"Quasi_Static_Finite_Strain_Beam_Buckling_Analysis" which is not built by 
this project."* If I am correct here, what would be a way to fix the issue?

Thanks!

Animesh

On Monday, December 21, 2020 at 7:34:50 PM UTC+5:30 Animesh Rastogi IIT 
Gandhinagar wrote:

> Dear Daniel and Prof. Bangerth,
>
> I did exactly as you suggested. My package export cmake configurations. I 
> am getting the following error and cant figure out the reason. It is not 
> able to link the executable with the package.
>
> CMake Error at CMakeLists.txt:42 (TARGET_LINK_LIBRARIES):
>   Cannot specify link libraries for target
>   "Quasi_Static_Finite_Strain_Beam_Buckling_Analysis" which is not built by
>   this project.
>
>
> -- Configuring incomplete, errors occurred!
> See also 
> "/home/animesh/Documents/dealii/dealii-9.2.0/examples/Quasi_Static_Finite_Strain_Beam_Buckling_Analysis/CMakeFiles/CMakeOutput.log".
>
> I am attaching the cmakelists.txt for your reference.
>
> Thanks!
> Animesh
>
> On Friday, December 18, 2020 at 1:33:47 AM UTC+5:30 Wolfgang Bangerth 
> wrote:
>
>> On 12/17/20 12:54 PM, Daniel Arndt wrote: 
>> > 
>> > in the CMakeLists.txt for your project. 
>>
>> In other words, you don't need to do anything about deal.II itself at all 
>> unless you plan on modifying deal.II to use these external libraries. 
>>
>> 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/54917224-10c5-4c38-9b53-54649e0ff6b5n%40googlegroups.com.


Re: [deal.II] Using external libraries with deal.II

2020-12-21 Thread Animesh Rastogi IIT Gandhinagar
Dear Daniel and Prof. Bangerth,

I did exactly as you suggested. My package export cmake configurations. I 
am getting the following error and cant figure out the reason. It is not 
able to link the executable with the package.

CMake Error at CMakeLists.txt:42 (TARGET_LINK_LIBRARIES):
  Cannot specify link libraries for target
  "Quasi_Static_Finite_Strain_Beam_Buckling_Analysis" which is not built by
  this project.


-- Configuring incomplete, errors occurred!
See also 
"/home/animesh/Documents/dealii/dealii-9.2.0/examples/Quasi_Static_Finite_Strain_Beam_Buckling_Analysis/CMakeFiles/CMakeOutput.log".

I am attaching the cmakelists.txt for your reference.

Thanks!
Animesh

On Friday, December 18, 2020 at 1:33:47 AM UTC+5:30 Wolfgang Bangerth wrote:

> On 12/17/20 12:54 PM, Daniel Arndt wrote:
> > 
> > in the CMakeLists.txt for your project.
>
> In other words, you don't need to do anything about deal.II itself at all 
> unless you plan on modifying deal.II to use these external libraries.
>
> 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/7b9b3f53-0c02-4de7-8322-e998a957b253n%40googlegroups.com.
##
#  CMake script for the step- tutorial program:
##

# Set the name of the project and target:
SET(TARGET "Quasi_Static_Finite_Strain_Beam_Buckling_Analysis")

# Declare all source files the target consists of:
SET(TARGET_SRC
  ${TARGET}.cc
  # You can specify additional files here!
  )

SET(CLEAN_UP_FILES
  # a custom list of globs, e.g. *.log *.vtk
  *.vtk
)


# Usually, you will not need to modify anything beyond this point...

CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)


FIND_PACKAGE(deal.II 9.1 QUIET
  HINTS ${deal.II_DIR} ${DEAL_II_DIR} ../ ../../ $ENV{DEAL_II_DIR}
  )
IF(NOT ${deal.II_FOUND})
  MESSAGE(FATAL_ERROR "\n"
"*** Could not locate deal.II. ***\n\n"
"You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to 
cmake\n"
"or set an environment variable \"DEAL_II_DIR\" that contains this path."
)
ENDIF()
FIND_PACKAGE(Eigen3 REQUIRED)
FIND_PACKAGE(Spectra REQUIRED)
TARGET_LINK_LIBRARIES(Quasi_Static_Finite_Strain_Beam_Buckling_Analysis 
Spectra::Spectra)

DEAL_II_INITIALIZE_CACHED_VARIABLES()
PROJECT(${TARGET})

DEAL_II_INVOKE_AUTOPILOT()


[deal.II] Using external libraries with deal.II

2020-12-17 Thread Animesh Rastogi IIT Gandhinagar
Dear deal.II community

I would like to use some external libraries such as Eigen and Spectra in 
dealii for one of my projects. These are both header-only C++ libraries. 
Could someone please tell me about how to integrate these libraries 
(installed in my system) with dealii? What changes do I need to make in the 
deal.II cmake build system before recompiling and reinstalling it..

Thanks!

Animesh

-- 
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/4c387a54-4f16-48cc-80c9-9bc1479ee038n%40googlegroups.com.


Re: [deal.II] Re: Some changes in arpack.h (Functionality to compute only eigenvalues)

2020-12-16 Thread Animesh Rastogi IIT Gandhinagar
Thank you Bruno for your suggestion. I tried in regular mode and it doesn't 
seem to improve the accuracy. The results are approximately the same as I 
was getting using the shift-invert method. 

One thing that I didn't understand is that I used the scipy function "eigs" 
in python 
<https://github.com/scipy/scipy/tree/master/scipy/sparse/linalg/eigen/arpack> 
which essentially uses ARPACK, and it still it doesn't match with that. 
Does it have to do something with the way the ARPACK code is written in 
dealii?

Can you let me know how to use Anasazi, I don't see anything related to 
this in the documentation of deaii? I am planning to now try this 
eigensolver for my problem and would want to see how much it improves the 
results.

Thanks!

Animesh



On Wednesday, December 16, 2020 at 3:26:57 AM UTC+5:30 bruno.t...@gmail.com 
wrote:

> Animesh,
>
> You need to download the patch to the deal.II directory. If you cloned
> deal.II, you can simply use git apply
> 0001-Enable-ARPACK-in-regular-mode.patch. If you didn't use git to get
> deal.II, I think patch -i 0001-Enable-ARPACK-in-regular-mode.patch
> should work. I have also noted that Arpack was not very accurate. I am
> not sure why because according to the documentation, many other
> packages are successfully using Arpack. At the end, we gave up on
> Arpack and switched to lobpcg from anasazi. The results were more
> accurate and more stable.
>
> Best,
>
> Bruno
>
> Le mar. 15 déc. 2020 à 07:52, Animesh Rastogi IIT Gandhinagar
>  a écrit :
> >
> > Hi Bruno,
> >
> > I would like to use this patch to compute the smallest eigenvalues in my 
> case. Could you please let me know how should I update my source code in 
> the arpack.h header file to accommodate these changes in the patch. I 
> understand that I would need to reinstall dealii after updating the source 
> code, which I am fine with.
> >
> > When I am using the shift-inverse mode, I am not getting the results 
> similar to what I would get using the eigenvalue solver in MATLAB or Python 
> for the same matrix. There is a difference of about 15 to 20 in the 
> eigenvalues (even when comparing it with the ARPACK solver in Python). This 
> is the reason that I would want to try calculating the eigenvalues using 
> the patch you created in regular mode.
> >
> > Thanks!
> >
> > Animesh
> > On Sunday, November 8, 2020 at 6:00:58 PM UTC+5:30 Animesh Rastogi IIT 
> Gandhinagar wrote:
> >>
> >> Thank you Bruno, I was able to change the source code accordingly. I 
> reinstalled dealii and it worked fine!
> >>
> >> Thanks again!
> >>
> >> Animesh
> >>
> >> On Friday, November 6, 2020 at 3:55:29 AM UTC+5:30 bruno.t...@gmail.com 
> wrote:
> >>>
> >>> Animesh,
> >>>
> >>> On Thursday, November 5, 2020 at 1:11:33 PM UTC-5 
> animesh...@alumni.iitgn.ac.in wrote:
> >>>>
> >>>> However, I have no way of passing it as a parameter to the solver 
> function. I was planning to edit the header file arpack.h accordingly which 
> is inside the /usr/local/include/deal.II/lac to have that functionality. I 
> was actually thinking of passing the flag "rvec" as an argument to the 
> function solve. I was wondering if I change the permission of the file to 
> write mode, edit it and save it, would I be able to run my code inside the 
> examples folder. Or do I need to take care of something else while and 
> after editing that headerfile?
> >>>
> >>> You should change the source code and reinstall deal.II. I would do 
> what you propose only if you cannot compile deal.II on that machine. It 
> might work in this particular case but I really advise you against it.
> >>>
> >>> 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 a topic in the 
> Google Groups "deal.II User Group" group.
> > To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/dealii/2hA57ZghGqs/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/81e7a0d4-4ab9-4323-8beb-aa7897feb4c2n%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/aa324ad1-b51d-4940-a34d-68680074b4b4n%40googlegroups.com.


[deal.II] Re: Some changes in arpack.h (Functionality to compute only eigenvalues)

2020-12-15 Thread Animesh Rastogi IIT Gandhinagar
Hi Bruno,

I would like to use this patch 
<https://github.com/ORNL-CEES/mfmg/blob/master/scripts/0001-Enable-ARPACK-in-regular-mode.patch>
 
to compute the smallest eigenvalues in my case. Could you please let me 
know how should I update my source code in the arpack.h header file to 
accommodate these changes in the patch.  I understand that I would need to 
reinstall dealii after updating the source code, which I am fine with. 

When I am using the shift-inverse mode, I am not getting the results 
similar to what I would get using the eigenvalue solver in MATLAB or Python 
for the same matrix. There is a difference of about 15 to 20 in the 
eigenvalues (even when comparing it with the ARPACK solver in Python). This 
is the reason that I would want to try calculating the eigenvalues using 
the patch you created in regular mode.

Thanks!

Animesh
On Sunday, November 8, 2020 at 6:00:58 PM UTC+5:30 Animesh Rastogi IIT 
Gandhinagar wrote:

> Thank you Bruno, I was able to change the source code accordingly. I 
> reinstalled dealii and it worked fine!
>
> Thanks again!
>
> Animesh
>
> On Friday, November 6, 2020 at 3:55:29 AM UTC+5:30 bruno.t...@gmail.com 
> wrote:
>
>> Animesh,
>>
>> On Thursday, November 5, 2020 at 1:11:33 PM UTC-5 
>> animesh...@alumni.iitgn.ac.in wrote:
>>
>>> However, I have no way of passing it as a parameter to the solver 
>>> <https://www.dealii.org/current/doxygen/deal.II/classArpackSolver.html#afdc3aa9d761c43b5b4132e731c6191a5>
>>>  
>>> function. I was planning to edit the header file *arpack.h* 
>>> <https://www.dealii.org/current/doxygen/deal.II/arpack__solver_8h_source.html>
>>>  
>>> accordingly which is inside the */usr/local/include/deal.II/lac* to 
>>> have that functionality. I was actually thinking of passing the flag "rvec" 
>>> as an argument to the function solve 
>>> <https://www.dealii.org/current/doxygen/deal.II/classArpackSolver.html#afdc3aa9d761c43b5b4132e731c6191a5>.
>>>  
>>> I was wondering if I change the permission of the file to write mode, edit 
>>> it and save it, would I be able to run my code inside the examples folder. 
>>> Or do I need to take care of something else while and after editing that 
>>> headerfile?
>>>
>> You should change the source code and reinstall deal.II. I would do what 
>> you propose only if you cannot compile deal.II on that machine. It might 
>> work in this particular case but I really advise you against it.
>>
>> 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/81e7a0d4-4ab9-4323-8beb-aa7897feb4c2n%40googlegroups.com.


Re: [deal.II] Quasi Static Compressible Finit Strain for Heterogenous Hyperelastic material

2020-11-23 Thread Animesh Rastogi IIT Gandhinagar
; {
> ...
> const BlockVector 
> <https://dealii.org/developer/doxygen/deal.II/classBlockVector.html> 
> solution_total(get_total_solution(solution_delta));
> ...
> }
>
> template 
> BlockVector 
> <https://dealii.org/developer/doxygen/deal.II/classBlockVector.html>
> Solid::get_total_solution(const BlockVector 
> <https://dealii.org/developer/doxygen/deal.II/classBlockVector.html> 
> &solution_delta) const
> {
> BlockVector 
> <https://dealii.org/developer/doxygen/deal.II/classBlockVector.html> 
> solution_total(solution_n);
> solution_total += solution_delta;
> return solution_total;
> }
>
> that the only requirement to ensure a consistent state for the entire 
> problem is that the addition of "solution_n" with "solution_delta" reflects 
> the configuration of the body that you're wanting. So if that you're doing 
> in the main "time loop" is something like
>
> while (time.current() <= time.end())
> {
> solution_delta = 0.0;
> solve_nonlinear_timestep(solution_delta);
> solution_n += solution_delta;
>
> auto tmp_soln_delta = solution_delta;
>
> solution_delta = 0.0; // get_total_solution() takes in the soltuion_delta, 
> so don't solve the eigenvalue problem with the delta accounted for twice
> const bool accept_step = solve_eigenvalue_problem();
> if (accept_step == false)
> {
>   solution_n -= tmp_soln_delta;
>   
> adjust_boundary_conditions_or_timestep_size_to_apply_a_smaller_displacement_increment();
> }
>
> time.increment();
> }
>
> then that would seem a reasonable approach to me. As I said before, the 
> stresses and strains are kept in sync with the solution_total within the 
> assembly loop.
>
> I hope that this helps you to locate the source of your issues.
>
> Best,
> Jean-Paul
>
>
> On 10.11.20 16:06, Animesh Rastogi IIT Gandhinagar wrote:
>
> Hi Jean-Paul,
>
> Another question which might be the reason why I am getting the 
> inconsistencies in my newton-raphson convergence. I just realised this..
>
> What I am doing is the following - 
>
> I am giving small compressive displacements to the film+substrate. I am 
> also calculating the eigenvalues of the tangent_stiffness matrix (after the 
> convergence of newton method), to understand the stability of the system. 
> The moment I encounter a negative smallest eigenvalue, I want to go to a 
> previous time step and would like to solve for a small compressive 
> displacement. For instance, if the compression is 0.1 at this time step and 
> the eigenvalue is negative, I go to the previous time step and give a 
> compressive displacement of 0.05.
>
> Here is my concern, I have added a condition that, if I find a negative 
> eigenvalue during any time step, I update the *solution_n = solution_n - 
> solution_delta*; and then run the time step again (with a smaller 
> compressive displacement) after doing *solution_delta = 0.0*. Since the 
> next state is also dependent on the updated quadrature point data (stresses 
> etc.), I would also need to update the quadrature point data to the 
> previous step. Could you please let me know, how am I supposed to do that? 
>
> In the documentation in code gallery 
> <https://dealii.org/developer/doxygen/deal.II/code_gallery_Quasi_static_Finite_strain_Compressible_Elasticity.html>,
>  
> it is written that - 
>
> "*The first function is used to create a material object and to 
> initialize all tensors correctly: The second one updates the stored values 
> and stresses based on the current deformation measure **Grad**u**n*"  
> (inside the Point History class). However, I only find one function which 
> is setup_lqp, and not the update_lqp or something similar. 
>
> Thanks!
>
> Animesh
>
> On Tuesday, November 10, 2020 at 5:24:13 PM UTC+5:30 Animesh Rastogi IIT 
> Gandhinagar wrote:
>
>> Hi Jean-Paul, 
>>
>> There seem to be some inconsistencies in the simulations results that I 
>> am getting, therefore I wanted to check if I have applied the material laws 
>> properly accounting for the heterogeneities. Below, I have addted the 
>> edited functions that are responsible for that. Could you please let me 
>> know if there is something wrong here? I have checked the material 
>> properties (mu1, mu2 etc), and they are being read correctly by the code 
>> from the parameters file. I have also checked that the material ids (1 and 
>> 2) are correctly applied to the cells where I need them. 
>>
>> --
>> void setup_lqp (const Parameters::AllParameters ¶meters, const 
>> unsigned int &materialid)
>> {
&

Re: [deal.II] Quasi Static Compressible Finit Strain for Heterogenous Hyperelastic material

2020-11-10 Thread Animesh Rastogi IIT Gandhinagar
Hi Jean-Paul,

Another question which might be the reason why I am getting the 
inconsistencies in my newton-raphson convergence. I just realised this..

What I am doing is the following - 

I am giving small compressive displacements to the film+substrate. I am 
also calculating the eigenvalues of the tangent_stiffness matrix (after the 
convergence of newton method), to understand the stability of the system. 
The moment I encounter a negative smallest eigenvalue, I want to go to a 
previous time step and would like to solve for a small compressive 
displacement. For instance, if the compression is 0.1 at this time step and 
the eigenvalue is negative, I go to the previous time step and give a 
compressive displacement of 0.05.

Here is my concern, I have added a condition that, if I find a negative 
eigenvalue during any time step, I update the *solution_n = solution_n - 
solution_delta*; and then run the time step again (with a smaller 
compressive displacement) after doing *solution_delta = 0.0*. Since the 
next state is also dependent on the updated quadrature point data (stresses 
etc.), I would also need to update the quadrature point data to the 
previous step. Could you please let me know, how am I supposed to do that? 

In the documentation in code gallery 
<https://dealii.org/developer/doxygen/deal.II/code_gallery_Quasi_static_Finite_strain_Compressible_Elasticity.html>,
 
it is written that - 

"*The first function is used to create a material object and to initialize 
all tensors correctly: The second one updates the stored values and 
stresses based on the current deformation measure **Grad**u**n*"  (inside 
the Point History class). However, I only find one function which is 
setup_lqp, and not the update_lqp or something similar. 

Thanks!

Animesh

On Tuesday, November 10, 2020 at 5:24:13 PM UTC+5:30 Animesh Rastogi IIT 
Gandhinagar wrote:

> Hi Jean-Paul, 
>
> There seem to be some inconsistencies in the simulations results that I am 
> getting, therefore I wanted to check if I have applied the material laws 
> properly accounting for the heterogeneities. Below, I have addted the 
> edited functions that are responsible for that. Could you please let me 
> know if there is something wrong here? I have checked the material 
> properties (mu1, mu2 etc), and they are being read correctly by the code 
> from the parameters file. I have also checked that the material ids (1 and 
> 2) are correctly applied to the cells where I need them. 
>
> --
> void setup_lqp (const Parameters::AllParameters ¶meters, const 
> unsigned int &materialid)
> {
>
> //Material 1 - Thin Film
> if (materialid == 1)
> {
>  
> std::cout<<"1_id"<   material.reset(new 
> Material_Compressible_Neo_Hook_One_Field(parameters.mu1,
>  parameters.nu1));
> }
> //Material 2 - Substrate
> if (materialid ==2)
> {
>   material.reset(new 
> Material_Compressible_Neo_Hook_One_Field(parameters.mu2,
>parameters.nu2));
> }
>
> }
>
> ---
>
> template 
>   void Solid::setup_qph()
>   {
> std::cout << "Setting up quadrature point data..." << std::endl;
>
> quadrature_point_history.initialize(triangulation.begin_active(),
> triangulation.end(),
> n_q_points);
>
> for (typename Triangulation::active_cell_iterator cell =
>triangulation.begin_active(); cell != triangulation.end(); 
> ++cell)
>   {
> const std::vector > > 
> lqph =
>   quadrature_point_history.get_data(cell);
> Assert(lqph.size() == n_q_points, ExcInternalError());
>
> for (unsigned int q_point = 0; q_point < n_q_points; ++q_point)
>   lqph[q_point]->setup_lqp(parameters, cell->material_id());
>   }
>   }
>
> --
>
> Thanks!
>
> Animesh
> On Tuesday, November 3, 2020 at 12:09:03 PM UTC+5:30 Animesh Rastogi IIT 
> Gandhinagar wrote:
>
>> Hi Jean, 
>>
>> Sorry for late response. Thank you for your detailed answer. Using your 
>> suggestions I was able to assign the material ids to different area of my 
>> domain of interest. 
>>
>> Thanks again!
>>
>> Animesh
>>
>> On Tuesday, October 27, 2020 at 3:05:39 AM UTC+5:30 Jean-Paul Pelteret 
>> wrote:
>>
>>> Dear Animesh,
>>>
>>> Let me preface my suggestion by saying that you can introduce some 
>>> heterogeneity in more than one way. That is, you're not bound to using a

Re: [deal.II] Quasi Static Compressible Finit Strain for Heterogenous Hyperelastic material

2020-11-10 Thread Animesh Rastogi IIT Gandhinagar
Hi Jean-Paul, 

There seem to be some inconsistencies in the simulations results that I am 
getting, therefore I wanted to check if I have applied the material laws 
properly accounting for the heterogeneities. Below, I have addted the 
edited functions that are responsible for that. Could you please let me 
know if there is something wrong here? I have checked the material 
properties (mu1, mu2 etc), and they are being read correctly by the code 
from the parameters file. I have also checked that the material ids (1 and 
2) are correctly applied to the cells where I need them. 

--
void setup_lqp (const Parameters::AllParameters ¶meters, const unsigned 
int &materialid)
{

//Material 1 - Thin Film
if (materialid == 1)
{
 
std::cout<<"1_id"<(parameters.mu1,
 parameters.nu1));
}
//Material 2 - Substrate
if (materialid ==2)
{
  material.reset(new 
Material_Compressible_Neo_Hook_One_Field(parameters.mu2,
   parameters.nu2));
}

}

---

template 
  void Solid::setup_qph()
  {
std::cout << "Setting up quadrature point data..." << std::endl;

quadrature_point_history.initialize(triangulation.begin_active(),
triangulation.end(),
n_q_points);

for (typename Triangulation::active_cell_iterator cell =
   triangulation.begin_active(); cell != triangulation.end(); 
++cell)
  {
const std::vector > > 
lqph =
  quadrature_point_history.get_data(cell);
Assert(lqph.size() == n_q_points, ExcInternalError());

for (unsigned int q_point = 0; q_point < n_q_points; ++q_point)
  lqph[q_point]->setup_lqp(parameters, cell->material_id());
  }
  }

--

Thanks!

Animesh
On Tuesday, November 3, 2020 at 12:09:03 PM UTC+5:30 Animesh Rastogi IIT 
Gandhinagar wrote:

> Hi Jean, 
>
> Sorry for late response. Thank you for your detailed answer. Using your 
> suggestions I was able to assign the material ids to different area of my 
> domain of interest. 
>
> Thanks again!
>
> Animesh
>
> On Tuesday, October 27, 2020 at 3:05:39 AM UTC+5:30 Jean-Paul Pelteret 
> wrote:
>
>> Dear Animesh,
>>
>> Let me preface my suggestion by saying that you can introduce some 
>> heterogeneity in more than one way. That is, you're not bound to using a 
>> material ID (which is what I'm going to suggest), but you could use some 
>> geometric arguments to determine which class or material properties should 
>> dictate the constitutive response at a continuum point. You also need not 
>> use the class-based structure that this code galley example has. There are 
>> other tutorials (e.g. step-8) that use Functions that return the material 
>> coefficients at any point in space. So you should keep that in mind as you 
>> read my suggestion.
>>
>> In my opinion, the simplest approach would be the following:
>>
>> 1. The PointHistory::setup_lqp() function 
>> <https://github.com/dealii/code-gallery/blob/master/Quasi_static_Finite_strain_Compressible_Elasticity/cook_membrane.cc#L720-L724>
>>  
>> is the point at which the constitutive law at some quadrature point is set. 
>> So you should extend this function in some way to make a decision about 
>> which material it is in, and what the material law at that point is. The 
>> first thing that you might do is add an argument for the material ID, and 
>> then choose constiutitve parameters based on the material ID. You'll note 
>> that the concrete constitutive law is stored in a pointer. This makes it 
>> easy to extend to support other constitutive laws, because you can for 
>> example abstract the Material_Compressible_Neo_Hook_One_Field class into 
>> some base class and other classes (maybe a 
>> Material_Compressible_Mooney_Rivlin_One_Field) and then, based on the 
>> material ID, select which constitutive law is applied at that quadrature 
>> point. 
>> 2. The PointHistory::setup_lqp() function is called from 
>> Solid::setup_qph() 
>> <https://github.com/dealii/code-gallery/blob/master/Quasi_static_Finite_strain_Compressible_Elasticity/cook_membrane.cc#L1203-L1211>
>>  
>> , and more specifically inside a loop over all cells. Its possible to 
>> retrieve the cell->material_id() or cell->center() (or, if you create a 
>> quadrature rule to help you then you can get the actual position of the 
>> quadrature point if you want such granularity). You can then pass this 
>> information in to PointHistory::setup_

[deal.II] Re: Some changes in arpack.h (Functionality to compute only eigenvalues)

2020-11-08 Thread Animesh Rastogi IIT Gandhinagar
Thank you Bruno, I was able to change the source code accordingly. I 
reinstalled dealii and it worked fine!

Thanks again!

Animesh

On Friday, November 6, 2020 at 3:55:29 AM UTC+5:30 bruno.t...@gmail.com 
wrote:

> Animesh,
>
> On Thursday, November 5, 2020 at 1:11:33 PM UTC-5 
> animesh...@alumni.iitgn.ac.in wrote:
>
>> However, I have no way of passing it as a parameter to the solver 
>> 
>>  
>> function. I was planning to edit the header file *arpack.h* 
>> 
>>  
>> accordingly which is inside the */usr/local/include/deal.II/lac* to have 
>> that functionality. I was actually thinking of passing the flag "rvec" as 
>> an argument to the function solve 
>> .
>>  
>> I was wondering if I change the permission of the file to write mode, edit 
>> it and save it, would I be able to run my code inside the examples folder. 
>> Or do I need to take care of something else while and after editing that 
>> headerfile?
>>
> You should change the source code and reinstall deal.II. I would do what 
> you propose only if you cannot compile deal.II on that machine. It might 
> work in this particular case but I really advise you against it.
>
> 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/92ecd7e0-b47b-4d7a-8009-eb31eadaae37n%40googlegroups.com.


[deal.II] Some changes in arpack.h (Functionality to compute only eigenvalues)

2020-11-05 Thread Animesh Rastogi IIT Gandhinagar
Dear Dealii community, 

I am using Arpack Solver to compute eigenvalues of my stiffness matrix. To 
speed up the process, I would only like the eigenvalues to be computed and 
not the eigenvectors. There is a flag in arpack.h "rvec" (Link - 
https://www.dealii.org/current/doxygen/deal.II/arpack__solver_8h_source.html#l00796)
 
which essentially takes care of that. 

However, I have no way of passing it as a parameter to the solver 

 
function. I was planning to edit the header file *arpack.h* 
 
accordingly which is inside the */usr/local/include/deal.II/lac* to have 
that functionality. I was actually thinking of passing the flag "rvec" as 
an argument to the function solve 
.
 
I was wondering if I change the permission of the file to write mode, edit 
it and save it, would I be able to run my code inside the examples folder. 
Or do I need to take care of something else while and after editing that 
headerfile?

Also, I guess it would be a good idea to change the arpack.h in the next 
release of dealii so that it can have that functionality. This might help 
many other users. 


Thanks!

Animesh

-- 
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/0b155588-b28a-472a-a452-5cb3bdc37682n%40googlegroups.com.


Re: [deal.II] Boundary DOFs using DOF Handler

2020-11-04 Thread Animesh Rastogi IIT Gandhinagar
Thank you, Professor Bangerth. This is really helpful.

Animesh

On Wednesday, November 4, 2020 at 11:45:46 PM UTC+5:30 Wolfgang Bangerth 
wrote:

> On 11/4/20 12:20 AM, Animesh Rastogi IIT Gandhinagar wrote:
> > 
> > I have a quick question about the dof_handler in dealii. I have a 
> rectangular 
> > geometry and would like to access the numbering of the degree of 
> freedoms 
> > which are on the right hand side boundary of the rectangle (+X face). I 
> know 
> > the boundary_id for that face. Essentially, I want to use that number to 
> > extract the x component of the displacement at that node using the 
> > displacement vector.
>
> You can get all DoF indices on a particular boundary via 
> DoFTools::extract_boundary_dofs(). You can correlate this 
> DoFTools::extract_dofs() with a component mask that corresponds to your 
> x-displacement. With the information produced by these two you should be 
> able 
> to pick out which DoFs you want to work on.
>
> 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/e3e30b1c-9d88-452d-b9fb-a1f6cc3cd697n%40googlegroups.com.


[deal.II] Boundary DOFs using DOF Handler

2020-11-03 Thread Animesh Rastogi IIT Gandhinagar
Hello All, 

I have a quick question about the dof_handler in dealii. I have a 
rectangular geometry and would like to access the numbering of the degree 
of freedoms which are on the right hand side boundary of the rectangle (+X 
face). I know the boundary_id for that face. Essentially, I want to use 
that number to extract the x component of the displacement at that node 
using the displacement vector.

Thanks!

Animesh

-- 
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/9e29520c-7a6a-43b4-936c-5941a66d4b9bn%40googlegroups.com.


Re: [deal.II] Quasi Static Compressible Finit Strain for Heterogenous Hyperelastic material

2020-11-02 Thread Animesh Rastogi IIT Gandhinagar
Hi Jean, 

Sorry for late response. Thank you for your detailed answer. Using your 
suggestions I was able to assign the material ids to different area of my 
domain of interest. 

Thanks again!

Animesh

On Tuesday, October 27, 2020 at 3:05:39 AM UTC+5:30 Jean-Paul Pelteret 
wrote:

> Dear Animesh,
>
> Let me preface my suggestion by saying that you can introduce some 
> heterogeneity in more than one way. That is, you're not bound to using a 
> material ID (which is what I'm going to suggest), but you could use some 
> geometric arguments to determine which class or material properties should 
> dictate the constitutive response at a continuum point. You also need not 
> use the class-based structure that this code galley example has. There are 
> other tutorials (e.g. step-8) that use Functions that return the material 
> coefficients at any point in space. So you should keep that in mind as you 
> read my suggestion.
>
> In my opinion, the simplest approach would be the following:
>
> 1. The PointHistory::setup_lqp() function 
> <https://github.com/dealii/code-gallery/blob/master/Quasi_static_Finite_strain_Compressible_Elasticity/cook_membrane.cc#L720-L724>
>  
> is the point at which the constitutive law at some quadrature point is set. 
> So you should extend this function in some way to make a decision about 
> which material it is in, and what the material law at that point is. The 
> first thing that you might do is add an argument for the material ID, and 
> then choose constiutitve parameters based on the material ID. You'll note 
> that the concrete constitutive law is stored in a pointer. This makes it 
> easy to extend to support other constitutive laws, because you can for 
> example abstract the Material_Compressible_Neo_Hook_One_Field class into 
> some base class and other classes (maybe a 
> Material_Compressible_Mooney_Rivlin_One_Field) and then, based on the 
> material ID, select which constitutive law is applied at that quadrature 
> point. 
> 2. The PointHistory::setup_lqp() function is called from 
> Solid::setup_qph() 
> <https://github.com/dealii/code-gallery/blob/master/Quasi_static_Finite_strain_Compressible_Elasticity/cook_membrane.cc#L1203-L1211>
>  
> , and more specifically inside a loop over all cells. Its possible to 
> retrieve the cell->material_id() or cell->center() (or, if you create a 
> quadrature rule to help you then you can get the actual position of the 
> quadrature point if you want such granularity). You can then pass this 
> information in to PointHistory::setup_lqp() to help decide which 
> constitutive law / parameters to apply. If using the material ID then you 
> will, of course, want to set the material ID when building or reading in 
> your triangulation.
>
> That is, at least, how I typically do things when using this code as a 
> basis for extension. I hope that this helps you introduce heterogeneities 
> into your problem!
>
> Best,
> Jean-Paul
>
>
> On 26.10.20 08:15, Animesh Rastogi IIT Gandhinagar wrote:
>
> Hello All,
>
> I am trying to solve the wrinkling problem of a thin stiff film attached 
> to a soft substrate in dealii. I am using the code - from the code gallery 
> for this purpose. For the simulations, I would have to consider the film 
> and the substrate with different material properties.
>
> I understand that I would have to do something within the class Qudrature 
> point history. However, I am getting a little confused on how to approach 
> it. It would be great if someone could help me with this. 
>
> This is the code that I am using for this purpose - 
> https://dealii.org/developer/doxygen/deal.II/code_gallery_Quasi_static_Finite_strain_Compressible_Elasticity.html
>
> Thanks!
>
> Animesh
>
> -- 
> 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/26db8831-e190-4fcd-8247-b7172ab880fen%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/dealii/26db8831-e190-4fcd-8247-b7172ab880fen%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
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/c4b493cf-a0ec-4e97-b6f0-7e97f28b0612n%40googlegroups.com.


[deal.II] Quasi Static Compressible Finit Strain for Heterogenous Hyperelastic material

2020-10-26 Thread Animesh Rastogi IIT Gandhinagar
Hello All,

I am trying to solve the wrinkling problem of a thin stiff film attached to 
a soft substrate in dealii. I am using the code - from the code gallery for 
this purpose. For the simulations, I would have to consider the film and 
the substrate with different material properties.

I understand that I would have to do something within the class Qudrature 
point history. However, I am getting a little confused on how to approach 
it. It would be great if someone could help me with this. 

This is the code that I am using for this purpose - 
https://dealii.org/developer/doxygen/deal.II/code_gallery_Quasi_static_Finite_strain_Compressible_Elasticity.html

Thanks!

Animesh

-- 
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/26db8831-e190-4fcd-8247-b7172ab880fen%40googlegroups.com.


Re: [deal.II] Application of the non-homogeneous boundary conditions in Finite Elasticity (Compressible case)

2020-10-12 Thread Animesh Rastogi IIT Gandhinagar
Hi Jean,

Thanks a lot for your detailed answer to my questions. Now I am able to run 
my program and the newton method is converging. I completely misunderstood 
the documentation. Also, thank you for opening up the issue. It would 
really be helpful if the complications involved in making constraints can 
be removed. 

Thanks again!

Animesh

On Monday, October 12, 2020 at 11:20:32 AM UTC+5:30 Jean-Paul Pelteret 
wrote:

> Hi Animesh,
>
> Here are some answers to your questions:
>
>
> Essentially, I will have to apply the homogeneous boundary condition at 
> the zeroth and first Newton's step, and Non-homogeneous BC only at the 
> zeroth step, as mentioned in the documentation 
> <https://www.dealii.org/current/doxygen/deal.II/step_44.html#Solidmake_constraints>
> .
>
> 1. Why would I need to give the homogeneous boundary conditions twice?
>
>
> No, I’m afraid you’ve misunderstood what’s written there. Here’s the 
> important part of the documentation:
> “”"
> However, since we are dealing with an iterative Newton method, it should 
> be noted that any displacement constraints should only be specified at the 
> zeroth iteration and subsequently no additional contributions are to be 
> made since the constraints are already exactly satisfied.
> “””
>
> You only apply (inhomogeneous) displacement constraints at the zeroth 
> Newton iteration. Because this tutorial uses an incremental formulation, 
> and the constraints are applied to the increment itself, you want to make 
> sure that you apply the correct implement only once per timestep. This is 
> because you effectively displace your boundary from its position at the 
> previous tilmestep to the one at the current tilmestep using this single 
> update. After this update is done, you want to make sure that the boundary 
> doesn’t move away from that location, so you apply homogeneous constraints 
> on the same displacement components for each subsequent Newton step. That 
> is the other part of the logic that’s laid out in 
> step-44’s Solid::make_constraints().
>
> 2. Is it correct the way I am applying the constraints? I am copying the 
> part of the code in red? The major concern that I have is that if I do 
> constraints.clear(), then it will also clear my non-homogeneous constraint 
> applied at the zeroth Newton step. How should I handle this?
>
>
> Not quite. You do want the inhomogeneities cleared, but you still only 
> want to fix the displacement components that you originally applied 
> inhomogeneous constraints to. You’ll want to duplicate the logic applied in 
> the other branches of the make_constraints() function. So something like 
> this:
>
> // Apply Non-homogeneous B.C.
> {
>  const int boundary_id = 5;
>   if (apply_dirichlet_bc == true)
> VectorTools::interpolate_boundary_values(dof_handler_ref,
>  boundary_id,
>  ConstantFunction(dim 
> == 3 ? std::vector { -0.0001, 0.0, 0.0 } : std::vector { 
> -0.0001, 0.0 }), constraints, fe.component_mask(x_displacement));
>
> else
>
> VectorTools::interpolate_boundary_values(dof_handler_ref,
>  boundary_id,
>  ZeroFunction(), 
> constraints, fe.component_mask(x_displacement));
>
> }
>
>
> I must admit that this code is overly complicated, and it can be 
> simplified so that extending it to the case of inhomogeneous constraints is 
> easier. I’ve opened up an issue for this task here 
> <https://github.com/dealii/dealii/issues/11035> and I’ll update the 
> tutorial in the coming weeks.
>
> I hope that this helps you in understanding the logic and resolving your 
> issue!
>
> Best,
> Jean-Paul
>
>
> On 10 Oct 2020, at 19:05, Animesh Rastogi IIT Gandhinagar <
> animesh...@alumni.iitgn.ac.in> wrote:
>
> Hi All, 
>
> I am working on hyper-elastic beam buckling problem. I wish to apply 
> non-homogeneous Dirichlet Boundary condition on the right hand side of the 
> beam (to compress the beam). I was reading the step-44 
> <https://www.dealii.org/current/doxygen/deal.II/step_44.html#Solidmake_constraints>
>  
> where they have mentioned about how to apply non-homogeneous boundary 
> condition.  Essentially, I will have to apply the homogeneous boundary 
> condition at the zeroth and first Newton's step, and Non-homogeneous BC 
> only at the zeroth step, as mentioned in the documentation 
> <https://www.dealii.org/current/doxygen/deal.II/step_44.html#Solidmake_constraints>
> .
>
> I have following two questions regarding this - 
>

[deal.II] Application of the non-homogeneous boundary conditions in Finite Elasticity (Compressible case)

2020-10-10 Thread Animesh Rastogi IIT Gandhinagar
Hi All, 

I am working on hyper-elastic beam buckling problem. I wish to apply 
non-homogeneous Dirichlet Boundary condition on the right hand side of the 
beam (to compress the beam). I was reading the step-44 

 
where they have mentioned about how to apply non-homogeneous boundary 
condition.  Essentially, I will have to apply the homogeneous boundary 
condition at the zeroth and first Newton's step, and Non-homogeneous BC 
only at the zeroth step, as mentioned in the documentation 

.

I have following two questions regarding this - 

1. Why would I need to give the homogeneous boundary conditions twice?
2. Is it correct the way I am applying the constraints? I am copying the 
part of the code in red? The major concern that I have is that if I do 
constraints.clear(), then it will also clear my non-homogeneous constraint 
applied at the zeroth Newton step. How should I handle this?

I have edited the following code from code gallery - 

https://dealii.org/developer/doxygen/deal.II/code_gallery_Quasi_static_Finite_strain_Compressible_Elasticity.html

Thanks!

Animesh




template 
  void Solid::make_constraints(const int &it_nr)
  {
std::cout << " CST " << std::flush;
if (it_nr > 1)
  return;
constraints.clear();
const bool apply_dirichlet_bc = (it_nr == 0);
const FEValuesExtractors::Scalar x_displacement(0);
// Apply Non-homogeneous B.C.
{
 const int boundary_id = 5;
  if (apply_dirichlet_bc == true)
VectorTools::interpolate_boundary_values(dof_handler_ref,
 boundary_id,
 ConstantFunction(dim 
== 3 ? std::vector { -0.0001, 0.0, 0.0 } : std::vector { 
-0.0001, 0.0 }), constraints, fe.component_mask(x_displacement));
}
//Fix the left hand side..
{
  const int boundary_id = 1;

  if (apply_dirichlet_bc == true)
VectorTools::interpolate_boundary_values(dof_handler_ref,
 boundary_id,
 
ZeroFunction(n_components),
 constraints,
 fe.component_mask(u_fe));
  else
VectorTools::interpolate_boundary_values(dof_handler_ref,
boundary_id,
 
ZeroFunction(n_components),
 constraints,
 fe.component_mask(u_fe));
}


// Zero Z-displacement through thickness direction
// This corresponds to a plane strain condition being imposed on the 
beam
if (dim == 3)
  {
const int boundary_id = 2;
const FEValuesExtractors::Scalar z_displacement(2);

if (apply_dirichlet_bc == true)
  VectorTools::interpolate_boundary_values(dof_handler_ref,
   boundary_id,
   
ZeroFunction(n_components),
   constraints,
   
fe.component_mask(z_displacement));
else
  VectorTools::interpolate_boundary_values(dof_handler_ref,
   boundary_id,
   
ZeroFunction(n_components),
   constraints,
   
fe.component_mask(z_displacement));
  }

constraints.close();
  }

-- 
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/69400803-2427-4b62-be28-7d164c1cb1aan%40googlegroups.com.


Re: [deal.II] Eigenvalues and Eigenvectors of BlockSparse Matrix

2020-09-29 Thread Animesh Rastogi IIT Gandhinagar
Hi Bruno and Jean,

Thanks a lot for your help with the eigenvalue problem. I am able to solve 
the standard eigenvalue problem, and have tested my code on simple 
problems. The results are matching (compared them with the MATLAB 
eigenvalue analysis).

Thanks again!

Animesh

On Tuesday, September 29, 2020 at 1:14:37 AM UTC+5:30 bruno.t...@gmail.com 
wrote:

> Animesh,
>
> Yes, the name are reversed. Basically what happens is that ARPACK uses a 
> method called shift inverse which uses the inverse of the operator you 
> care. In practice, this means that ARPACK is not using your matrix A but 
> only A^{-1} because the largest eigenvalue of A^{-1} is related to the 
> smallest eigenvalue of A. When you ask for the largest the eigenvalue you 
> get the eigenvalue related to the largest eigenvalue of A^{-1} which is the 
> smallest eigenvalue of A.
>
> Best,
>
> Bruno
>
>
> On Sunday, September 27, 2020 at 3:47:53 PM UTC-4 
> animesh...@alumni.iitgn.ac.in wrote:
>
>> Hi Jean,
>>
>> I need a few more clarifications. Sorry to bother you again.
>>
>> In my code, when I am using the argument - "smallest_magnitude" for the 
>> type of eigenvalue, I am getting a large eigenvalue than when I am using 
>> the argument "largest_eigenvalue". I looked at some of the previous 
>> discussions on this issue, and found this threads.
>>
>> https://github.com/dealii/dealii/issues/7385
>>
>> https://groups.google.com/forum/#!topic/dealii/TabQD_AhXXg
>>
>> I can understand it has something to do with the "inverse" argument in 
>> the solve() function. I was wondering what exactly is the argument 
>> "inverse" is when we give it to the solve() function. The document 
>> <https://www.dealii.org/current/doxygen/deal.II/classArpackSolver.html> 
>> says the following which is not clear. 
>>
>> inverse - This is the possibly shifted inverse that is actually used 
>> instead of A. Only its function vmult() is used.
>>
>> Should I consider that the largest_magnitude is indeed the 
>> smallest_magnitude eigenvalue in my case? More generally, how should I 
>> interpret the results of the ARPACK solver..
>>
>> I am adding the function that I have written below for your reference - 
>>
>> template 
>>   void 
>> Solid::solve_eigenvalue_problem(BlockSparseMatrix 
>> &tangent_matrix)
>>   {
>>
>>
>> std::vector>   eigenvalues;
>> std::vector >eigenvectors;
>> eigenvalues.resize(1);
>> eigenvectors.resize(1);
>> for (unsigned int i = 0; i < eigenvectors.size(); ++i)
>> eigenvectors[i].reinit(tangent_matrix.block(u_dof,u_dof).m());
>>
>> const unsigned int num_arnoldi_vectors = 20;
>> FullMatrix identity 
>> (IdentityMatrix(tangent_matrix.block(u_dof,u_dof).m()));
>>
>> SparseDirectUMFPACK inverse;
>> inverse.initialize (tangent_matrix.block(u_dof,u_dof));
>> SolverControl solver_control(1000, 1e-9);
>> const bool symmetric=true;
>>
>> ArpackSolver eigensolver(solver_control, 
>> ArpackSolver::AdditionalData(num_arnoldi_vectors, 
>> ArpackSolver::WhichEigenvalues::smallest_magnitude, symmetric));
>>
>> std::cout<<"Calculating the smallest eigenvalue and corresponding 
>> eigenvector at  "<> eigensolver.solve(tangent_matrix.block(u_dof,u_dof), identity, 
>> inverse, eigenvalues,   eigenvectors,eigenvalues.size());
>>
>>  for (unsigned int i = 0; i < eigenvalues.size(); ++i)
>>  std::cout<<"Eigenvalue "<> eigenvalues[i]<>
>>   }
>>
>> Thanks a lot!
>>
>> AR
>> On Sunday, September 27, 2020 at 8:36:20 PM UTC+5:30 Animesh Rastogi IIT 
>> Gandhinagar wrote:
>>
>>> Hi Jean,
>>>
>>> Thanks a lot for your detailed answer. Using this idea, I was able to 
>>> solve the standard eigenvalue problem.
>>>
>>> Thanks again!
>>>
>>> Animesh
>>>
>>> On Saturday, September 26, 2020 at 1:49:10 AM UTC+5:30 Jean-Paul 
>>> Pelteret wrote:
>>>
>>>> Hi Animesh,
>>>>
>>>> I’m glad to hear that you’ve gotten Arpack working, and that you’re 
>>>> getting somewhere with your implementation. When you encounter a crash 
>>>> like 
>>>> this, its best to run the program in debug mode (better yet, do all of 
>>>> your 
>>>> development in debu

Re: [deal.II] Eigenvalues and Eigenvectors of BlockSparse Matrix

2020-09-27 Thread Animesh Rastogi IIT Gandhinagar
Hi Jean,

I need a few more clarifications. Sorry to bother you again.

In my code, when I am using the argument - "smallest_magnitude" for the 
type of eigenvalue, I am getting a large eigenvalue than when I am using 
the argument "largest_eigenvalue". I looked at some of the previous 
discussions on this issue, and found this threads.

https://github.com/dealii/dealii/issues/7385

https://groups.google.com/forum/#!topic/dealii/TabQD_AhXXg

I can understand it has something to do with the "inverse" argument in the 
solve() function. I was wondering what exactly is the argument "inverse" is 
when we give it to the solve() function. The document 
<https://www.dealii.org/current/doxygen/deal.II/classArpackSolver.html> 
says the following which is not clear. 

inverse - This is the possibly shifted inverse that is actually used 
instead of A. Only its function vmult() is used.

Should I consider that the largest_magnitude is indeed the 
smallest_magnitude eigenvalue in my case? More generally, how should I 
interpret the results of the ARPACK solver..

I am adding the function that I have written below for your reference - 

template 
  void 
Solid::solve_eigenvalue_problem(BlockSparseMatrix 
&tangent_matrix)
  {

std::vector>   eigenvalues;
std::vector >eigenvectors;
eigenvalues.resize(1);
eigenvectors.resize(1);
for (unsigned int i = 0; i < eigenvectors.size(); ++i)
eigenvectors[i].reinit(tangent_matrix.block(u_dof,u_dof).m());

const unsigned int num_arnoldi_vectors = 20;
FullMatrix identity 
(IdentityMatrix(tangent_matrix.block(u_dof,u_dof).m()));
SparseDirectUMFPACK inverse;
inverse.initialize (tangent_matrix.block(u_dof,u_dof));
SolverControl solver_control(1000, 1e-9);
const bool symmetric=true;

ArpackSolver eigensolver(solver_control, 
ArpackSolver::AdditionalData(num_arnoldi_vectors, 
ArpackSolver::WhichEigenvalues::smallest_magnitude, symmetric));

std::cout<<"Calculating the smallest eigenvalue and corresponding 
eigenvector at  "< Hi Jean,
>
> Thanks a lot for your detailed answer. Using this idea, I was able to 
> solve the standard eigenvalue problem.
>
> Thanks again!
>
> Animesh
>
> On Saturday, September 26, 2020 at 1:49:10 AM UTC+5:30 Jean-Paul Pelteret 
> wrote:
>
>> Hi Animesh,
>>
>> I’m glad to hear that you’ve gotten Arpack working, and that you’re 
>> getting somewhere with your implementation. When you encounter a crash like 
>> this, its best to run the program in debug mode (better yet, do all of your 
>> development in debug mode). In debug mode, there are a lot of additional 
>> checks that can help you find the source of issues. You can read more about 
>> this here 
>> <https://github.com/dealii/dealii/wiki/Frequently-Asked-Questions#how-can-dealii-help-me-find-bugs>
>> .
>>
>> I see that you invoke the identity matrix inline with the solve() step 
>> like this: IdentityMatrix() . According to the documentation 
>> <https://dealii.org/developer/doxygen/deal.II/classIdentityMatrix.html#a271487fb3b1eeec33ca734aa05601110>,
>>  
>> this is incorrect because the matrix is zero sized (i.e. holds no entries). 
>> You probably want to use this constructor 
>> <https://dealii.org/developer/doxygen/deal.II/classIdentityMatrix.html#a849adfebd6f0068b9f49dd8e6a6c3746>,
>>  
>> and because the matrix should have the same size as the tangent matrix you 
>> would call it like this: IdentityMatrix(tangent_matrix
>> .block(u_dof,u_dof).m()).
>>
>> I am a bit confused of where actually to solve the standard eigenvalue 
>> problem in the code for my purpose.
>>
>>
>> Well, from your original post it sounds to me like you want to 
>> investigate some properties of the equilibrium state of your problem. That 
>> makes sense. So really what you probably want to do is let the nonlinear 
>> solver iterate until convergence, and then keep the system matrix and RHS 
>> vector around (i.e. don’t clear them) and finally as a post-processing step 
>> solve the eigenvalue problem. So I would suggest that the entire code block 
>> that you added to the solve_linear_system() method simply be moved to the 
>> output_results() method, or to some new method that is invoked between 
>> solve_nonlinear_timestep() and time.increment() inside the main run() 
>> function.
>>
>> Best,
>> Jean-Paul
>>
>> On 25 Sep 2020, at 08:36, Animesh Rastogi IIT Gandhinagar <
>> animesh...@alumni.iitgn.ac.in> wrote:
>>
>

Re: [deal.II] Eigenvalues and Eigenvectors of BlockSparse Matrix

2020-09-27 Thread Animesh Rastogi IIT Gandhinagar
Hi Jean,

Thanks a lot for your detailed answer. Using this idea, I was able to solve 
the standard eigenvalue problem.

Thanks again!

Animesh

On Saturday, September 26, 2020 at 1:49:10 AM UTC+5:30 Jean-Paul Pelteret 
wrote:

> Hi Animesh,
>
> I’m glad to hear that you’ve gotten Arpack working, and that you’re 
> getting somewhere with your implementation. When you encounter a crash like 
> this, its best to run the program in debug mode (better yet, do all of your 
> development in debug mode). In debug mode, there are a lot of additional 
> checks that can help you find the source of issues. You can read more about 
> this here 
> <https://github.com/dealii/dealii/wiki/Frequently-Asked-Questions#how-can-dealii-help-me-find-bugs>
> .
>
> I see that you invoke the identity matrix inline with the solve() step 
> like this: IdentityMatrix() . According to the documentation 
> <https://dealii.org/developer/doxygen/deal.II/classIdentityMatrix.html#a271487fb3b1eeec33ca734aa05601110>,
>  
> this is incorrect because the matrix is zero sized (i.e. holds no entries). 
> You probably want to use this constructor 
> <https://dealii.org/developer/doxygen/deal.II/classIdentityMatrix.html#a849adfebd6f0068b9f49dd8e6a6c3746>,
>  
> and because the matrix should have the same size as the tangent matrix you 
> would call it like this: IdentityMatrix(tangent_matrix
> .block(u_dof,u_dof).m()).
>
> I am a bit confused of where actually to solve the standard eigenvalue 
> problem in the code for my purpose.
>
>
> Well, from your original post it sounds to me like you want to investigate 
> some properties of the equilibrium state of your problem. That makes sense. 
> So really what you probably want to do is let the nonlinear solver iterate 
> until convergence, and then keep the system matrix and RHS vector around 
> (i.e. don’t clear them) and finally as a post-processing step solve the 
> eigenvalue problem. So I would suggest that the entire code block that you 
> added to the solve_linear_system() method simply be moved to the 
> output_results() method, or to some new method that is invoked between 
> solve_nonlinear_timestep() and time.increment() inside the main run() 
> function.
>
> Best,
> Jean-Paul
>
> On 25 Sep 2020, at 08:36, Animesh Rastogi IIT Gandhinagar <
> animesh...@alumni.iitgn.ac.in> wrote:
>
> Hi,
>
> I could figure out how to give Identity Matrix instead of the mass matrix 
> to solve the Standard Eigen value problem. However, on running, I am 
> getting the folllowing error. 
>
> Timestep 1 @ 0.1s
>
> ___
> SOLVER STEP |  LIN_IT   LIN_RESRES_NORM RES_U 
> NU_NORM  NU_U 
>
> ___
>   0  CST  ASM  SLVCMakeFiles/run.dir/build.make:57: recipe for target 
> 'CMakeFiles/run' failed
> make[3]: *** [CMakeFiles/run] Segmentation fault (core dumped)
> 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
>
>
>
> I am copying here the solve_linear_system function and the part that I 
> updated is blue in color. Also, I wish to calculate the eigenvalues after 
> the newton method has converged. I am a bit confused of where actually to 
> solve the standard eigenvalue problem in the code for my purpose. Could 
> someone please help me with these questions?
>
> 
> template 
>   std::pair
>   Solid::solve_linear_system(BlockVector 
> &newton_update)
>   {
> BlockVector A(dofs_per_block);
> BlockVector B(dofs_per_block);
>
> unsigned int lin_it = 0;
> double lin_res = 0.0;
> {
>   timer.enter_subsection("Linear solver");
>   std::cout << " SLV " << std::flush;
>   if (parameters.type_lin == "CG")
> {
>   const int solver_its = static_cast(
> tangent_matrix.block(u_dof, u_dof).m()
> * parameters.max_iterations_lin);
>   const double tol_sol = parameters.tol_lin
>  * system_rhs.block(u_dof).l2_norm();
>
>   SolverControl solver_control(solver_its, tol_sol);
>
>   GrowingVectorMemory > GVM;
> 

Re: [deal.II] Eigenvalues and Eigenvectors of BlockSparse Matrix

2020-09-24 Thread Animesh Rastogi IIT Gandhinagar
Hi,

I could figure out how to give Identity Matrix instead of the mass matrix 
to solve the Standard Eigen value problem. However, on running, I am 
getting the folllowing error. 

Timestep 1 @ 0.1s
___
SOLVER STEP |  LIN_IT   LIN_RESRES_NORM RES_U 
NU_NORM  NU_U 
___
  0  CST  ASM  SLVCMakeFiles/run.dir/build.make:57: recipe for target 
'CMakeFiles/run' failed
make[3]: *** [CMakeFiles/run] Segmentation fault (core dumped)
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



I am copying here the solve_linear_system function and the part that I 
updated is blue in color. Also, I wish to calculate the eigenvalues after 
the newton method has converged. I am a bit confused of where actually to 
solve the standard eigenvalue problem in the code for my purpose. Could 
someone please help me with these questions?


template 
  std::pair
  Solid::solve_linear_system(BlockVector 
&newton_update)
  {
BlockVector A(dofs_per_block);
BlockVector B(dofs_per_block);

unsigned int lin_it = 0;
double lin_res = 0.0;
{
  timer.enter_subsection("Linear solver");
  std::cout << " SLV " << std::flush;
  if (parameters.type_lin == "CG")
{
  const int solver_its = static_cast(
tangent_matrix.block(u_dof, u_dof).m()
* parameters.max_iterations_lin);
  const double tol_sol = parameters.tol_lin
 * system_rhs.block(u_dof).l2_norm();

  SolverControl solver_control(solver_its, tol_sol);

  GrowingVectorMemory > GVM;
  SolverCG > solver_CG(solver_control, GVM);

  PreconditionSelector, Vector >
  preconditioner (parameters.preconditioner_type,
  parameters.preconditioner_relaxation);
  preconditioner.use_matrix(tangent_matrix.block(u_dof, u_dof));

  solver_CG.solve(tangent_matrix.block(u_dof, u_dof),
  newton_update.block(u_dof),
  system_rhs.block(u_dof),
  preconditioner);

  lin_it = solver_control.last_step();
  lin_res = solver_control.last_value();
}
  else if (parameters.type_lin == "Direct")
{
 
  SparseDirectUMFPACK A_direct;
  A_direct.initialize(tangent_matrix.block(u_dof, u_dof));
  A_direct.vmult(newton_update.block(u_dof), 
system_rhs.block(u_dof));

  lin_it = 1;
  lin_res = 0.0;
}
  else
Assert (false, ExcMessage("Linear solver type not implemented"));

   std::vector>   eigenvalues;
   std::vector >eigenvectors;
   SparseDirectUMFPACK inverse;
   inverse.initialize (tangent_matrix.block(u_dof,u_dof));
  SolverControl solver_control(1000, 1e-9);

 ArpackSolver eigensolver(solver_control,
ArpackSolver::AdditionalData(ArpackSolver::WhichEigenvalues::algebraically_smallest));
 eigensolver.solve(tangent_matrix.block(u_dof,u_dof), IdentityMatrix(), 
inverse, eigenvalues, eigenvectors,eigenvalues.size());

  timer.leave_subsection();
    }
-----
On Friday, September 25, 2020 at 12:15:29 AM UTC+5:30 Animesh Rastogi IIT 
Gandhinagar wrote:

> I could finally configure dealii using ARPACK. I am facing issues in 
> initialising the identity matrix that is to be given to the 
> eigensolver.solve(). I am trying to replace the mass matrix with an 
> identity matrix..
>
> I am copying the code again in this thread..
>
> std::vector>   eigenvalues;
>   std::vector >eigenvectors;
>   SparseMatrix identity (IdentityMatrix(u_dof));
>   SparseDirectUMFPACK inverse;
>   inverse.initialize (tangent_matrix.block(u_dof,u_dof));
>   const int eigensolver_its = static_cast(
> tangent_matrix.block(u_dof, u_dof).m()
> * parameters.max_iterations_lin);
>   SolverControl solver_control(eigensolver_its, 1e-9);
>   ArpackSolver::ArpackSolver eigensolver(solver_control);
>   eigensolver.solve(tangent_matrix.block(u_dof,u_dof), identity, 
> inverse, eigenvalues, eigenvectors);
>
> I am getting the following error for this - 
>
> error: request for member ‘vmult’ in ‘mass_matrix’, which i

Re: [deal.II] Eigenvalues and Eigenvectors of BlockSparse Matrix

2020-09-24 Thread Animesh Rastogi IIT Gandhinagar
I could finally configure dealii using ARPACK. I am facing issues in 
initialising the identity matrix that is to be given to the 
eigensolver.solve(). I am trying to replace the mass matrix with an 
identity matrix..

I am copying the code again in this thread..

std::vector>   eigenvalues;
  std::vector >eigenvectors;
  SparseMatrix identity (IdentityMatrix(u_dof));
  SparseDirectUMFPACK inverse;
  inverse.initialize (tangent_matrix.block(u_dof,u_dof));
  const int eigensolver_its = static_cast(
tangent_matrix.block(u_dof, u_dof).m()
* parameters.max_iterations_lin);
  SolverControl solver_control(eigensolver_its, 1e-9);
  ArpackSolver::ArpackSolver eigensolver(solver_control);
  eigensolver.solve(tangent_matrix.block(u_dof,u_dof), identity, 
inverse, eigenvalues, eigenvectors);

I am getting the following error for this - 

error: request for member ‘vmult’ in ‘mass_matrix’, which is of non-class 
type ‘dealii::BlockSparseMatrix(dealii::IdentityMatrix)’
   mass_matrix.vmult(tmp, src);

Could someone please help me with this?

Thanks!

Animesh
On Thursday, September 24, 2020 at 4:40:47 PM UTC+5:30 Animesh Rastogi IIT 
Gandhinagar wrote:

> Hi Jean,
>
> It turns out that I did not configure dealii with ARPACK. So I followed 
> the readme instructions and installed and compiled ARPACK as suggested. I 
> also tried to run the examples in the ARPACK directory and they are running 
> without any errors. However, when I tried to reconfigure deallii using the 
> selfcompiled version, it says the following error. 
>
> Could not find the arpack library!
>
>   Please ensure that a suitable arpack library is installed on your 
> computer.
>
>   If the library is not at a default location, either provide some hints 
> for
>   autodetection,
>
>   $ ARPACK_DIR="..." cmake <...>
>   $ cmake -DARPACK_DIR="..." <...>
>
>   or set the relevant variables by hand in ccmake.
>
> I used the following cmake command to configure dealii again  -
>
> cmake -DDEAL_II_WITH_PETSC=ON 
> -DPETSC_DIR=/home/animesh/Documents/petsc-3.13.5 
> -DPETSC_ARCH=arch-linux-c-debug -DDEAL_II_WITH_METIS=ON 
> -DDEAL_II_WITH_MPI=ON -DDEAL_II_WITH_ARPACK=ON 
> -DARPACK_DIR=/home/animesh/Documents/ARPACK ..
>
> I checked that the path of the directory of ARPACK that I am giving here 
> is correct.
>
> I followed the instructions in this page - 
> https://www.dealii.org/current/external-libs/arpack.html. 
> Also, I couldn't figure out what it means when it says "For compilation 
> of ARPACK we emphasize adding the compiler flag -fPIC". What is -fPIC and 
> where should I use this flag?
>
> Could you please help me with this and the question about identity matrix 
> asked in the previous mail of this thread?
>
> Thanks a lot!
>
> Animesh
> On Thursday, September 24, 2020 at 11:56:24 AM UTC+5:30 Animesh Rastogi 
> IIT Gandhinagar wrote:
>
>> Hi Jean,
>>
>> Thanks a lot for your response. I am trying as you suggested. I have 
>> added the following code inside the linear solver so that I can get the 
>> eigenvalues at every newton step.
>>
>> std::vector>   eigenvalues;
>>   std::vector >eigenvectors;
>>   SparseMatrix identity (IdentityMatrix(u_dof));
>>   SparseDirectUMFPACK inverse;
>>   inverse.initialize (tangent_matrix.block(u_dof,u_dof));
>>   const int eigensolver_its = static_cast(
>> tangent_matrix.block(u_dof, u_dof).m()
>> * parameters.max_iterations_lin);
>>   SolverControl solver_control(eigensolver_its, 1e-9);
>>   ArpackSolver::ArpackSolver eigensolver(solver_control);
>>   eigensolver.solve(tangent_matrix.block(u_dof,u_dof), identity, 
>> inverse, eigenvalues, eigenvectors);
>>
>> However, I am getting the follwing error while compiling. 
>>
>> error: ‘ArpackSolver’ has not been declared
>>
>> I have included the header file #include . 
>>
>> Also, could you please let me know if I have declared the identity matrix 
>> correctly? I am replacing the mass matrix B with the Identity matrix to 
>> compute the eigenvalues and eigenvectors.
>>
>> Thanks!
>>
>> Animesh
>> On Thursday, September 24, 2020 at 1:10:35 AM UTC+5:30 Jean-Paul Pelteret 
>> wrote:
>>
>>> Hi Animesh,
>>>
>>> Although in that code-gallery example the system is assembled into a 
>>> BlockSparseMatrix, the system actually has only one block. So you 
>>> can retrieve the underlyin

Re: [deal.II] Eigenvalues and Eigenvectors of BlockSparse Matrix

2020-09-24 Thread Animesh Rastogi IIT Gandhinagar
Hi Jean,

It turns out that I did not configure dealii with ARPACK. So I followed the 
readme instructions and installed and compiled ARPACK as suggested. I also 
tried to run the examples in the ARPACK directory and they are running 
without any errors. However, when I tried to reconfigure deallii using the 
selfcompiled version, it says the following error. 

Could not find the arpack library!

  Please ensure that a suitable arpack library is installed on your 
computer.

  If the library is not at a default location, either provide some hints for
  autodetection,

  $ ARPACK_DIR="..." cmake <...>
  $ cmake -DARPACK_DIR="..." <...>

  or set the relevant variables by hand in ccmake.

I used the following cmake command to configure dealii again  -

cmake -DDEAL_II_WITH_PETSC=ON 
-DPETSC_DIR=/home/animesh/Documents/petsc-3.13.5 
-DPETSC_ARCH=arch-linux-c-debug -DDEAL_II_WITH_METIS=ON 
-DDEAL_II_WITH_MPI=ON -DDEAL_II_WITH_ARPACK=ON 
-DARPACK_DIR=/home/animesh/Documents/ARPACK ..

I checked that the path of the directory of ARPACK that I am giving here is 
correct.

I followed the instructions in this page - 
https://www.dealii.org/current/external-libs/arpack.html. 
Also, I couldn't figure out what it means when it says "For compilation of 
ARPACK we emphasize adding the compiler flag -fPIC". What is -fPIC and 
where should I use this flag?

Could you please help me with this and the question about identity matrix 
asked in the previous mail of this thread?

Thanks a lot!

Animesh
On Thursday, September 24, 2020 at 11:56:24 AM UTC+5:30 Animesh Rastogi IIT 
Gandhinagar wrote:

> Hi Jean,
>
> Thanks a lot for your response. I am trying as you suggested. I have added 
> the following code inside the linear solver so that I can get the 
> eigenvalues at every newton step.
>
> std::vector>   eigenvalues;
>   std::vector >eigenvectors;
>   SparseMatrix identity (IdentityMatrix(u_dof));
>   SparseDirectUMFPACK inverse;
>   inverse.initialize (tangent_matrix.block(u_dof,u_dof));
>   const int eigensolver_its = static_cast(
> tangent_matrix.block(u_dof, u_dof).m()
> * parameters.max_iterations_lin);
>   SolverControl solver_control(eigensolver_its, 1e-9);
>   ArpackSolver::ArpackSolver eigensolver(solver_control);
>   eigensolver.solve(tangent_matrix.block(u_dof,u_dof), identity, 
> inverse, eigenvalues, eigenvectors);
>
> However, I am getting the follwing error while compiling. 
>
> error: ‘ArpackSolver’ has not been declared
>
> I have included the header file #include . 
>
> Also, could you please let me know if I have declared the identity matrix 
> correctly? I am replacing the mass matrix B with the Identity matrix to 
> compute the eigenvalues and eigenvectors.
>
> Thanks!
>
> Animesh
> On Thursday, September 24, 2020 at 1:10:35 AM UTC+5:30 Jean-Paul Pelteret 
> wrote:
>
>> Hi Animesh,
>>
>> Although in that code-gallery example the system is assembled into a 
>> BlockSparseMatrix, the system actually has only one block. So you 
>> can retrieve the underlying SparseMatrix (and Vector for 
>> the RHS) via
>> tangent_matrix.block(u_dof, u_dof);
>> system_rhs.block(u_dof);
>> and use them with one of the standard eigensolvers (maybe ArpackSolver 
>> <https://dealii.org/developer/doxygen/deal.II/classArpackSolver.html>, 
>> since you want both the eigenvalues and eigenvectors).
>>
>> I hope that this helps you!
>>
>> Best,
>> Jean-Paul
>>
>> On 23 Sep 2020, at 20:53, Animesh Rastogi IIT Gandhinagar <
>> animesh...@alumni.iitgn.ac.in> wrote:
>>
>> Hi All, 
>>
>> I am trying to play with the code of Quassi Static Finite Strain 
>> Compressibility 
>> <https://dealii.org/developer/doxygen/deal.II/code_gallery_Quasi_static_Finite_strain_Compressible_Elasticity.html>.
>>  
>> I want to calculate the eigenvalues and eigenvectors of the System Tangent 
>> Matrix (BlockSparseMatrix 
>> <https://dealii.org/developer/doxygen/deal.II/classBlockSparseMatrix.html> 
>> tangent_matrix) that we get at every time step after the Newton method has 
>> converged. However, I could not find any function to calculate the 
>> eigenvalues and eigenvectors of the BlockSparse Matrix. Could someone 
>> please help me with this?
>>
>> Thanks!
>>
>> AR
>>
>> -- 
>> 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 G

Re: [deal.II] Eigenvalues and Eigenvectors of BlockSparse Matrix

2020-09-23 Thread Animesh Rastogi IIT Gandhinagar
Hi Jean,

Thanks a lot for your response. I am trying as you suggested. I have added 
the following code inside the linear solver so that I can get the 
eigenvalues at every newton step.

std::vector>   eigenvalues;
  std::vector >eigenvectors;
  SparseMatrix identity (IdentityMatrix(u_dof));
  SparseDirectUMFPACK inverse;
  inverse.initialize (tangent_matrix.block(u_dof,u_dof));
  const int eigensolver_its = static_cast(
tangent_matrix.block(u_dof, u_dof).m()
* parameters.max_iterations_lin);
  SolverControl solver_control(eigensolver_its, 1e-9);
  ArpackSolver::ArpackSolver eigensolver(solver_control);
  eigensolver.solve(tangent_matrix.block(u_dof,u_dof), identity, 
inverse, eigenvalues, eigenvectors);

However, I am getting the follwing error while compiling. 

error: ‘ArpackSolver’ has not been declared

I have included the header file #include . 

Also, could you please let me know if I have declared the identity matrix 
correctly? I am replacing the mass matrix B with the Identity matrix to 
compute the eigenvalues and eigenvectors.

Thanks!

Animesh
On Thursday, September 24, 2020 at 1:10:35 AM UTC+5:30 Jean-Paul Pelteret 
wrote:

> Hi Animesh,
>
> Although in that code-gallery example the system is assembled into a 
> BlockSparseMatrix, the system actually has only one block. So you 
> can retrieve the underlying SparseMatrix (and Vector for 
> the RHS) via
> tangent_matrix.block(u_dof, u_dof);
> system_rhs.block(u_dof);
> and use them with one of the standard eigensolvers (maybe ArpackSolver 
> <https://dealii.org/developer/doxygen/deal.II/classArpackSolver.html>, 
> since you want both the eigenvalues and eigenvectors).
>
> I hope that this helps you!
>
> Best,
> Jean-Paul
>
> On 23 Sep 2020, at 20:53, Animesh Rastogi IIT Gandhinagar <
> animesh...@alumni.iitgn.ac.in> wrote:
>
> Hi All, 
>
> I am trying to play with the code of Quassi Static Finite Strain 
> Compressibility 
> <https://dealii.org/developer/doxygen/deal.II/code_gallery_Quasi_static_Finite_strain_Compressible_Elasticity.html>.
>  
> I want to calculate the eigenvalues and eigenvectors of the System Tangent 
> Matrix (BlockSparseMatrix 
> <https://dealii.org/developer/doxygen/deal.II/classBlockSparseMatrix.html> 
> tangent_matrix) that we get at every time step after the Newton method has 
> converged. However, I could not find any function to calculate the 
> eigenvalues and eigenvectors of the BlockSparse Matrix. Could someone 
> please help me with this?
>
> Thanks!
>
> AR
>
> -- 
> 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/987eb63a-333e-43b3-a9e0-fbcbae2d567en%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/dealii/987eb63a-333e-43b3-a9e0-fbcbae2d567en%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
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/7a3ef469-b770-4f66-bf29-6af64610b14fn%40googlegroups.com.


[deal.II] Eigenvalues and Eigenvectors of BlockSparse Matrix

2020-09-23 Thread Animesh Rastogi IIT Gandhinagar
Hi All, 

I am trying to play with the code of Quassi Static Finite Strain 
Compressibility 
.
 
I want to calculate the eigenvalues and eigenvectors of the System Tangent 
Matrix (BlockSparseMatrix 
 
tangent_matrix) that we get at every time step after the Newton method has 
converged. However, I could not find any function to calculate the 
eigenvalues and eigenvectors of the BlockSparse Matrix. Could someone 
please help me with this?

Thanks!

AR

-- 
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/987eb63a-333e-43b3-a9e0-fbcbae2d567en%40googlegroups.com.


[deal.II] Re: Regarding configuring with UMFPACK for Quasi-Static Strain Compressible Elasticity program

2020-09-13 Thread Animesh Rastogi IIT Gandhinagar
Hi All,

I was able to run this problem in my PC. I reinstalled dealii after 
installing the required dependencies ; followed the readme of dealii to 
understand how to configure them together.

Thanks!

AR

On Sunday, September 13, 2020 at 1:03:34 AM UTC+5:30 Animesh Rastogi IIT 
Gandhinagar wrote:

> Hi Simon,
>
> Thanks for your reply. I am now trying to reinstall dealII with candi. In 
> the list of libraries, it does not show UMFPACK. Will it configure it from 
> the bundles or do I need to install SuiteSparse?
>
> Thanks!
>
> Animesh
>
> On Sunday, September 13, 2020 at 12:38:12 AM UTC+5:30 simon...@gmail.com 
> wrote:
>
>> Hi,
>> You'll need to call cmake with the flag
>>
>> -DDEAL_II_WITH_UMFPACK = ON
>>
>>
>> > Also, do I need to reinstall dealii everytime I realise that I have not 
>> configured dealii with a particular package?
>>
>> Yes. However, if you need several of the optional dependencies, there is 
>> a script that can make the installation process easier here:
>> https://github.com/dealii/candi
>>
>> Best,
>> Simon
>>
>>
>> On Saturday, September 12, 2020 at 1:42:29 PM UTC+2, Animesh Rastogi IIT 
>> Gandhinagar wrote:
>>>
>>> Attached is the detailed.log file. 
>>> On Saturday, September 12, 2020 at 4:39:21 PM UTC+5:30 Animesh Rastogi 
>>> IIT Gandhinagar wrote:
>>>
>>>> Hello dealii Community, 
>>>>
>>>> I wish to run the program - Quasi-Static Finite-Strain Compressible 
>>>> Elasticity. 
>>>>
>>>> <https://github.com/dealii/code-gallery/tree/master/Quasi_static_Finite_strain_Compressible_Elasticity>
>>>>
>>>> This requires the dealii to be configured with UMFPACK. For this, I 
>>>> installed the SuiteSparse with UMFPACK, compiled it, and then reconfigured 
>>>> and reinstalled dealii using the command -DUMFPACK_DIR=/path/to/umfpack 
>>>> (changing the path to the compiled version of UMFPACK in my PC) with cmake.
>>>>
>>>> However, I am still getting the following error when I am running the 
>>>> Finite Strain program.
>>>>
>>>> An error occurred in line <635> of file 
>>>>  
>>>> in function
>>>> void dealii::SparseDirectUMFPACK::factorize(const Matrix&) [with 
>>>> Matrix = dealii::SparseMatrix]
>>>> The violated condition was: 
>>>> false
>>>> 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.
>>>>
>>>> Could someone please let me know how should I sort it out?
>>>>
>>>> Also, do I need to reinstall dealii everytime I realise that I have not 
>>>> configured dealii with a particular package?
>>>>
>>>> Thanks!
>>>>
>>>> Animesh
>>>>
>>>>

-- 
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/5e6bac01-e04a-4492-a9b8-97fb418e04d6n%40googlegroups.com.


[deal.II] Error while installing dealii using candi

2020-09-12 Thread Animesh Rastogi IIT Gandhinagar

Dear Dealii community,

I am reinstalling dealii using candi on my PC. Here is the error, I am 
getting while installing 

g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
packages/belos/tpetra/src/CMakeFiles/belostpetra.dir/build.make:374: recipe 
for target 
'packages/belos/tpetra/src/CMakeFiles/belostpetra.dir/solvers/Belos_Tpetra_GmresPoly.cpp.o'
 
failed
make[2]: *** 
[packages/belos/tpetra/src/CMakeFiles/belostpetra.dir/solvers/Belos_Tpetra_GmresPoly.cpp.o]
 
Error 4
CMakeFiles/Makefile2:6883: recipe for target 
'packages/belos/tpetra/src/CMakeFiles/belostpetra.dir/all' failed
make[1]: *** [packages/belos/tpetra/src/CMakeFiles/belostpetra.dir/all] 
Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2


Could someone please let me know why I am getting this error?

Thanks

AR

-- 
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/c3085bbd-faa2-44cf-b513-2483b0582873n%40googlegroups.com.


[deal.II] Re: Regarding configuring with UMFPACK for Quasi-Static Strain Compressible Elasticity program

2020-09-12 Thread Animesh Rastogi IIT Gandhinagar
Hi Simon,

Thanks for your reply. I am now trying to reinstall dealII with candi. In 
the list of libraries, it does not show UMFPACK. Will it configure it from 
the bundles or do I need to install SuiteSparse?

Thanks!

Animesh

On Sunday, September 13, 2020 at 12:38:12 AM UTC+5:30 simon...@gmail.com 
wrote:

> Hi,
> You'll need to call cmake with the flag
>
> -DDEAL_II_WITH_UMFPACK = ON
>
>
> > Also, do I need to reinstall dealii everytime I realise that I have not 
> configured dealii with a particular package?
>
> Yes. However, if you need several of the optional dependencies, there is a 
> script that can make the installation process easier here:
> https://github.com/dealii/candi
>
> Best,
> Simon
>
>
> On Saturday, September 12, 2020 at 1:42:29 PM UTC+2, Animesh Rastogi IIT 
> Gandhinagar wrote:
>>
>> Attached is the detailed.log file. 
>> On Saturday, September 12, 2020 at 4:39:21 PM UTC+5:30 Animesh Rastogi 
>> IIT Gandhinagar wrote:
>>
>>> Hello dealii Community, 
>>>
>>> I wish to run the program - Quasi-Static Finite-Strain Compressible 
>>> Elasticity. 
>>>
>>> <https://github.com/dealii/code-gallery/tree/master/Quasi_static_Finite_strain_Compressible_Elasticity>
>>>
>>> This requires the dealii to be configured with UMFPACK. For this, I 
>>> installed the SuiteSparse with UMFPACK, compiled it, and then reconfigured 
>>> and reinstalled dealii using the command -DUMFPACK_DIR=/path/to/umfpack 
>>> (changing the path to the compiled version of UMFPACK in my PC) with cmake.
>>>
>>> However, I am still getting the following error when I am running the 
>>> Finite Strain program.
>>>
>>> An error occurred in line <635> of file 
>>>  
>>> in function
>>> void dealii::SparseDirectUMFPACK::factorize(const Matrix&) [with 
>>> Matrix = dealii::SparseMatrix]
>>> The violated condition was: 
>>> false
>>> 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.
>>>
>>> Could someone please let me know how should I sort it out?
>>>
>>> Also, do I need to reinstall dealii everytime I realise that I have not 
>>> configured dealii with a particular package?
>>>
>>> Thanks!
>>>
>>> Animesh
>>>
>>>

-- 
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/0dd9a982-d563-4602-88ec-2b18d7701ad3n%40googlegroups.com.


[deal.II] Re: Regarding configuring with UMFPACK for Quasi-Static Strain Compressible Elasticity program

2020-09-12 Thread Animesh Rastogi IIT Gandhinagar
Attached is the detailed.log file. 
On Saturday, September 12, 2020 at 4:39:21 PM UTC+5:30 Animesh Rastogi IIT 
Gandhinagar wrote:

> Hello dealii Community, 
>
> I wish to run the program - Quasi-Static Finite-Strain Compressible 
> Elasticity. 
>
> <https://github.com/dealii/code-gallery/tree/master/Quasi_static_Finite_strain_Compressible_Elasticity>
>
> This requires the dealii to be configured with UMFPACK. For this, I 
> installed the SuiteSparse with UMFPACK, compiled it, and then reconfigured 
> and reinstalled dealii using the command -DUMFPACK_DIR=/path/to/umfpack 
> (changing the path to the compiled version of UMFPACK in my PC) with cmake.
>
> However, I am still getting the following error when I am running the 
> Finite Strain program.
>
> An error occurred in line <635> of file 
>  
> in function
> void dealii::SparseDirectUMFPACK::factorize(const Matrix&) [with 
> Matrix = dealii::SparseMatrix]
> The violated condition was: 
> false
> 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.
>
> Could someone please let me know how should I sort it out?
>
> Also, do I need to reinstall dealii everytime I realise that I have not 
> configured dealii with a particular package?
>
> Thanks!
>
> Animesh
>
>

-- 
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/486d2ed6-fe2d-4f00-a525-45446c4d22f6n%40googlegroups.com.
###
#
#  deal.II configuration:
#CMAKE_BUILD_TYPE:   DebugRelease
#BUILD_SHARED_LIBS:  ON
#CMAKE_INSTALL_PREFIX:   /usr/local
#CMAKE_SOURCE_DIR:   /home/animesh/Documents/dealii/dealii-9.2.0
#(version 9.2.0)
#CMAKE_BINARY_DIR:   /home/animesh/Documents/dealii/dealii-9.2.0
#CMAKE_CXX_COMPILER: GNU 7.5.0 on platform Linux x86_64
#/usr/bin/c++
#CMAKE_C_COMPILER:   /usr/bin/cc
#CMAKE_GENERATOR:Unix Makefiles
#
#  Base configuration (prior to feature configuration):
#DEAL_II_CXX_FLAGS:-pedantic -fPIC -Wall -Wextra -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wsuggest-override -Wswitch -Wsynth -Wwrite-strings -Wno-placement-new -Wno-deprecated-declarations -Wno-literal-suffix -Wno-psabi -fopenmp-simd -std=c++17
#DEAL_II_CXX_FLAGS_RELEASE:-O2 -funroll-loops -funroll-all-loops -fstrict-aliasing -Wno-unused-local-typedefs
#DEAL_II_CXX_FLAGS_DEBUG:  -O0 -ggdb -Wa,--compress-debug-sections
#DEAL_II_LINKER_FLAGS: -Wl,--as-needed -rdynamic -fuse-ld=gold
#DEAL_II_LINKER_FLAGS_RELEASE: 
#DEAL_II_LINKER_FLAGS_DEBUG:   -ggdb
#DEAL_II_DEFINITIONS:  
#DEAL_II_DEFINITIONS_RELEASE:  
#DEAL_II_DEFINITIONS_DEBUG:DEBUG
#DEAL_II_USER_DEFINITIONS: 
#DEAL_II_USER_DEFINITIONS_REL: 
#DEAL_II_USER_DEFINITIONS_DEB: DEBUG
#DEAL_II_INCLUDE_DIRS  
#DEAL_II_USER_INCLUDE_DIRS:
#DEAL_II_BUNDLED_INCLUDE_DIRS: 
#DEAL_II_LIBRARIES:
#DEAL_II_LIBRARIES_RELEASE:
#DEAL_II_LIBRARIES_DEBUG:  
#DEAL_II_VECTORIZATION_WIDTH_IN_BITS: 128
#
#  Configured Features (DEAL_II_ALLOW_BUNDLED = ON, DEAL_II_ALLOW_AUTODETECTION = ON):
#  ( DEAL_II_WITH_64BIT_INDICES = OFF )
#  ( DEAL_II_WITH_ADOLC = OFF )
#  ( DEAL_II_WITH_ARPACK = OFF )
#  ( DEAL_II_WITH_ASSIMP = OFF )
#DEAL_II_WITH_BOOST set up with bundled packages
#BOOST_CXX_FLAGS = -Wno-unused-local-typedefs
#BOOST_DEFINITIONS = BOOST_NO_AUTO_PTR
#BOOST_USER_DEFINITIONS = BOOST_NO_AUTO_PTR
#BOOST_BUNDLED_INCLUDE_DIRS = /home/animesh/Documents/dealii/dealii-9.2.0/bundled/boost-1.70.0/include
#BOOST_LIBRARIES = rt
#DEAL_II_WITH_COMPLEX_VALUES = ON
#  ( DEAL_II_WITH_CUDA = OFF )
#DEAL_II_WITH_CXX14 = ON
#DEAL_II_WITH_CXX17 = ON
#  ( DEAL_II_WITH_GINKGO = OFF )
#  ( DEAL_II_WITH_GMSH = OFF )
#  ( DEAL_II_WITH_GSL = OFF )
#  ( DEAL_II_WITH_HDF5 = OFF )
#DEAL_II_WITH_LAPACK set up with external dependencies
#LAPACK_WITH_64BIT_BLAS_INDICES = OFF
#LAPACK_LINKER_FLAGS = 
#LAPACK_INCLUDE_DIRS = 
#L

[deal.II] Regarding configuring with UMFPACK for Quasi-Static Strain Compressible Elasticity program

2020-09-12 Thread Animesh Rastogi IIT Gandhinagar
Hello dealii Community, 

I wish to run the program - Quasi-Static Finite-Strain Compressible 
Elasticity. 


This requires the dealii to be configured with UMFPACK. For this, I 
installed the SuiteSparse with UMFPACK, compiled it, and then reconfigured 
and reinstalled dealii using the command -DUMFPACK_DIR=/path/to/umfpack 
(changing the path to the compiled version of UMFPACK in my PC) with cmake.

However, I am still getting the following error when I am running the 
Finite Strain program.

An error occurred in line <635> of file 
 
in function
void dealii::SparseDirectUMFPACK::factorize(const Matrix&) [with Matrix 
= dealii::SparseMatrix]
The violated condition was: 
false
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.

Could someone please let me know how should I sort it out?

Also, do I need to reinstall dealii everytime I realise that I have not 
configured dealii with a particular package?

Thanks!

Animesh

-- 
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/c95f665a-bfa1-49f8-90f6-a7b57071ff98n%40googlegroups.com.


Re: [deal.II] Can not access the files for Quasi-Static Finite-Strain Compressible Elasticity program

2020-09-10 Thread Animesh Rastogi IIT Gandhinagar
Thank you for the GitHub link. I will download the files from there..

Animesh

On Friday, September 11, 2020 at 12:34:41 AM UTC+5:30 Jean-Paul Pelteret 
wrote:

> Timo, I think that what Animesh is referring to relates to this issue: 
> https://github.com/dealii/dealii/issues/10295 None of the hyperlinks 
> inside the code gallery documentation are working.
>
> J-P
>
> On 10 Sep 2020, at 20:25, Timo Heister  wrote:
>
> Take a look at this repository:
> https://github.com/dealii/code-gallery
>
> All files should be in there.
>
> On Thursday, September 10, 2020 at 2:08:50 PM UTC-4 
> animesh...@alumni.iitgn.ac.in wrote:
>
>>  Dear All,
>>
>> I can not access the Readme, parameters and other files from the code 
>> gallery program Quasi-Static Finite-Strain Compressible Elasticity. 
>> 
>>
>> Could someone let me know how to access them? On clicking, it is showing 
>> "Not found" error.
>>
>> Thanks!
>>
>> Animesh
>>
>
> -- 
> 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/fe137534-43d4-417d-9b91-1ab727ecaf25n%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/7331ce71-c9ea-499d-96b0-8046daeece60n%40googlegroups.com.


[deal.II] Can not access the files for Quasi-Static Finite-Strain Compressible Elasticity program

2020-09-10 Thread Animesh Rastogi IIT Gandhinagar
 Dear All,

I can not access the Readme, parameters and other files from the code 
gallery program Quasi-Static Finite-Strain Compressible Elasticity. 


Could someone let me know how to access them? On clicking, it is showing 
"Not found" error.

Thanks!

Animesh

-- 
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/8b459719-c30a-4a64-9406-a98d8476572fn%40googlegroups.com.