Re: [deal.II] compress error for vector of PETScWrappers::MPI::SparseMatrix

2017-06-07 Thread Weixiong Zheng
Daniel and Dr Bangerth,

Thanks for the help. I got it resolved with modifying the dsp.

That does be my misunderstanding, hahaha.

Best,
Weixiong

在 2017年6月7日星期三 UTC-7上午10:33:57,Wolfgang Bangerth写道:
>
> On 06/07/2017 11:14 AM, Weixiong Zheng wrote: 
> > 
> > I see your point. I would double check later. The reason I didn't use 
> locally 
> > relevant dofs is I didn't design the code to do h-refinement so I didn't 
> see 
> > points using relevant dofs. 
>
> Then you misunderstand the difference between locally active and locally 
> relevant dofs :-) The difference has nothing to do with h-refinement. 
>
> 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.
For more options, visit https://groups.google.com/d/optout.


Re: [deal.II] compress error for vector of PETScWrappers::MPI::SparseMatrix

2017-06-07 Thread Wolfgang Bangerth

On 06/07/2017 11:14 AM, Weixiong Zheng wrote:


I see your point. I would double check later. The reason I didn't use locally 
relevant dofs is I didn't design the code to do h-refinement so I didn't see 
points using relevant dofs.


Then you misunderstand the difference between locally active and locally 
relevant dofs :-) The difference has nothing to do with h-refinement.


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.


Re: [deal.II] compress error for vector of PETScWrappers::MPI::SparseMatrix

2017-06-07 Thread Weixiong Zheng
Daniel,

I see your point. I would double check later. The reason I didn't use 
locally relevant dofs is I didn't design the code to do h-refinement so I 
didn't see points using relevant dofs.

Thanks,
Weixiong

在 2017年6月7日星期三 UTC-7上午6:35:44,Daniel Arndt写道:
>
> Weixiong,
>
> [...]
>> SparsityTools::distribute_sparsity_pattern (dsp,
>> 
>> dof_handler.n_locally_owned_dofs_per_processor (),
>> mpi_communicator,
>>locally_owned_dofs);
>>
> This looks a bit suspicious. Normally, you should use the set of locall 
> relevant dofs here [1].
> You also might want to compare with step-40 [2].
>
> Best,
> Daniel
>
> [1] 
> https://www.dealii.org/8.5.0/doxygen/deal.II/namespaceSparsityTools.html#ae2c7bdbdb62642f60d60087e4cb6195f
> [2] 
> https://www.dealii.org/8.5.0/doxygen/deal.II/step_40.html#LaplaceProblemsetup_system
>
> [1] 
>
>

-- 
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] compress error for vector of PETScWrappers::MPI::SparseMatrix

2017-06-07 Thread Daniel Arndt
Weixiong,

[...]
> SparsityTools::distribute_sparsity_pattern (dsp,
> 
> dof_handler.n_locally_owned_dofs_per_processor (),
> mpi_communicator,
>locally_owned_dofs);
>
This looks a bit suspicious. Normally, you should use the set of locall 
relevant dofs here [1].
You also might want to compare with step-40 [2].

Best,
Daniel

[1] 
https://www.dealii.org/8.5.0/doxygen/deal.II/namespaceSparsityTools.html#ae2c7bdbdb62642f60d60087e4cb6195f
[2] 
https://www.dealii.org/8.5.0/doxygen/deal.II/step_40.html#LaplaceProblemsetup_system

[1] 

-- 
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] GridGenerator::extract_boundary_mesh for parallel::shared::Triangulation

2017-06-07 Thread Alberto Salvadori
Hi all,

I am trying to reproduce the code in Step 38 that extracts the boundary 
mesh, but I'd love to use a parallel::shared::Triangulation rather than a 
Triangulation 
 
class. In a nutshell, I did this:



template 

class SmallStrainBeltramiDiffusionAndMechanicalProblem

{

 

public:

  [ ... ]

private:

  [ ... ]

  // Surface manifold dimension


  static const unsigned int manifold_dim = dim-1;


  // FEM member variables  

  parallel::shared::Triangulation   triangulation;

  parallel::shared::Triangulation   
manifold_triangulation;

  DoFHandler  dof_handler;

  DoFHandler  manifold_dof_handler;

  MappingQmanifold_mapping;


[ ... ]
}


template 

void SmallStrainBeltramiDiffusionAndMechanicalProblem::create_coarse_grid 
( bool neumann )

{

 

  const Point center;


  GridGenerator::hyper_ball (triangulation, center, 1.);

  triangulation.refine_global ( 6 ); 

  GridGenerator::extract_boundary_mesh (triangulation, 
manifold_triangulation); //, boundary_ids);

[ ...] 


}

  
I got this error message:

**

*An error occurred in line <220> of file 
<../source/distributed/tria_base.cc> in function*

*virtual types::subdomain_id dealii::parallel::Triangulation<1, 
2>::locally_owned_subdomain() const*

*The violated condition was: *

*dim > 1*

*The name and call sequence of the exception was:*

*ExcNotImplemented()*

*Additional Information: *

*You are trying to use functionality in deal.II that is currently not 
implemented. In many cases, this indicates that there simply didn't appear 
much of a need for it, or that the author of the original code did not have 
the time to implement a particular case. If you hit this exception, it is 
therefore worth the time to look into the code to find out whether you may 
be able to implement the missing functionality. If you do, please consider 
providing a patch to the deal.II development sources (see the deal.II 
website on how to contribute).*


*Stacktrace:*

*---*

*#0  2   libdeal_II.g.8.4.1.dylib0x000108b2c3f7 
_ZNK6dealii8parallel13TriangulationILi1ELi2EE23locally_owned_subdomainEv + 
231: 2   libdeal_II.g.8.4.1.dylib0x000108b2c3f7 
_ZNK6dealii8parallel13TriangulationILi1ELi2EE23locally_owned_subdomainEv *

*#1  3   libdeal_II.g.8.4.1.dylib0x0001081ce7f1 
_ZNK6dealii12CellAccessorILi1ELi2EE8is_ghostEv + 577: 3   
libdeal_II.g.8.4.1.dylib0x0001081ce7f1 
_ZNK6dealii12CellAccessorILi1ELi2EE8is_ghostEv *

*#2  4   libdeal_II.g.8.4.1.dylib0x000108b2cb8f 
_ZN6dealii8parallel13TriangulationILi1ELi2EE19update_number_cacheEv + 1455: 
4   libdeal_II.g.8.4.1.dylib0x000108b2cb8f 
_ZN6dealii8parallel13TriangulationILi1ELi2EE19update_number_cacheEv *

*#3  5   libdeal_II.g.8.4.1.dylib0x000108b33f6d 
_ZN6dealii8parallel6shared13TriangulationILi1ELi2EE20create_triangulationERKNSt3__16vectorINS_5PointILi2EdEENS4_9allocatorIS7_RKNS5_INS_8CellDataILi1EEENS8_ISE_RKNS_11SubCellDataE
 
+ 413: 5   libdeal_II.g.8.4.1.dylib0x000108b33f6d 
_ZN6dealii8parallel6shared13TriangulationILi1ELi2EE20create_triangulationERKNSt3__16vectorINS_5PointILi2EdEENS4_9allocatorIS7_RKNS5_INS_8CellDataILi1EEENS8_ISE_RKNS_11SubCellDataE
 *

*#4  6   libdeal_II.g.8.4.1.dylib0x000107c383b9 
_ZN6dealii13GridGenerator21extract_boundary_meshINS_8parallel6shared13TriangulationELi2ELi2EEENSt3__13mapINT_IXmiT0_Li1EEXT1_EE13cell_iteratorENS7_IXT0_EXT1_EE13face_iteratorENS5_4lessIS9_EENS5_9allocatorINS5_4pairIKS9_SB_EERKSA_RS8_RKNS5_3setIhNSC_IhEENSE_Ih
 
+ 4537: 6   libdeal_II.g.8.4.1.dylib0x000107c383b9 
_ZN6dealii13GridGenerator21extract_boundary_meshINS_8parallel6shared13TriangulationELi2ELi2EEENSt3__13mapINT_IXmiT0_Li1EEXT1_EE13cell_iteratorENS7_IXT0_EXT1_EE13face_iteratorENS5_4lessIS9_EENS5_9allocatorINS5_4pairIKS9_SB_EERKSA_RS8_RKNS5_3setIhNSC_IhEENSE_Ih
 *

*#5  7   heat-eq 0x000100058754 
_ZN20SmallStrainMechanics48SmallStrainBeltramiDiffusionAndMechanicalProblemILi2EE18create_coarse_gridEb
 
+ 196: 7   heat-eq 0x000100058754 
_ZN20SmallStrainMechanics48SmallStrainBeltramiDiffusionAndMechanicalProblemILi2EE18create_coarse_gridEb
 *

*#6  8   heat-eq 0x00010005432f 
_ZN20SmallStrainMechanics48SmallStrainBeltramiDiffusionAndMechanicalProblemILi2EE16do_timestep_zeroEjPK26TimeIntegrationDataManagerb
 
+ 191: 8   heat-eq 0x00010005432f 
_ZN20SmallStrainMechanics48SmallStrainBeltramiDiffusionAndMechanicalProblemILi2EE16do_timestep_zeroEjPK26TimeIntegrationDataManagerb
 *

*#7  9   heat-eq 0x0001000343cd 
_ZN20SmallStrainMechanics48SmallStrainBeltramiDiffusionAndMechanicalProblemILi2EE3runEjb
 
+ 717: 9  

Re: [deal.II] Re: Problem with postprocessor

2017-06-07 Thread Thomas Wick

Hi Seyed,

I am old-fashioned in this sense: indeed yes, I just plot the output 
into a file:


make run | tee my_results.txt

Then I `grep' the quantity (for example PStress) that I want and then 
plot with gnuplot.


Of course it would be a bit more efficient to write all output of 
interest directly into
a file. Honestly this is not so difficult either with deal.II functions 
or directly

C++ (fstream, write, etc.).

In step-7 you will get an idea how to use deal.II functions for latex 
output.


Best Thomas


On 06/07/2017 12:26 PM, 'Seyed Ali Mohseni' via deal.II User Group wrote:

Dear Thomas,

Would you be so kind to tell me how am I able to create the 
load-displacement curves like in your paper? Did you use gnuplot?
And does deal.II have a built-in function that allows one to output 
the necessary data directly to gnuplot or to a textfile?


Thank you in advance.

Kind regards,
Seyed Ali
--
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.


--
++++
Dr. Thomas Wick
Maitre de conferences / Assistant Professor

Centre de Mathematiques Appliquees (CMAP)
Ecole Polytechnique
91128 Palaiseau cedex, France

Email:  thomas.w...@cmap.polytechnique.fr
Phone:  0033 1 69 33 4579
www:http://www.cmap.polytechnique.fr/~wick/
++++
--

--
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: Problem with postprocessor

2017-06-07 Thread 'Seyed Ali Mohseni' via deal.II User Group
Dear Thomas,

Would you be so kind to tell me how am I able to create the 
load-displacement curves like in your paper? Did you use gnuplot?
And does deal.II have a built-in function that allows one to output the 
necessary data directly to gnuplot or to a textfile?

Thank you in advance.

Kind regards,
Seyed Ali

-- 
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.