Re: [deal.II] Solving a system defined up to a constant (stabilized Navier-Stokes pressure definition)

2019-03-07 Thread Wolfgang Bangerth
On 3/7/19 7:45 AM, Bruno Blais wrote:
> 
> However, my GMRES stops very quickly after a certain number of newton 
> iteration with the following :     AztecOO::Iterate error code -4: GMRES 
> Hessenberg ill-conditioned

This is surprising and suggests that something is wrong with the matrix, not 
the right hand side. At least that's what I think this probably means. Did you 
have the same error when you did not modify the right hand side? What happens 
if you just artificially create a right hand side that you know is in the 
range, for example by picking a random vector and multiplying it by the matrix?

Best
  W.

-- 

Wolfgang Bangerth  email: bange...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[deal.II] deal.II Newsletter #70

2019-03-07 Thread Rene Gassmoeller
Hello everyone!

This is deal.II newsletter #70.
It automatically reports recently merged features and discussions about the 
deal.II finite element library.


## Below you find a list of recently proposed or merged features:

#7787: add and use type traits for data exchange in matrix-free (proposed by 
davydden) https://github.com/dealii/dealii/pull/7787

#7786: Type to string. (proposed by luca-heltai) 
https://github.com/dealii/dealii/pull/7786

#7785: Fix a bug in cuda add_and_dot (proposed by Rombur) 
https://github.com/dealii/dealii/pull/7785

#7783: Fix file name date in two changelog entries (proposed by kronbichler; 
merged) https://github.com/dealii/dealii/pull/7783

#7782: add and use more type traits in FEEvaluation (proposed by davydden; 
merged) https://github.com/dealii/dealii/pull/7782

#7781: Two small manifold fixes (proposed by kronbichler; merged) 
https://github.com/dealii/dealii/pull/7781

#: Introduced p-refinement and p-coarsening flags. (proposed by 
marcfehling) https://github.com/dealii/dealii/pull/

#7776: Signals for p::d::Triangulation::repartition. (proposed by marcfehling) 
https://github.com/dealii/dealii/pull/7776

#7775: Fix inteference if material_id with the manifold object in the 
codimension case (proposed by masterleinad; merged) 
https://github.com/dealii/dealii/pull/7775

#7773: hp::DoFHandler::ActiveFEIndicesTransfer: Separate work from memory 
management (proposed by marcfehling; merged) 
https://github.com/dealii/dealii/pull/7773

#7772: work around gcc 4.8.5 behavior in GridTools::Cache (proposed by tjhei; 
merged) https://github.com/dealii/dealii/pull/7772

#7770: Convert a few explicit loops to range-based for loops. (proposed by 
bangerth; merged) https://github.com/dealii/dealii/pull/7770

#7769: Out of date description of quadrature_point_data test fixed (proposed by 
rezarastak; merged) https://github.com/dealii/dealii/pull/7769

#7768: SparsityPattern::Iterator - add a constructor for initalizing an 
iterator from an accessor (proposed by tamiko; merged) 
https://github.com/dealii/dealii/pull/7768

#7767: Added hierarchy to hp::FECollection. (proposed by marcfehling; merged) 
https://github.com/dealii/dealii/pull/7767

#7717: Added 'set_fe' functionality to DoFHandlers. (proposed by marcfehling; 
merged) https://github.com/dealii/dealii/pull/7717

#7716: hp::DoFHandler: Moved containers with temporary content into a dedicated 
structure (proposed by marcfehling; merged) 
https://github.com/dealii/dealii/pull/7716

#7180: Implement TpetraWrappers::Vector (proposed by masterleinad; merged) 
https://github.com/dealii/dealii/pull/7180


## And this is a list of recently opened or closed discussions:

#7788: intel warning in patterns.h (opened) 
https://github.com/dealii/dealii/issues/7788

#7784: LA::d::Vector ghost exchange on a subset of ghost DoFs (opened) 
https://github.com/dealii/dealii/issues/7784

#7780: Use libraries that support task migration (opened) 
https://github.com/dealii/dealii/issues/7780

#7779: Don't check for noexcept for move constructors in clang-tidy CI task 
(opened) https://github.com/dealii/dealii/issues/7779

#7778: Tutorial graph is no longer built (opened and closed) 
https://github.com/dealii/dealii/issues/7778

#7774: Linker error: undefined referent to 'pdsyevr_' and 'pssyevr_' (opened) 
https://github.com/dealii/dealii/issues/7774

#7771: Compile error with function compute_bounding_box on GCC 4.8.5 (opened 
and closed) https://github.com/dealii/dealii/issues/7771

#7761: Problem with mesh refinement in 3d codim 1 case (closed) 
https://github.com/dealii/dealii/issues/7761

#7706: Move 'hp::dh::*_active_fe_transfer()' functions to 'DoFHandlerPolicy' 
(closed) https://github.com/dealii/dealii/issues/7706

#7671: Request: hp::DoFHandler::set_fe() (closed) 
https://github.com/dealii/dealii/issues/7671

#7546: Build issues: Intel 2019 and Boost (closed) 
https://github.com/dealii/dealii/issues/7546


A list of all major changes since the last release can be found at 
https://www.dealii.org/developer/doxygen/deal.II/changes_after_8_5_0.html.


Thanks for being part of the community!


Let us know about questions, problems, bugs or just share your experience by 
writing to dealii@googlegroups.com, or by opening issues or pull requests at 
https://www.github.com/dealii/dealii.
Additional information can be found at https://www.dealii.org/.

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[deal.II] Re: deal.ii installation error_through Spack on Ubuntu

2019-03-07 Thread Behrooz Karami
Thanks very much. It worked perfectly!
Best,
Behrooz

On Wednesday, March 6, 2019 at 4:21:42 PM UTC+1, Bruno Turcksin wrote:
>
> BK,
>
> On Wednesday, March 6, 2019 at 10:15:10 AM UTC-5, Behrooz Karami wrote:
>>
>> I was trying to install deal.ii on Ubuntu 18 using Spack.
>> But Ubuntu freezes and after a long time I receive a long log error as 
>> attached.
>>
> Your computer does not have enough memory to compile deal.II with 8 
> processors. It should work if you compile it in parallel (spack install 
> -j1). 
>
> 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.
For more options, visit https://groups.google.com/d/optout.


Re: [deal.II] Solving a system defined up to a constant (stabilized Navier-Stokes pressure definition)

2019-03-07 Thread Bruno Blais
Dear Wolfgang,
Sorry for an additional question.
I have tried to implement by myself something similar to what is done in 
ASPECT (I guess?, it is a bit harder for me to grasp ASPECT concepts 
because of the introspection and etc.).
However, I seem to have failed miserably at one point.
My understanding is that I can get
   A x = f- Pf

By:
- First I calculate my projection operator. It is the integral of the 
pressure shape function over ALL elements associated with a DOF. I 
calculate it by looping over the elements and integrating with a quadrature 
(see code below)
- Then I assemble my system and my right-hand side as usual
- Before I solve my linear system, I modify my Right-hand-side so that it 
does not include the constant mode. I litteraly calculate f= f- Pf
- I solve my linear system for this new RHS.

However, my GMRES stops very quickly after a certain number of newton 
iteration with the following : AztecOO::Iterate error code -4: GMRES 
Hessenberg ill-conditioned
Clearly I am doing something wrong / I understood something wrong regarding 
this, because I know the rest of my code works.
In my system there is no block matrices and everything is lumped in the 
same matrix. I havent re-ordered by components either.

Calculation of the projection:
template 
void
GLSNavierStokesSolver::initializePressureRHSCorrection()
{
  TimerOutput::Scope t(computing_timer, "pressure_RHS_projector");
  pressure_shape_function_integrals=0;
  QGauss   quadrature_formula(degreeQuadrature_);
  FEValues fe_values (fe,
   quadrature_formula,
   update_values |
   update_quadrature_points |
   update_JxW_values );

  const unsigned intdofs_per_cell = fe.dofs_per_cell;
  const unsigned intn_q_points= quadrature_formula.
size();
  const FEValuesExtractors::Scalar  pressure (dim);
  Vector   
 local_pressure_shape_function_integrals(dofs_per_cell);
  std::vector  local_dof_indices (dofs_per_cell);


  typename DoFHandler::active_cell_iterator
  cell = dof_handler.begin_active(),
  endc = dof_handler.end();
  for (; cell!=endc; ++cell)
{
  if (cell->is_locally_owned())
{
  fe_values.reinit(cell);
  local_pressure_shape_function_integrals=0;
  for (unsigned int i=0; iget_dof_indices (local_dof_indices);
  zero_constraints.distribute_local_to_global(
local_pressure_shape_function_integrals,
  local_dof_indices,
  
pressure_shape_function_integrals);
}
}
  pressure_shape_function_integrals.compress (VectorOperation::add);
}


Projection of the System RHS onto it's space without the constant:
template 
void GLSNavierStokesSolver::correctRHSClosedSystem()
{


  // calculate projection of system_rhs on pressure_shape_function_integrals
  for (unsigned int dof_i=0 ; dof_i < pressure_shape_function_integrals.size
() ; ++dof_i)
pressure_projection[dof_i] = pressure_shape_function_integrals[dof_i]*
system_rhs[dof_i];

  // Add it to RHS
  system_rhs.add(-1.,pressure_projection);
}


Thank you again for everything,
This is greatly appreciated.
Bruno


On Tuesday, 5 March 2019 16:10:09 UTC-5, Wolfgang Bangerth wrote:
>
>
> > A quick question. I think I understand what is done in 
> > 
> https://github.com/geodynamics/aspect/blob/master/source/simulator/helper_functions.cc#L1041
>  
> > Weirdfully, I found the "pickaxe" version easier to understand (Love the 
> > comments by the way, this is awesome) 
>
> :-) I suspect that Timo gets credit for that one! 
>
>
> > A question I have is related to the _pressure_shape_function_integrals_ 
> member. 
> > My understanding is that this is the integration over the element cellI 
> of the 
> > shape function associated with pressure. 
>
> I believe it's actually the integral over all cells the shape function is 
> associated with. 
>
>
> > However, I have looked over the ASPECT documentation and I have not been 
> able 
> > to find where this is implemented. Is it a vector that is manually 
> filled or 
> > is there a helper function that can be used to automatically generate 
> it? 
>
> Yes, that required a bit of searching. This is filled here: 
>
> https://github.com/geodynamics/aspect/blob/master/source/simulator/assemblers/stokes.cc#L601
>  
>
> 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 unsubsc