[deal.II] Step 14 - Comparing refinement criteria

2017-10-23 Thread Ehsan
Hello,

In the Step-14, I would like to compare the different refinement criteria; 
Therefore I changed the mesh refinement criterion variable in the main 
program.
But when I run the code, it only gives the point values and doe not 
calculate |J(e)|.

Can you please guide me to solve this problem.

Best regards.
Ehsan


-- 
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] Output the results at Gauss points

2017-10-10 Thread Ehsan
Hello,

Is there a way to output the results at Gauss points to visualize it in 
VisIt or Paraview or Tecplot?
(For example extract the displacement or stresses)

Best regards.
Ehsan

-- 
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] Extracting results along line or surface

2017-07-28 Thread Ehsan
Hello,

I solved a problem by deal ii in 2D and 3D and calculated displacements and 
stressed.
I use VisIt to visualize the displacement and stress outputs in the hole 
domain.

Now I have problem extracting data, and I would appreciate it if someone 
helps me.
In a *2D/3D* problem, I want to extract and plot results (e.g. displacements 
or stresses) along a *Line/Surface* (straight or curved).

It is not important for me, how to do it, using deal ii or VisIt . I mean 
if extracting these data using VisIt features need less effort it is also 
ok for me.

Thanks.
Ehsan



-- 
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] 3D mesh with CAD boundary

2017-02-24 Thread Ehsan Nedaaee
Dear Dealii Users

I am going to numerically solve a system of PDEs in a 3D domain with 
complex boundaries. The 
domain is plotted using CAD, and I would like to import such domain into 
dealii, then using deal 
procedures to make 3D mesh and refine it. I think I should first generate a 
mesh on the boundaries 
of the domain then extrude a 3D mesh using them. I am going to do that but 
because I am new with dealii,
I face some difficulties. It would be nice if I could have a sample code 
which 
do something like this, in order to learn how to fix my problems.

Thank you in advance

Ehsan 

-- 
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: Tensor Output

2017-01-09 Thread Ehsan
Dear Daniel,
Thanks for your reply.

In my code first I calculate displacements (uh) then in each cell at the 
q_points I calculate S_xx, S_xy, S_yy stress components and project them to 
the nodes and with a averaging method calculate stress nodal values.

Now I want to calculate stress components in polar coordinates.
I would like to send Sigma_xx, Sigma_xy and Sigma_yy to DataPostprocessor 
class and inside compute_derived_quantities_vector calculate S_rr.

Best regards.
Ehsan


On Friday, January 6, 2017 at 3:10:56 PM UTC+1, Ehsan wrote:
>
> Hello,
>
> I have two questions related to DataPostprocessor class, 
> compute_derived_quantities_vector method and add_data_vector.
> I would appreciate it if someone help me and explain them to me.
>
> 1- As far as I tested and understood, when we write data_out.add_data_vector 
> (solver.solution, Ur); we pass a solution vector which has 
> dof_handler.n_dofs() members to add_data_vector and then inside 
> compute_derived_quantities_vector method when I print uh the values 
> relate to the solution values of each cell. 
> For example if we use 4 node elements with 2 dofs on each node and we have 
> totally 125 nodes the size of the vector solution is 375 but uh is a 
> matrix with the size of 4 x 2.
>
> Do I understand it correctly?
> Does data_out.add_data_vector (solver.solution or add_data_vector extract 
> nodal values of each cell from solution vector?
> Is there any cell iterator defined inside these functions or inside a 
> relater function to take care of the cell sequence? If yes, where is it 
> defined?
>
> 2- I want to calculate Sigma_rr and then output it. So inside 
> compute_derived_quantities_scalar I need Sigma_xx, Sigma_xy and Sigma_yy 
> to calculate Sigma_rr.
> Is there any way to pass a tensor or vector of vectors to add_data_vector, 
> because it seems that it only accepts a vector of scalars?
>
> Best regards.
> Ehsan
>

-- 
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] Tensor Output

2017-01-06 Thread Ehsan
Hello,

I have two questions related to DataPostprocessor class, 
compute_derived_quantities_vector method and add_data_vector.
I would appreciate it if someone help me and explain them to me.

1- As far as I tested and understood, when we write data_out.add_data_vector 
(solver.solution, Ur); we pass a solution vector which has 
dof_handler.n_dofs() members to add_data_vector and then inside 
compute_derived_quantities_vector method when I print uh the values relate 
to the solution values of each cell. 
For example if we use 4 node elements with 2 dofs on each node and we have 
totally 125 nodes the size of the vector solution is 375 but uh is a matrix 
with the size of 4 x 2.

Do I understand it correctly?
Does data_out.add_data_vector (solver.solution or add_data_vector extract 
nodal values of each cell from solution vector?
Is there any cell iterator defined inside these functions or inside a 
relater function to take care of the cell sequence? If yes, where is it 
defined?

2- I want to calculate Sigma_rr and then output it. So inside 
compute_derived_quantities_scalar I need Sigma_xx, Sigma_xy and Sigma_yy to 
calculate Sigma_rr.
Is there any way to pass a tensor or vector of vectors to add_data_vector, 
because it seems that it only accepts a vector of scalars?

Best regards.
Ehsan

-- 
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] PARPACK issues

2016-09-19 Thread Ehsan Mihankhah
Hi,

I have been working with Dealii 8.3 for a while and I have been using the 
modified version of step-36 to solve eigenvalue problem with ARPACK. I 
noticed that there is a possibility of working with PARPACK in Dealii 8.4 
and so I upgraded to this version.
I am trying to get the codes in 
https://github.com/dealii/dealii/tree/master/tests/arpack
running with MPI and PETSc variables.
I managed to compile the sample codes but the problem is that when I run 
the code I receive errors from ARPACK referring to "info=-9" in Pdnaupd. 
and following "info=-9" I see the error is about initial vector being zero 
and I cannot solve this problem by tuning any parameter it seems.
Can anybody suggest a solution please?

Thank you very much,
Best regards,
Ehsan,

P.S: One important issue here is that the parpack_solver.h that comes with 
the package available on dealii website is not the one on the github and 
therefore it does not recognize some of the functions. So, I copied the 
version which is available on the github in order to be able to get the 
codes compiled.

-- 
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] Step-42 -- Problem with Trilinos and P4EST

2016-08-03 Thread Ehsan
Finally I found the problem after installing and uninstalling for more than 
ten times.
The problem was the space after "=" !!
There should be NO space before and after "=" in setting cmake variable.


On Monday, August 1, 2016 at 3:49:56 PM UTC+2, Jean-Paul Pelteret wrote:
>
> Dear Eshan,
>
> Sometimes it is necessary to manually remove CMakeCache.txt before 
> reconfiguring a project. Can you try to do this and see if you have any 
> further success?
>
> Regards,
> J-P
>
> On Monday, August 1, 2016 at 2:42:25 PM UTC+2, Ehsan wrote:
>>
>> Dear Daniel,
>> I checked the "detailed.log" file and noticed that DEAL_II_WITH_MPI, 
>> DEAL_II_WITH_P4EST and DEAL_II_WITH_TRILINOS all three are off.
>> my cmake is:
>> cmake 
>> -DCMAKE_INSTALL_PREFIX=/home/General_for_All_Users/deal_II_install_dir 
>> -DDEAL_II_WITH_64BIT_INDICES= ON 
>> -DDEAL_II_WITH_MPI= ON 
>> -DDEAL_II_WITH_P4EST= ON 
>> -DDEAL_II_WITH_TRILINOS= ON 
>> -DP4EST_DIR=/home/General_for_All_Users/P4EST_install_dir/ 
>> -DTRILINOS_DIR=/home/General_for_All_Users/Trilinos_install_dir/trilinos_path/
>>  
>>
>> ..
>>
>> I also attached the detailed.log file.
>> When I put -DCMAKE_INSTALL_PREFIX before options related to MPI, P4EST 
>> and TRILINOS, it is implemented.
>> So something is wrong with setting MPI, P4EST or TRILINOS but I do not 
>> know what !!!
>>
>> best regards.
>> Ehsan
>>
>>
>> On Monday, August 1, 2016 at 2:32:22 PM UTC+2, Ehsan wrote:
>>>
>>> Dear Daniel,
>>>
>>> When I run cmake in terminal and the end I receive below warning:
>>>
>>> CMake Warning:
>>>   Manually-specified variables were not used by the project:
>>>
>>> P4EST_DIR
>>> TRILINOS_DIR
>>>
>>> How should I solve this problem.
>>> Best regards.
>>> Ehsan
>>>
>>> On Monday, August 1, 2016 at 2:21:31 PM UTC+2, Ehsan wrote:
>>>>
>>>> Dear Daniel,
>>>>
>>>> In the "detailed.log" the "CMAKE_INSTALL_PREFIX:" is empty but I am 
>>>> sure that I defined it in cmake:
>>>> I have a generat question.
>>>> is it possible to compile deal ii with enabled Trilinos, P4EST, and MPI 
>>>> options?
>>>>
>>>> Best regards.
>>>> Ehsan
>>>>
>>>>
>>>>
>>>> On Wednesday, July 27, 2016 at 8:52:36 PM UTC+2, Daniel Arndt wrote:
>>>>>
>>>>> Ehsan,
>>>>>
>>>>> can you show us what your "detailed.log" in the build directory looks 
>>>>> like?
>>>>> This file stores the configuration that is used for building deal.II.
>>>>> ` -DCMAKE_INSTALL_PREFIX= /home/General_for_All_Users/
>>>>> deal_II_install_dir` should tell deal.II to copy the build library 
>>>>> into that folder
>>>>> when you are invoking `$make install`.
>>>>>
>>>>> 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.
For more options, visit https://groups.google.com/d/optout.


Re: [deal.II] Step-42 -- Problem with Trilinos and P4EST

2016-08-01 Thread Ehsan
Dear Daniel,
I checked the "detailed.log" file and noticed that DEAL_II_WITH_MPI, 
DEAL_II_WITH_P4EST and DEAL_II_WITH_TRILINOS all three are off.
my cmake is:
cmake 
-DCMAKE_INSTALL_PREFIX=/home/General_for_All_Users/deal_II_install_dir 
-DDEAL_II_WITH_64BIT_INDICES= ON 
-DDEAL_II_WITH_MPI= ON 
-DDEAL_II_WITH_P4EST= ON 
-DDEAL_II_WITH_TRILINOS= ON 
-DP4EST_DIR=/home/General_for_All_Users/P4EST_install_dir/ 
-DTRILINOS_DIR=/home/General_for_All_Users/Trilinos_install_dir/trilinos_path/ 

..

I also attached the detailed.log file.
When I put -DCMAKE_INSTALL_PREFIX before options related to MPI, P4EST and 
TRILINOS, it is implemented.
So something is wrong with setting MPI, P4EST or TRILINOS but I do not know 
what !!!

best regards.
Ehsan


On Monday, August 1, 2016 at 2:32:22 PM UTC+2, Ehsan wrote:
>
> Dear Daniel,
>
> When I run cmake in terminal and the end I receive below warning:
>
> CMake Warning:
>   Manually-specified variables were not used by the project:
>
> P4EST_DIR
> TRILINOS_DIR
>
> How should I solve this problem.
> Best regards.
> Ehsan
>
> On Monday, August 1, 2016 at 2:21:31 PM UTC+2, Ehsan wrote:
>>
>> Dear Daniel,
>>
>> In the "detailed.log" the "CMAKE_INSTALL_PREFIX:" is empty but I am sure 
>> that I defined it in cmake:
>> I have a generat question.
>> is it possible to compile deal ii with enabled Trilinos, P4EST, and MPI 
>> options?
>>
>> Best regards.
>> Ehsan
>>
>>
>>
>> On Wednesday, July 27, 2016 at 8:52:36 PM UTC+2, Daniel Arndt wrote:
>>>
>>> Ehsan,
>>>
>>> can you show us what your "detailed.log" in the build directory looks 
>>> like?
>>> This file stores the configuration that is used for building deal.II.
>>> ` -DCMAKE_INSTALL_PREFIX= /home/General_for_All_Users/
>>> deal_II_install_dir` should tell deal.II to copy the build library into 
>>> that folder
>>> when you are invoking `$make install`.
>>>
>>> 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.
For more options, visit https://groups.google.com/d/optout.
###
#
#  deal.II configuration:
#CMAKE_BUILD_TYPE:   DebugRelease
#BUILD_SHARED_LIBS:  ON
#CMAKE_INSTALL_PREFIX:   /home/General_for_All_Users/deal_II_install_dir
#CMAKE_SOURCE_DIR:   
/home/General_for_All_Users/deal_II/dealii-8.4.1
#(version 8.4.1)
#CMAKE_BINARY_DIR:   
/home/General_for_All_Users/deal_II/dealii-8.4.1/build
#CMAKE_CXX_COMPILER: GNU 4.8.4 on platform Linux x86_64
#/usr/bin/c++
#CMAKE_C_COMPILER:   /usr/bin/cc
#CMAKE_Fortran_COMPILER: /usr/bin/gfortran
#CMAKE_GENERATOR:Unix Makefiles
#
#  Base configuration (prior to feature configuration):
#DEAL_II_CXX_FLAGS:-pedantic -fpic -Wall -Wextra 
-Wpointer-arith -Wwrite-strings -Wsynth -Wsign-compare -Wswitch 
-Woverloaded-virtual -Wno-long-long -Wno-deprecated-declarations 
-Wno-literal-suffix -std=c++11
#DEAL_II_CXX_FLAGS_RELEASE:-O2 -funroll-loops -funroll-all-loops 
-fstrict-aliasing
#DEAL_II_CXX_FLAGS_DEBUG:  -Og -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:m
#DEAL_II_LIBRARIES_RELEASE:
#DEAL_II_LIBRARIES_DEBUG:  
#
#  Configured Features (DEAL_II_ALLOW_BUNDLED = ON, DEAL_II_ALLOW_AUTODETECTION 
= ON):
#  ( DEAL_II_WITH_64BIT_INDICES =  )
#  ( DEAL_II_WITH_ARPACK = OFF )
#DEAL_II_WITH_BOOST set up with bundled packages
#BOOST_CXX_FLAGS = -Wno-unused-local-typedefs
#BOOST_BUNDLED_INCLUDE_DIRS = 
/home/General_for_All_Users/deal_II/dealii-8.4.1/bundled/boost-1.56.0/include
#BOOST_LIBRARIES = rt
#  ( DEAL_II_WITH_BZIP2 = OFF )
#DEAL_II_WITH_CXX11 = ON
#  ( DEAL_II_WITH_CXX14 = OFF )
# 

Re: [deal.II] Step-42 -- Problem with Trilinos and P4EST

2016-08-01 Thread Ehsan
Dear Daniel,

When I run cmake in terminal and the end I receive below warning:

CMake Warning:
  Manually-specified variables were not used by the project:

P4EST_DIR
TRILINOS_DIR

How should I solve this problem.
Best regards.
Ehsan

On Monday, August 1, 2016 at 2:21:31 PM UTC+2, Ehsan wrote:
>
> Dear Daniel,
>
> In the "detailed.log" the "CMAKE_INSTALL_PREFIX:" is empty but I am sure 
> that I defined it in cmake:
> I have a generat question.
> is it possible to compile deal ii with enabled Trilinos, P4EST, and MPI 
> options?
>
> Best regards.
> Ehsan
>
>
>
> On Wednesday, July 27, 2016 at 8:52:36 PM UTC+2, Daniel Arndt wrote:
>>
>> Ehsan,
>>
>> can you show us what your "detailed.log" in the build directory looks 
>> like?
>> This file stores the configuration that is used for building deal.II.
>> ` -DCMAKE_INSTALL_PREFIX= /home/General_for_All_Users/
>> deal_II_install_dir` should tell deal.II to copy the build library into 
>> that folder
>> when you are invoking `$make install`.
>>
>> 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.
For more options, visit https://groups.google.com/d/optout.


Re: [deal.II] Step-42 -- Problem with Trilinos and P4EST

2016-08-01 Thread Ehsan
Dear Daniel,

In the "detailed.log" the "CMAKE_INSTALL_PREFIX:" is empty but I am sure 
that I defined it in cmake:
I have a generat question.
is it possible to compile deal ii with enabled Trilinos, P4EST, and MPI 
options?

Best regards.
Ehsan



On Wednesday, July 27, 2016 at 8:52:36 PM UTC+2, Daniel Arndt wrote:
>
> Ehsan,
>
> can you show us what your "detailed.log" in the build directory looks like?
> This file stores the configuration that is used for building deal.II.
> ` -DCMAKE_INSTALL_PREFIX= /home/General_for_All_Users/deal_II_install_dir` 
> should tell deal.II to copy the build library into that folder
> when you are invoking `$make install`.
>
> 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.
For more options, visit https://groups.google.com/d/optout.


Re: [deal.II] Step-42 -- Problem with Trilinos and P4EST

2016-07-27 Thread Ehsan
Dear Toby,
Thanks for your reply.

I deleted folder of my previous deal ii installation and installed it again 
and now I faced two other problems.
Can you please help me solve them:


First: previously when I installed deal-ii without MPI, Trilinos and P4EST 
options and addresse deall-ii to be installed ins a specific directory 
with  -DCMAKE_INSTALL_PREFIX= 
/home/General_for_All_Users/deal_II_install_dir  option, it was installed 
in the same directory.
But, this time, it seems that this option is not implemented and it is 
installed in somewhere else.
How can I know where is the deal-ii installation directory?
How can I uninstall deal-ii and all related packages completely to install 
it again (have a fresh installation)?

Second: Why deall-ii created a folder in root (/share/deal.II/) which has 
two sub folders (macros and scripts) ?
Previous version of deal-ii did not create this folder?
How can I change the path of this folder?

Thanks
Ehsan

On Wednesday, July 27, 2016 at 12:42:03 PM UTC+2, Tobi Young wrote:
>
> Ehsan. 
>
> Yes, but that is not what you have done.   ;-) 
>
> Look at the configure script in your first email again calmly and 
> *very carefully* and then look at my reply calmly and *very 
> carefully*. 
>
> In the configure script you sent us, you are missing a D on two lines, 
> which I am guessing is stopping cmake from finding p4est and trilinos 
> and is the reason you can not compile some of the tutorials. Have you 
> checked the output from cmake or configure.log? 
>
> Trust me, it works, but only if your syntax configuring deal.II is 
> correct.   :-) 
>
> Best, 
>Toby 
>
>
>
> 2016-07-27 12:29 GMT+02:00 Ehsan >: 
> > Dear Toby, 
> > 
> > But in below links they are -DDEAL_II_With_... 
> > 
> > https://www.dealii.org/developer/readme.html 
> > https://www.dealii.org/developer/external-libs/p4est.html 
> > 
> > Best, 
> > Ehsan 
> > 
> > 
> > 
> > On Wednesday, July 27, 2016 at 12:19:07 PM UTC+2, Tobi Young wrote: 
> >> 
> >> Hello Eshan, 
> >> 
> >> Perhaps here is your error. It is a simple typo. ;-) 
> >> 
> >> >   -DEAL_II_WITH_P4EST= ON 
> >> >   -DEAL_II_WITH_TRILINOS= ON 
> >> 
> >> Should be: 
> >> 
> >>-DDEAL_II_WITH_P4EST= ON 
> >>-DDEAL_II_WITH_TRILINOS= ON 
> >> 
> >> Please check that the output (or configure.log) says it has found all 
> >> of the libraries you were looking for and then recompile. 
> >> Destroy CMakeCache before reconfiguring. 
> >> 
> >> I hope that helps you out. 
> >> 
> >> Best, 
> >>Toby 
> > 
> > -- 
> > The deal.II project is located at http://www.dealii.org/ 
> > For mailing list/forum options, see 
> > https://groups.google.com/d/forum/dealii?hl=en 
> > --- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "deal.II User Group" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to dealii+un...@googlegroups.com . 
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
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] Step-42 -- Problem with Trilinos and P4EST

2016-07-27 Thread Ehsan
Dear Toby,
Thanks for your reply.

I deleted folder of my previous deal ii installation and installed it again 
and now I faced two other problems.
Can you please help me solve them:

First: previously when I installed deal-ii without MPI, Trilinos and P4EST 
options and addresse deall-ii to be installed ins a specific directory with  
-DCMAKE_INSTALL_PREFIX= /home/General_for_All_Users/deal_II_install_dir  
option, 
it was installed in the same directory.
But, this time, it seems that this option is not implemented and it is 
installed in somewhere else. 
How can I know where is the deal-ii installation directory?
How can I uninstall deal-ii and all related packages completely to install 
it again (have a fresh installation)?

Second: Why deall-ii created a folder in root (/share/deal.II/) which has 
two sub folders (macros and scripts) ?
Previous version of deal-ii did not create this folder?
How can I change the path of this folder?

Thanks
Ehsan

On Wednesday, July 27, 2016 at 12:42:03 PM UTC+2, Tobi Young wrote:
>
> Ehsan. 
>
> Yes, but that is not what you have done.   ;-) 
>
> Look at the configure script in your first email again calmly and 
> *very carefully* and then look at my reply calmly and *very 
> carefully*. 
>
> In the configure script you sent us, you are missing a D on two lines, 
> which I am guessing is stopping cmake from finding p4est and trilinos 
> and is the reason you can not compile some of the tutorials. Have you 
> checked the output from cmake or configure.log? 
>
> Trust me, it works, but only if your syntax configuring deal.II is 
> correct.   :-) 
>
> Best, 
>Toby 
>
>
>
> 2016-07-27 12:29 GMT+02:00 Ehsan >: 
> > Dear Toby, 
> > 
> > But in below links they are -DDEAL_II_With_... 
> > 
> > https://www.dealii.org/developer/readme.html 
> > https://www.dealii.org/developer/external-libs/p4est.html 
> > 
> > Best, 
> > Ehsan 
> > 
> > 
> > 
> > On Wednesday, July 27, 2016 at 12:19:07 PM UTC+2, Tobi Young wrote: 
> >> 
> >> Hello Eshan, 
> >> 
> >> Perhaps here is your error. It is a simple typo. ;-) 
> >> 
> >> >   -DEAL_II_WITH_P4EST= ON 
> >> >   -DEAL_II_WITH_TRILINOS= ON 
> >> 
> >> Should be: 
> >> 
> >>-DDEAL_II_WITH_P4EST= ON 
> >>-DDEAL_II_WITH_TRILINOS= ON 
> >> 
> >> Please check that the output (or configure.log) says it has found all 
> >> of the libraries you were looking for and then recompile. 
> >> Destroy CMakeCache before reconfiguring. 
> >> 
> >> I hope that helps you out. 
> >> 
> >> Best, 
> >>Toby 
> > 
> > -- 
> > The deal.II project is located at http://www.dealii.org/ 
> > For mailing list/forum options, see 
> > https://groups.google.com/d/forum/dealii?hl=en 
> > --- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "deal.II User Group" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to dealii+un...@googlegroups.com . 
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
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] Step-42 -- Problem with Trilinos and P4EST

2016-07-27 Thread Ehsan
Hi,
Moreover I have 2 more problems.

First: previously when I installed deal-ii without MPI, Trilinos and P4EST 
options and addresse deall-ii to be installed ins a specific directory with  
-DCMAKE_INSTALL_PREFIX= /home/General_for_All_Users/deal_II_install_dir  
option, 
it was installed in the same directory.
But, this time, it seems that this option is not implemented and it is 
installed in somewhere else. 
How can I know where is the deal-ii installation directory?
How can I uninstall deal-ii and all related packages completely to install 
it again (have a fresh installation)?

Second: Why deall-ii created a folder in root (/share/deal.II/) which has 
two sub folders (macros and scripts) ?
Previous version of deal-ii did not create this folder?
How can I change the path of this folder?

Thanks
Ehsan

On Wednesday, July 27, 2016 at 12:29:34 PM UTC+2, Ehsan wrote:
>
> Dear Toby,
>
> But in below links they are -DDEAL_II_With_...
>
> https://www.dealii.org/developer/readme.html 
> https://www.dealii.org/developer/external-libs/p4est.html
>
> Best,
> Ehsan
>
>
> On Wednesday, July 27, 2016 at 12:19:07 PM UTC+2, Tobi Young wrote:
>>
>> Hello Eshan, 
>>
>> Perhaps here is your error. It is a simple typo. ;-) 
>>
>> >   -DEAL_II_WITH_P4EST= ON 
>> >   -DEAL_II_WITH_TRILINOS= ON 
>>
>> Should be: 
>>
>>-DDEAL_II_WITH_P4EST= ON 
>>-DDEAL_II_WITH_TRILINOS= ON 
>>
>> Please check that the output (or configure.log) says it has found all 
>> of the libraries you were looking for and then recompile. 
>> Destroy CMakeCache before reconfiguring. 
>>
>> I hope that helps you out. 
>>
>> Best, 
>>Toby 
>>
>

-- 
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] Step-42 -- Problem with Trilinos and P4EST

2016-07-27 Thread Ehsan
Dear Toby,

But in below links they are -DDEAL_II_With_...

https://www.dealii.org/developer/readme.html 
https://www.dealii.org/developer/external-libs/p4est.html

Best,
Ehsan


On Wednesday, July 27, 2016 at 12:19:07 PM UTC+2, Tobi Young wrote:
>
> Hello Eshan, 
>
> Perhaps here is your error. It is a simple typo. ;-) 
>
> >   -DEAL_II_WITH_P4EST= ON 
> >   -DEAL_II_WITH_TRILINOS= ON 
>
> Should be: 
>
>-DDEAL_II_WITH_P4EST= ON 
>-DDEAL_II_WITH_TRILINOS= ON 
>
> Please check that the output (or configure.log) says it has found all 
> of the libraries you were looking for and then recompile. 
> Destroy CMakeCache before reconfiguring. 
>
> I hope that helps you out. 
>
> Best, 
>Toby 
>

-- 
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] Step-42 -- Problem with Trilinos and P4EST

2016-07-27 Thread Ehsan

Hello,
I want to run Step-42 but I receive below error:

 Error! The deal.II library found at / was not configured with

  DEAL_II_WITH_MPI = ON
  DEAL_II_WITH_P4EST = ON
  DEAL_II_WITH_TRILINOS = ON

 One or all of these are OFF in your installation but are required for this 
tutorial step.

But I already have installed Trilinos and P4EST and reinstalled deal ii 
with:

cmake -DDEAL_II_WITH_64BIT_INDICES= ON  
  -DDEAL_II_WITH_MPI= ON
  -DEAL_II_WITH_P4EST= ON
  -DEAL_II_WITH_TRILINOS= ON
  -DP4EST_DIR=/home/General_for_All_Users/P4EST_install_dir/
  
-DTRILINOS_DIR=/home/General_for_All_Users/Trilinos_install_dir/trilinos_path   
   

  -DCMAKE_INSTALL_PREFIX= 
/home/General_for_All_Users/deal_II_install_dir 
  ../
My system has one CPU with 4 threads and mu OS is Ubuntu.

Can you please guide me to solve this problem.

Thanks.
Ehsan

-- 
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] Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range

2016-07-05 Thread Ehsan Esfahani
Daniel,

thanks for your response. the problem is in preconditioner. I find out that 
my code is running on my friend's machine but I get the error related to 
SEGV. I have changed preconditioner to Jacobi and it's running but with 
more iterations than AMG. Also, it's not running on my computer and the 
problem on my computer remained the same as before :-(

Best,
Ehsan 

On Monday, July 4, 2016 at 5:00:51 PM UTC-5, Daniel Arndt wrote:
>
> Ehsan,
>
> All I can say: After switching the order of arguments in 
> SparseMatrix::add, your code runs for me with a recent developer version 
> and Trilinos at least.
>
> Best,
> Daniel
>
> Am Montag, 4. Juli 2016 18:59:05 UTC+2 schrieb Ehsan Esfahani:
>>
>> Dear Professor Bangerth,
>>
>> Thanks for your response. Yes, I did. As I mentioned, I got a backtrace 
>> in the debugger (eclipse) and I find out that the problem is in the line I 
>> have mentioned but I couldn't find out what's the problem in that line of 
>> the code which causes segmentation violation.
>>
>> Best,
>> Ehsan
>>
>>
>> On Sunday, July 3, 2016 at 4:32:16 PM UTC-5, bangerth wrote:
>>>
>>> On 07/03/2016 03:50 PM, Ehsan Esfahani wrote: 
>>> > Dear All, 
>>> > 
>>> > Greetings. I changed step-25 (minor changes) in order to solve my 
>>> problem. Now 
>>> > I want to change this code for parallel computation based on the 
>>> method 
>>> > mentioned in step-40. I got several errors and solved them one by one 
>>> but the 
>>> > following error: 
>>> > 
>>> > /Number of active cells: 1024 
>>> > //   Total number of cells: 1365 
>>> > //{[0,4224]}// 
>>> > //Time step #1; advancing to t = 0.1. 
>>>  > [...] 
>>> > //[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation 
>>> Violation, 
>>> > probably memory access out of range 
>>>  > [...] 
>>> > 
>>> > / 
>>> > / 
>>> > Eclipse gives me a backtrace in the following line of the code: 
>>> > /solver.solve (system_matrix, 
>>> completely_distributed_solution_update, 
>>> > system_rhs,/ 
>>> > /  preconditioner);/ 
>>> > I have no idea why I got this error. The code is running properly for 
>>> /fe(1) 
>>> > /and /n_global_refinements (4)/ but when I change them to /fe(2)/ and 
>>> > n_global_refinments (4) I got that error related to /Segmentation 
>>> Violation. 
>>> > /Do you know what's going on? Also, I have attached the code here . 
>>> Thanks in 
>>> > advance for your help. 
>>>
>>> Ehsan, 
>>>
>>> segmentation violations (SEGV) are typically easy to debug because you 
>>> can get 
>>> a backtrave in the debugger of the exact place where it happens, and you 
>>> can 
>>> then look at the local variables to see why this may have happened. Have 
>>> you 
>>> tried to run the program in a debugger and see what is going on? 
>>>
>>> Best 
>>>   W. 
>>>
>>> -- 
>>>  
>>> Wolfgang Bangerth   email:bang...@math.tamu.edu 
>>>  www: 
>>> http://www.math.tamu.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] Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range

2016-07-04 Thread Ehsan Esfahani
Dear Professor Bangerth,

Thanks for your response. Yes, I did. As I mentioned, I got a backtrace in 
the debugger (eclipse) and I find out that the problem is in the line I 
have mentioned but I couldn't find out what's the problem in that line of 
the code which causes segmentation violation.

Best,
Ehsan


On Sunday, July 3, 2016 at 4:32:16 PM UTC-5, bangerth wrote:
>
> On 07/03/2016 03:50 PM, Ehsan Esfahani wrote: 
> > Dear All, 
> > 
> > Greetings. I changed step-25 (minor changes) in order to solve my 
> problem. Now 
> > I want to change this code for parallel computation based on the method 
> > mentioned in step-40. I got several errors and solved them one by one 
> but the 
> > following error: 
> > 
> > /Number of active cells: 1024 
> > //   Total number of cells: 1365 
> > //{[0,4224]}// 
> > //Time step #1; advancing to t = 0.1. 
>  > [...] 
> > //[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation 
> Violation, 
> > probably memory access out of range 
>  > [...] 
> > 
> > / 
> > / 
> > Eclipse gives me a backtrace in the following line of the code: 
> > /solver.solve (system_matrix, 
> completely_distributed_solution_update, 
> > system_rhs,/ 
> > /  preconditioner);/ 
> > I have no idea why I got this error. The code is running properly for 
> /fe(1) 
> > /and /n_global_refinements (4)/ but when I change them to /fe(2)/ and 
> > n_global_refinments (4) I got that error related to /Segmentation 
> Violation. 
> > /Do you know what's going on? Also, I have attached the code here . 
> Thanks in 
> > advance for your help. 
>
> Ehsan, 
>
> segmentation violations (SEGV) are typically easy to debug because you can 
> get 
> a backtrave in the debugger of the exact place where it happens, and you 
> can 
> then look at the local variables to see why this may have happened. Have 
> you 
> tried to run the program in a debugger and see what is going on? 
>
> Best 
>   W. 
>
> -- 
>  
> Wolfgang Bangerth   email:bang...@math.tamu.edu 
>  
>  www: http://www.math.tamu.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] Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range

2016-07-03 Thread Ehsan Esfahani
Dear All,

Greetings. I changed step-25 (minor changes) in order to solve my problem. 
Now I want to change this code for parallel computation based on the method 
mentioned in step-40. I got several errors and solved them one by one but 
the following error:
   

>
> *Number of active cells: 1024*
> *   Total number of cells: 1365**{[0,4224]}*
>
> *Time step #1; advancing to t = 0.1.*
>
> *--*
> *MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD **with 
> errorcode 59.*
>
> *NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.*
> *You may or may not see output from other processes, depending on*
> *exactly when Open MPI kills them.*
>
> *--*
> *[0]PETSC ERROR: 
> *
> *[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, 
> probably memory access out of range*
> *[0]PETSC ERROR: Try option -start_in_debugger or 
> -on_error_attach_debugger*
> *[0]PETSC ERROR: or 
> see http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind 
> <http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind>*
> *[0]PETSC ERROR: or try http://valgrind.org <http://valgrind.org/> on 
> GNU/linux and Apple Mac OS X to find memory corruption errors*
> *[0]PETSC ERROR: configure using --with-debugging=yes, recompile, link, 
> and run *
> *[0]PETSC ERROR: to get more information on the crash.*
> *[0]PETSC ERROR: - Error Message 
> --*
> *[0]PETSC ERROR: Signal received*
> *[0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html 
> <http://www.mcs.anl.gov/petsc/documentation/faq.html> for trouble shooting.*
> *[0]PETSC ERROR: Petsc Release Version 3.6.3, Dec, 03, 2015 *
> *[0]PETSC ERROR: 
> /home/ehsan/apps/candi/deal.II-toolchain/deal.II-v8.4.0/examples/step-25 
> (mine)/step-25 on a arch-linux2-c-opt named levitasgrad01.me.iastate.edu 
> <http://levitasgrad01.me.iastate.edu/> by ehsan Sun Jul  3 13:46:52 2016*
> *[0]PETSC ERROR: Configure options 
> --prefix=/home/ehsan/apps/candi/deal.II-toolchain/petsc-3.6.3 
> --with-debugging=0 --with-shared-libraries=1 --with-mpi=1 --with-x=0 
> --download-hypre=1 CC=mpicc CXX=mpicxx FC=mpif90**[0]PETSC ERROR: #1 User 
> provided function() line 0 in  unknown file*


Eclipse gives me a backtrace in the following line of the code:
* solver.solve (system_matrix, completely_distributed_solution_update, 
system_rhs,*
*   preconditioner); *
I have no idea why I got this error. The code is running properly for 
*fe(1) *and *n_global_refinements (4)* but when I change them to *fe(2)* and 
n_global_refinments (4) I got that error related to *Segmentation 
Violation. *Do you know what's going on? Also, I have attached the code 
here . Thanks in advance for your help.

Best Regards,
Ehsan Esfahani

-- 
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.
/* -
 *
 * Copyright (C) 2006 - 2015 by the deal.II authors
 *
 * This file is part of the deal.II library.
 *
 * The deal.II library is free software; you can use it, redistribute
 * it, and/or modify it under the terms of the GNU Lesser General
 * Public License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * The full text of the license can be found in the file LICENSE at
 * the top level of the deal.II distribution.
 *
 * -

 *
 * Author: Ivan Christov, Wolfgang Bangerth, Texas A&M University, 2006
 */



#include //
#include //
#include //
#include 
#include 
#include 
#include 
#include //this and the following are dependent
namespace LA//
{
#if defined(DEAL_II_WITH_PETSC) && !(defined(DEAL_II_WITH_TRILINOS) && defined(FORCE_USE_OF_TRILINOS))
  using namespace dealii::LinearAlgebraPETSc;
#  define USE_PETSC_LA
#elif defined(DEAL_II_WITH_TRILINOS)
  using namespace dealii::LinearAlgebraTrilinos;
#else
#  error DEAL_II_WITH_PETSC or DEAL_II_WITH_TRILINOS required
#endif
}
#include 
#include 
#include 
#include //
#include 
#include 
#include 
#include 
#include //
#include //
#include //
#include //

#inc

[deal.II] Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range

2016-07-03 Thread Ehsan Esfahani
Dear All,

Greetings. I changed step-25 (minor changes) in order to solve my problem. 
Now I want to change this code for parallel computation based on the method 
mentioned in step-40. I got several errors and solved them one by one but 
the following error:
   

>
> *Number of active cells: 1024*
> *   Total number of cells: 1365**{[0,4224]}*
>
> *Time step #1; advancing to t = 0.1.*
>
> *--*
> *MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD **with 
> errorcode 59.*
>
> *NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.*
> *You may or may not see output from other processes, depending on*
> *exactly when Open MPI kills them.*
>
> *--*
> *[0]PETSC ERROR: 
> *
> *[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, 
> probably memory access out of range*
> *[0]PETSC ERROR: Try option -start_in_debugger or 
> -on_error_attach_debugger*
> *[0]PETSC ERROR: or 
> see http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind 
> <http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind>*
> *[0]PETSC ERROR: or try http://valgrind.org <http://valgrind.org/> on 
> GNU/linux and Apple Mac OS X to find memory corruption errors*
> *[0]PETSC ERROR: configure using --with-debugging=yes, recompile, link, 
> and run *
> *[0]PETSC ERROR: to get more information on the crash.*
> *[0]PETSC ERROR: - Error Message 
> --*
> *[0]PETSC ERROR: Signal received*
> *[0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html 
> <http://www.mcs.anl.gov/petsc/documentation/faq.html> for trouble shooting.*
> *[0]PETSC ERROR: Petsc Release Version 3.6.3, Dec, 03, 2015 *
> *[0]PETSC ERROR: 
> /home/ehsan/apps/candi/deal.II-toolchain/deal.II-v8.4.0/examples/step-25 
> (mine)/step-25 on a arch-linux2-c-opt named levitasgrad01.me.iastate.edu 
> <http://levitasgrad01.me.iastate.edu/> by ehsan Sun Jul  3 13:46:52 2016*
> *[0]PETSC ERROR: Configure options 
> --prefix=/home/ehsan/apps/candi/deal.II-toolchain/petsc-3.6.3 
> --with-debugging=0 --with-shared-libraries=1 --with-mpi=1 --with-x=0 
> --download-hypre=1 CC=mpicc CXX=mpicxx FC=mpif90**[0]PETSC ERROR: #1 User 
> provided function() line 0 in  unknown file*


Eclipse gives me a backtrace in the following line of the code:
* solver.solve (system_matrix, completely_distributed_solution_update, 
system_rhs,*
*   preconditioner); *
I have no idea why I got this error. The code is running properly for 
*fe(1) *and *n_global_refinements (4)* but when I change them to *fe(2)* and 
n_global_refinments (4) I got that error related to *Segmentation 
Violation. *Do you know what's going on? Also, I have attached the code 
here . Thanks in advance for your help.

Best Regards,
Ehsan Esfahani

-- 
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.
/* -
 *
 * Copyright (C) 2006 - 2015 by the deal.II authors
 *
 * This file is part of the deal.II library.
 *
 * The deal.II library is free software; you can use it, redistribute
 * it, and/or modify it under the terms of the GNU Lesser General
 * Public License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * The full text of the license can be found in the file LICENSE at
 * the top level of the deal.II distribution.
 *
 * -

 *
 * Author: Ivan Christov, Wolfgang Bangerth, Texas A&M University, 2006
 */



#include //
#include //
#include //
#include 
#include 
#include 
#include 
#include //this and the following are dependent
namespace LA//
{
#if defined(DEAL_II_WITH_PETSC) && !(defined(DEAL_II_WITH_TRILINOS) && defined(FORCE_USE_OF_TRILINOS))
  using namespace dealii::LinearAlgebraPETSc;
#  define USE_PETSC_LA
#elif defined(DEAL_II_WITH_TRILINOS)
  using namespace dealii::LinearAlgebraTrilinos;
#else
#  error DEAL_II_WITH_PETSC or DEAL_II_WITH_TRILINOS required
#endif
}
#include 
#include 
#include 
#include //
#include 
#include 
#include 
#include 
#include //
#include //
#include //
#include //

#inc

Re: [deal.II] About MPI vectors, ghosted vectors

2016-06-29 Thread Ehsan Esfahani
Dear users,

I'm asking my question here because I think it's somehow related to this 
post, and I don't think it would be necessary to open a new topic. Could 
you please tell me what are differences between these two public functions:

void reinit 
<https://www.dealii.org/8.4.0/doxygen/deal.II/classPETScWrappers_1_1MPI_1_1Vector.html#a9124190f6bd3c47f78cbbc7b4083467e>
 
(const IndexSet 
<https://www.dealii.org/8.4.0/doxygen/deal.II/classIndexSet.html> &local, 
const IndexSet 
<https://www.dealii.org/8.4.0/doxygen/deal.II/classIndexSet.html> &ghost, 
const MPI_Comm &communicator 
<https://www.dealii.org/8.4.0/doxygen/deal.II/classPETScWrappers_1_1MPI_1_1Vector.html#a8bb29704b2ee7f8e0f888201bcd71c62>
)
void reinit 
<https://www.dealii.org/8.4.0/doxygen/deal.II/classPETScWrappers_1_1MPI_1_1Vector.html#a664db0ae6a04decb80e1dc92fb933fed>
 
(const IndexSet 
<https://www.dealii.org/8.4.0/doxygen/deal.II/classIndexSet.html> &local, 
const MPI_Comm &communicator 
<https://www.dealii.org/8.4.0/doxygen/deal.II/classPETScWrappers_1_1MPI_1_1Vector.html#a8bb29704b2ee7f8e0f888201bcd71c62>
)

for both, there are the same definitions on the doxygen 
<https://www.dealii.org/8.4.0/doxygen/deal.II/classPETScWrappers_1_1MPI_1_1Vector.html#pub-methods>
.
I've found out from examples that the first one make my vector ghosted but 
the second one make it non-ghosted. Am I right?

Thanks in advance for you responses.
Ehsan

-- 
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: Hanging node constraints generate new nonzero locations in parallel.

2016-06-09 Thread Ehsan Esfahani
Dear Martin,

Greetings. I've changed step-25 with some minor modification for solving my 
specific problem. Right now, I'm trying to modify again the code base on 
step-40 with MPI. Unfortunately, I got stuck with an error in line 423 of 
the code (attached here). I dont know whta's the reason for this error. I 
look forward to seeing your advice. Thanks in advance.

error:

   Number of active cells: 256
   Total number of cells: 341
{[0,1088]}

Time step #1; advancing to t = 0.1.
[0]PETSC ERROR: - Error Message 
--
[0]PETSC ERROR: Argument out of range
[0]PETSC ERROR: Inserting a new nonzero at global row/column (0, 0) into 
matrix
[0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for 
trouble shooting.
[0]PETSC ERROR: Petsc Release Version 3.6.3, Dec, 03, 2015 
[0]PETSC ERROR: 
/home/ehsan/apps/candi/deal.II-toolchain/deal.II-v8.4.0/examples/step-25 
(mine)/step-25 on a arch-linux2-c-opt named levitasgrad01.me.iastate.edu by 
ehsan Thu Jun  9 16:12:49 2016
[0]PETSC ERROR: Configure options 
--prefix=/home/ehsan/apps/candi/deal.II-toolchain/petsc-3.6.3 
--with-debugging=0 --with-shared-libraries=1 --with-mpi=1 --with-x=0 
--download-hypre=1 CC=mpicc CXX=mpicxx FC=mpif90
[0]PETSC ERROR: #1 MatSetValues_MPIAIJ() line 582 in 
/home/ehsan/apps/candi/deal.II-toolchain-build/petsc-3.6.3/src/mat/impls/aij/mpi/mpiaij.c
[0]PETSC ERROR: #2 MatSetValues() line 1173 in 
/home/ehsan/apps/candi/deal.II-toolchain-build/petsc-3.6.3/src/mat/interface/matrix.c


+-+++
| Total wallclock time elapsed since start| 0.662s ||
| |||
| Section | no. calls |  wall time | % of total |
+-+---+++
| RHS | 1 |0.0589s |   8.9% |
| assembly| 1 |0.0966s |15% |
| setup_GridGen   | 1 | 0.396s |60% |
+-+---+++

ERROR: Uncaught exception in MPI_InitFinalize on proc 0. Skipping 
MPI_Finalize() to avoid a deadlock.



Exception on processing: 


An error occurred in line <1424> of file 

 
in function
void 
dealii::PETScWrappers::MatrixBase::add(dealii::PETScWrappers::MatrixBase::size_type,
 
dealii::PETScWrappers::MatrixBase::size_type, const size_type*, const 
PetscScalar*, bool, bool)
The violated condition was: 
ierr == 0
The name and call sequence of the exception was:
ExcPETScError(ierr)
Additional Information: 
An error with error number 63 occurred while calling a PETSc function


Aborting!




On Monday, May 23, 2016 at 2:27:09 AM UTC-5, Martin Kronbichler wrote:
>
> Dear Ce,
>
> I faced a strange problem. With relatively few cells and non-conforming 
>> triangulation, the assembling process generates new nonzero locations in 
>> parallel with relatively large amount of processes . It works well in 
>> serial or with a small number of processes or with conforming 
>> triangulation. I wonder whether it is a bug or my fault. Can anybody 
>> provide some hints?
>>
>
> In your code you use cm.distribute_local_to_global for writing the cell 
> results into the global matrix, which includes resolving the hanging node 
> constraints, whereas you do not include that list when resolving 
> constraints. You need to append the 'cm' as third argument in the 
> make_sparsity_pattern call (you can also set the fourth argument to 'false' 
> in order to skip creating matrix entries in the constrained rows). Can you 
> try this and report back in case it does not work?
>
> Best,
> Martin
>
>>

-- 
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.
/* -
 *
 * Copyright (C) 2006 - 2015 by the deal.II authors
 *
 * This file is part of the deal.II library.
 *
 * The deal.II library is free software; you can use it, redistribute
 * it, and/or modify it under the terms of the GNU Lesser General
 * Public License as published by t

[deal.II] Re: changing step-25 based on step-40

2016-06-07 Thread Ehsan Esfahani
I have run this code by Eclipse in debug mode. It's been terminated so I 
cannot track the error, The error printed on Console is the same as the one 
I have mentioned here.

On Tuesday, June 7, 2016 at 2:47:34 PM UTC-5, Jean-Paul Pelteret wrote:
>
> Does this code work on one core (mpirun -np 1)? Are there any extra errors 
> when running in debug mode, or are you already running it in debug mode?
>
> On Tuesday, June 7, 2016 at 7:02:42 PM UTC+2, Ehsan Esfahani wrote:
>>
>> Thank for your response. I'm not sure it's related because, previously, 
>> without distributed triangulation, I modified step-25 in order to solve my 
>> problem (ginzburg landau eq.) and in that code, I didn't use those lines of 
>> the code, and it's running without errors. Also, I don't need to implement 
>> boundary conditions because of GL eq. 
>>
>> On Tuesday, June 7, 2016 at 11:26:02 AM UTC-5, Jean-Paul Pelteret wrote:
>>>
>>> The one thing that I've noticed is that you're not using a constraint 
>>> matrix, as is done in step-40:
>>> constraints.clear 
>>> <https://dealii.org/8.4.0/doxygen/deal.II/classConstraintMatrix.html#a24120d0331183f9a63cbe41493a19f6b>
>>>  
>>> ();
>>> constraints.reinit 
>>> <https://dealii.org/8.4.0/doxygen/deal.II/classConstraintMatrix.html#ac2726821354883ac97fe7e6181de9792>
>>>  
>>> (locally_relevant_dofs);
>>> DoFTools::make_hanging_node_constraints 
>>> <https://dealii.org/8.4.0/doxygen/deal.II/group__constraints.html#ga3eaa31a679484e80c193e74e8a967dc8>
>>>  
>>> (dof_handler, constraints);
>>> VectorTools::interpolate_boundary_values 
>>> <https://dealii.org/8.4.0/doxygen/deal.II/namespaceVectorTools.html#af6f700f193e9d5b52e9efe55e9b872d5>
>>>  
>>> (dof_handler,
>>>  0,
>>>  ZeroFunction 
>>> <https://dealii.org/8.4.0/doxygen/deal.II/classZeroFunction.html>(),
>>>  constraints);
>>> constraints.close 
>>> <https://dealii.org/8.4.0/doxygen/deal.II/classConstraintMatrix.html#a8056d07faa2a7ed3f158c1b42d56abc8>
>>>  
>>> ();
>>> constraints.distribute_local_to_global 
>>> <https://dealii.org/8.4.0/doxygen/deal.II/classConstraintMatrix.html#aa9f3612a8fc51eafa34252bb436e8ae4>
>>>  
>>> (cell_matrix,
>>>cell_rhs,
>>>local_dof_indices,
>>>system_matrix,
>>>system_rhs);
>>> Perhaps this has something to do with it? I'm not sufficiently familiar 
>>> with distributed triangulations to say for sure that this is the problem. 
>>> It looks like you may be trying to access an entry in the sparsity pattern 
>>> that doesn't exist.
>>>
>>>
>>> On Tuesday, June 7, 2016 at 6:16:40 PM UTC+2, Jean-Paul Pelteret wrote:
>>>>
>>>> For those who may be able to offer some advice, this is the full error 
>>>> message extracted from the discussion  here 
>>>> <https://github.com/dealii/dealii/issues/2670>:
>>>>
>>>> **> Time step #1 <https://github.com/dealii/dealii/pull/1>; advancing 
>>>> to t = 0.2.
>>>>
>>>>
>>>>
>>>> [0]PETSC ERROR: - Error Message 
>>>> --
>>>>
>>>> [0]PETSC ERROR: Argument out of range
>>>>
>>>> [0]PETSC ERROR: Inserting a new nonzero at global row/column (0, 0) 
>>>> into matrix
>>>>
>>>> [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html 
>>>> for trouble shooting.
>>>>
>>>> [0]PETSC ERROR: Petsc Release Version 3.6.3, Dec, 03, 2015 
>>>>
>>>> [0]PETSC ERROR: 
>>>> /home/ehsan/apps/candi/deal.II-toolchain/deal.II-v8.4.0/examples/step-
>>>> 25
>>>>  (mine)/step-25 on a arch-linux2-c-opt named 
>>>> levitasgrad01.me.iastate.edu by ehsan Mon Jun  6 13:06:02 2016
>>>>
>>>> [0]PETSC ERROR: Configure options 
>>>> --prefix=/home/ehsan/apps/candi/deal.II-toolchain/petsc-3.6.3 
>>>> --with-debugging=0 --with-shared-libraries=1 --with-mpi=1 --with

[deal.II] Re: changing step-25 based on step-40

2016-06-07 Thread Ehsan Esfahani
Thank for your response. I'm not sure it's related because, previously, 
without distributed triangulation, I modified step-25 in order to solve my 
problem (ginzburg landau eq.) and in that code, I didn't use those lines of 
the code, and it's running without errors. Also, I don't need to implement 
boundary conditions because of GL eq. 

On Tuesday, June 7, 2016 at 11:26:02 AM UTC-5, Jean-Paul Pelteret wrote:
>
> The one thing that I've noticed is that you're not using a constraint 
> matrix, as is done in step-40:
> constraints.clear 
> <https://dealii.org/8.4.0/doxygen/deal.II/classConstraintMatrix.html#a24120d0331183f9a63cbe41493a19f6b>
>  
> ();
> constraints.reinit 
> <https://dealii.org/8.4.0/doxygen/deal.II/classConstraintMatrix.html#ac2726821354883ac97fe7e6181de9792>
>  
> (locally_relevant_dofs);
> DoFTools::make_hanging_node_constraints 
> <https://dealii.org/8.4.0/doxygen/deal.II/group__constraints.html#ga3eaa31a679484e80c193e74e8a967dc8>
>  
> (dof_handler, constraints);
> VectorTools::interpolate_boundary_values 
> <https://dealii.org/8.4.0/doxygen/deal.II/namespaceVectorTools.html#af6f700f193e9d5b52e9efe55e9b872d5>
>  
> (dof_handler,
>  0,
>  ZeroFunction 
> <https://dealii.org/8.4.0/doxygen/deal.II/classZeroFunction.html>(),
>  constraints);
> constraints.close 
> <https://dealii.org/8.4.0/doxygen/deal.II/classConstraintMatrix.html#a8056d07faa2a7ed3f158c1b42d56abc8>
>  
> ();
> constraints.distribute_local_to_global 
> <https://dealii.org/8.4.0/doxygen/deal.II/classConstraintMatrix.html#aa9f3612a8fc51eafa34252bb436e8ae4>
>  
> (cell_matrix,
>cell_rhs,
>local_dof_indices,
>system_matrix,
>system_rhs);
> Perhaps this has something to do with it? I'm not sufficiently familiar 
> with distributed triangulations to say for sure that this is the problem. 
> It looks like you may be trying to access an entry in the sparsity pattern 
> that doesn't exist.
>
>
> On Tuesday, June 7, 2016 at 6:16:40 PM UTC+2, Jean-Paul Pelteret wrote:
>>
>> For those who may be able to offer some advice, this is the full error 
>> message extracted from the discussion  here 
>> <https://github.com/dealii/dealii/issues/2670>:
>>
>> **> Time step #1 <https://github.com/dealii/dealii/pull/1>; advancing to 
>> t = 0.2.
>>
>>
>>
>> [0]PETSC ERROR: - Error Message 
>> --
>>
>> [0]PETSC ERROR: Argument out of range
>>
>> [0]PETSC ERROR: Inserting a new nonzero at global row/column (0, 0) into 
>> matrix
>>
>> [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html 
>> for trouble shooting.
>>
>> [0]PETSC ERROR: Petsc Release Version 3.6.3, Dec, 03, 2015 
>>
>> [0]PETSC ERROR: 
>> /home/ehsan/apps/candi/deal.II-toolchain/deal.II-v8.4.0/examples/step-25
>>  (mine)/step-25 on a arch-linux2-c-opt named 
>> levitasgrad01.me.iastate.edu by ehsan Mon Jun  6 13:06:02 2016
>>
>> [0]PETSC ERROR: Configure options 
>> --prefix=/home/ehsan/apps/candi/deal.II-toolchain/petsc-3.6.3 
>> --with-debugging=0 --with-shared-libraries=1 --with-mpi=1 --with-x=0 
>> --download-hypre=1 CC=mpicc CXX=mpicxx FC=mpif90
>>
>> [0]PETSC ERROR: #1 <https://github.com/dealii/dealii/pull/1> 
>> MatSetValues_MPIAIJ() line 582 in 
>> /home/ehsan/apps/candi/deal.II-toolchain-build/petsc-3.6.3/src/mat/impls/aij/mpi/mpiaij.c
>>
>> [0]PETSC ERROR: #2 <https://github.com/dealii/dealii/pull/2> 
>> MatSetValues() line 1173 in 
>> /home/ehsan/apps/candi/deal.II-toolchain-build/petsc-3.6.3/src/mat/interface/matrix.c
>>
>>
>> +-+++
>>
>> | Total wallclock time elapsed since start| 0.732s ||
>>
>> | |||
>>
>> | Section | no. calls |  wall time | % of total |
>>
>> +-+---+++
>>
>> | RHS | 1 | 0.122s |17% |
>>
>> | assembly| 1 | 0.113s |15% |
>>
>> | setup_Gr

[deal.II] changing step-25 based on step-40

2016-06-06 Thread Ehsan Esfahani
Dear Deal-ii Users,

Greetings. I am trying to change step-25 for MPI based on the method 
described in step-40. Unfortunately, I got stuck with an error :( 

>
>
>
>
>
>
>
>
> *An error occurred in line <1424> of file 
> 
>  
> in functionvoid 
> dealii::PETScWrappers::MatrixBase::add(dealii::PETScWrappers::MatrixBase::size_type,
>  
> dealii::PETScWrappers::MatrixBase::size_type, const size_type*, const 
> PetscScalar*, bool, 
> bool)+-+---+++The
>  
> violated condition was: ierr == 0The name and call sequence of the 
> exception was:ExcPETScError(ierr)Additional Information: An error with 
> error number 63 occurred while calling a PETSc function*

*I've attached the code* if you like to see a full description of the 
error. I cannot understand why I'm getting this error because I'm just 
trying to change step-25 based on step-40. It was thinking it would be easy 
but it seems I was mistaken. Do you have any suggestion about this error? I 
find out that I am inserting a new nonzero component in a sparse matrix and 
it violates the sparsitypattern but I cannot find out where I'm doing this 
because the code is aborting and I cannot debug it correctly in 
Eclipse-Mars II.
Also, is it really possible to change step-25 for MPI by using step-40 or 
I'm completely on a wrong road?
Thanks for your help in advance.

Best Regards,
Ehsan

-- 
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.
/* -
 *
 * Copyright (C) 2006 - 2015 by the deal.II authors
 *
 * This file is part of the deal.II library.
 *
 * The deal.II library is free software; you can use it, redistribute
 * it, and/or modify it under the terms of the GNU Lesser General
 * Public License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * The full text of the license can be found in the file LICENSE at
 * the top level of the deal.II distribution.
 *
 * -

 *
 * Author: Ivan Christov, Wolfgang Bangerth, Texas A&M University, 2006
 */



#include //
#include //
#include //
#include 
#include 
#include 
#include 
#include //this and the following are 
dependent
namespace LA//
{
#if defined(DEAL_II_WITH_PETSC) && !(defined(DEAL_II_WITH_TRILINOS) && 
defined(FORCE_USE_OF_TRILINOS))
  using namespace dealii::LinearAlgebraPETSc;
#  define USE_PETSC_LA
#elif defined(DEAL_II_WITH_TRILINOS)
  using namespace dealii::LinearAlgebraTrilinos;
#else
#  error DEAL_II_WITH_PETSC or DEAL_II_WITH_TRILINOS required
#endif
}
#include 
#include 
#include 
#include //
#include 
#include 
#include 
#include 
#include //
#include //
#include //
#include //

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include //
#include 
#include 
#include 

#include //
#include //

#include 
#include 

namespace Step25
{
  using namespace dealii;



  template 
  class SineGordonProblem
  {
  public:
SineGordonProblem ();
void run ();

  private:
void make_grid_and_dofs ();
void assemble_system ();
void right_hand_side ();
void compute_nl_term (const LA::MPI::Vector &old_data,
  const LA::MPI::Vector &new_data,
  LA::MPI::Vector   
&nl_term) const;//
void compute_nl_matrix (const LA::MPI::Vector &old_data,
const LA::MPI::Vector &new_data,
LA::MPI::SparseMatrix 
&nl_matrix) const;//
unsigned int solve ();
void output_results (const unsigned int timestep_number) const;

MPI_Comm  mpi_communicator;//
parallel::distributed::Triangulation   triangulation;//

FE_Qfe;
DoFHandler  dof_handler;

IndexSet  locally_owned_dofs;
IndexSet  locally_relevant_dofs;
   //SparsityPattern  sparsity_pattern;
LA::MPI::SparseMatrix system_matrix;//LA::MPI::SparseMatrix 
system_matrix;//system_matrix is the matrix that we want to invert it.
LA::MPI::SparseMatrix laplace_matrix;
LA::MPI::SparseMatrix mass_matrix;
const unsigned int n_global_refinements;

double time;
const double fi

[deal.II] "run configurations" problem in Eclipse (mars)

2016-05-27 Thread ehsan esfahani
Dear Dealii users,

Greetings. As a person who is trying to learn Deal-ii, I'm trying to change 
step-25 for parallel computation based on step-40, I have changed this step 
for my problem (I solved my problem with modifying this step previously 
without MPI). Unfortunately, I got several errors. The problem is: when I 
want to use "run configurations" in eclipse for debugging the code and 
understanding what's going wrong in my code, I cannot create a C++ 
application. I can create that for all other steps, but for mine, it 
doesn't work and I cannot use debug in Eclipse. Also, attached I am sending 
my code, and I wish there would be someone who faced the same problem. 
Thanks in advance for your help.

Best,

-- 
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.
/* -
 *
 * Copyright (C) 2006 - 2015 by the deal.II authors
 *
 * This file is part of the deal.II library.
 *
 * The deal.II library is free software; you can use it, redistribute
 * it, and/or modify it under the terms of the GNU Lesser General
 * Public License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * The full text of the license can be found in the file LICENSE at
 * the top level of the deal.II distribution.
 *
 * -

 *
 * Author: Ivan Christov, Wolfgang Bangerth, Texas A&M University, 2006
 */



#include //
#include //
#include //
#include 
#include 
#include 
#include 
#include //this and the following are dependent
namespace LA//
{
#if defined(DEAL_II_WITH_PETSC) && !(defined(DEAL_II_WITH_TRILINOS) && defined(FORCE_USE_OF_TRILINOS))
  using namespace dealii::LinearAlgebraPETSc;
#  define USE_PETSC_LA
#elif defined(DEAL_II_WITH_TRILINOS)
  using namespace dealii::LinearAlgebraTrilinos;
#else
#  error DEAL_II_WITH_PETSC or DEAL_II_WITH_TRILINOS required
#endif
}
#include 
#include 
#include 
#include //
#include 
#include 
#include 
#include 
#include //
#include //
#include //
#include //
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include //
#include 
#include 
#include 

#include //
#include //

#include 
#include 

namespace Step25
{
  using namespace dealii;



  template 
  class SineGordonProblem
  {
  public:
SineGordonProblem ();
void run ();

  private:
void make_grid_and_dofs ();
void assemble_system ();
void right_hand_side ();
void compute_nl_term (const LA::MPI::Vector &old_data,
  const LA::MPI::Vector &new_data,
		  LA::MPI::Vector   &nl_term) const;//
void compute_nl_matrix (const LA::MPI::Vector &old_data,
const LA::MPI::Vector &new_data,
			LA::MPI::SparseMatrix &nl_matrix) const;//
unsigned int solve ();
void output_results (const unsigned int timestep_number) const;

MPI_Comm  mpi_communicator;//
parallel::distributed::Triangulation   triangulation;//

FE_Qfe;
DoFHandler  dof_handler;

IndexSet  locally_owned_dofs;
IndexSet  locally_relevant_dofs;
   //SparsityPattern  sparsity_pattern;
LA::MPI::SparseMatrix system_matrix, laplace_matrix, mass_matrix;//system_matrix is the matrix that we want to invert it.

const unsigned int n_global_refinements;

double time;
const double final_time, time_step, theta, DeltaGbar;
//solution_update is equal to delta u in NR
LA::MPI::Vector  locally_relevant_solution, locally_relevant_solution_update, locally_relevant_old_solution, system_rhs, M_x_velocity;//

const unsigned int output_timestep_skip;
ConditionalOStreampcout;//
TimerOutput   computing_timer;//
  };



  template 
  class ExactSolution : public Function
  {
  public:
ExactSolution (const unsigned int n_components = 1,
   const double time = 0.) : Function(n_components, time) {}
virtual double value (const Point &p,
  const unsigned int component = 0) const;
  };

  template 
  double ExactSolution::value (const Point &p,
const unsigned int /*component*/) const
  {
double t = this->get_time ();

switch (dim)
  {
  case 1:
  {
const double m = 0.5;
const double c1 = 0.;
const double c2 = 0.;
return -4.*st

[deal.II] "run configurations" do not work in Eclipse

2016-05-27 Thread ehsan esfahani
Dear Bruno,

Greetings. As a person who is trying to learn Deal-ii, I'm trying to change 
step-25 for parallel computation based on step-40, I have changed this step 
for my problem (I solved my problem with modifying this step previously 
without MPI). Unfortunately, I got several errors. The problem is: when I 
want to use "run configurations" in eclipse for debugging the code and 
understanding what's going wrong in my code, I cannot create a C++ 
application. I can create that for all other steps, but for mine, it 
doesn't work and I cannot use debug in Eclipse. Also, attached I am sending 
my code, and I wish there would be someone who faced the same problem. 
Thanks in advance for your help.

Best,

-- 
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.
/* -
 *
 * Copyright (C) 2006 - 2015 by the deal.II authors
 *
 * This file is part of the deal.II library.
 *
 * The deal.II library is free software; you can use it, redistribute
 * it, and/or modify it under the terms of the GNU Lesser General
 * Public License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * The full text of the license can be found in the file LICENSE at
 * the top level of the deal.II distribution.
 *
 * -

 *
 * Author: Ivan Christov, Wolfgang Bangerth, Texas A&M University, 2006
 */



#include //
#include //
#include //
#include 
#include 
#include 
#include 
#include //this and the following are dependent
namespace LA//
{
#if defined(DEAL_II_WITH_PETSC) && !(defined(DEAL_II_WITH_TRILINOS) && defined(FORCE_USE_OF_TRILINOS))
  using namespace dealii::LinearAlgebraPETSc;
#  define USE_PETSC_LA
#elif defined(DEAL_II_WITH_TRILINOS)
  using namespace dealii::LinearAlgebraTrilinos;
#else
#  error DEAL_II_WITH_PETSC or DEAL_II_WITH_TRILINOS required
#endif
}
#include 
#include 
#include 
#include //
#include 
#include 
#include 
#include 
#include //
#include //
#include //
#include //
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include //
#include 
#include 
#include 

#include //
#include //

#include 
#include 

namespace Step25
{
  using namespace dealii;



  template 
  class SineGordonProblem
  {
  public:
SineGordonProblem ();
void run ();

  private:
void make_grid_and_dofs ();
void assemble_system ();
void right_hand_side ();
void compute_nl_term (const LA::MPI::Vector &old_data,
  const LA::MPI::Vector &new_data,
		  LA::MPI::Vector   &nl_term) const;//
void compute_nl_matrix (const LA::MPI::Vector &old_data,
const LA::MPI::Vector &new_data,
			LA::MPI::SparseMatrix &nl_matrix) const;//
unsigned int solve ();
void output_results (const unsigned int timestep_number) const;

MPI_Comm  mpi_communicator;//
parallel::distributed::Triangulation   triangulation;//

FE_Qfe;
DoFHandler  dof_handler;

IndexSet  locally_owned_dofs;
IndexSet  locally_relevant_dofs;
   //SparsityPattern  sparsity_pattern;
LA::MPI::SparseMatrix system_matrix, laplace_matrix, mass_matrix;//system_matrix is the matrix that we want to invert it.

const unsigned int n_global_refinements;

double time;
const double final_time, time_step, theta, DeltaGbar;
//solution_update is equal to delta u in NR
LA::MPI::Vector  locally_relevant_solution, locally_relevant_solution_update, locally_relevant_old_solution, system_rhs, M_x_velocity;//

const unsigned int output_timestep_skip;
ConditionalOStreampcout;//
TimerOutput   computing_timer;//
  };



  template 
  class ExactSolution : public Function
  {
  public:
ExactSolution (const unsigned int n_components = 1,
   const double time = 0.) : Function(n_components, time) {}
virtual double value (const Point &p,
  const unsigned int component = 0) const;
  };

  template 
  double ExactSolution::value (const Point &p,
const unsigned int /*component*/) const
  {
double t = this->get_time ();

switch (dim)
  {
  case 1:
  {
const double m = 0.5;
const double c1 = 0.;
const double c2 = 0.;
return -4.*std::atan

Re: [deal.II] Re: Segmentation fault (core dumped) error

2016-05-23 Thread Ehsan
Dear Bruno,
I did what you have recommended and the problem is solved.
Thanks.
Ehsan

On Friday, May 20, 2016 at 6:01:14 PM UTC+2, Bruno Turcksin wrote:
>
> 2016-05-20 11:55 GMT-04:00 Bruno Turcksin  >: 
> > looking more at the code I don't think that this is your problem. Is 
> > your code parallel or serial? You said that you allocated 500GB of ram 
> > but you probably don't have a node with 500GB of ram so you need to 
> > use several nodes -> you need your code to be parallel. 
> Scratch that. It could be your problem actually. 
>
> Sorry, 
>
> 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] Re: Segmentation fault (core dumped) error

2016-05-20 Thread Ehsan
But I allocated more than 500 Gb RAN !!

How does this sparsity_pattern.reinit work? 
Does it first calculate the required memory and compares it with available 
one and then if it is not enough returns error?
OR
it starts to allocate and when it faces the memory shortage it returns the 
error?

Thanks.
Ehsan




On Friday, May 20, 2016 at 3:27:04 PM UTC+2, Bruno Turcksin wrote:
>
> 2016-05-20 9:12 GMT-04:00 Ehsan >: 
> > #2  0x75cb614b in dealii::SparsityPattern::reinit 
> > (this=this@entry=0x7fffb498, m=829992, n=829992, max_per_row=8032) 
> > at /deal_II/dealii-8.3.0/source/lac/sparsity_pattern.cc:251 
> It could be a memory problem. You try to create a matrix with 829,992 
> rows and up to 8,032 elements per row. This means 829,992*8,032 = 
> 6,666,495,744 elements or 6,666,495,744 * 8 = 53,331,965,952 bytes = 
> 53 Gb If you are only using one processor, you won't have enough 
> memory. However max_per_row seems excessively large, you can probably 
> find a sharper bound. 
>
> 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] Re: Segmentation fault (core dumped) error

2016-05-20 Thread Ehsan
Here is entire backtrace:

(gdb) bt
#0  dealii::SparsityPattern::reinit (this=this@entry=0x7fffb498, 
m=m@entry=829992, n=n@entry=829992, row_lengths=...) at 
/deal_II/dealii-8.3.0/source/lac/sparsity_pattern.cc:369
#1  0x75cb5fdc in dealii::SparsityPattern::reinit 
(this=this@entry=0x7fffb498, m=m@entry=829992, n=n@entry=829992, 
row_lengths=...)
at /deal_II/dealii-8.3.0/source/lac/sparsity_pattern.cc:564
#2  0x75cb614b in dealii::SparsityPattern::reinit 
(this=this@entry=0x7fffb498, m=829992, n=829992, max_per_row=8032)
at /deal_II/dealii-8.3.0/source/lac/sparsity_pattern.cc:251
#3  0x004a9330 in 
Step14::LaplaceSolver::Solver<3>::LinearSystem::LinearSystem 
(this=0x7fffb3f0, dof_handler=...) at 
/deal_II/J2/modified_step_14.cc:693
#4  0x004acd22 in Step14::LaplaceSolver::Solver<3>::solve_problem 
(this=0x89d1c0) at /deal_II/J2/modified_step_14.cc:447
#5  0x004ace37 in 
Step14::LaplaceSolver::DualSolver<3>::solve_problem (this=) 
at /deal_II/J2/modified_step_14.cc:1743
#6  0x004ace56 in 
Step14::LaplaceSolver::WeightedResidual<3>::solve_dual_problem 
(this=) at /deal_II/J2/modified_step_14.cc:2179
#7  0x00474dac in operator()<, void> (__object=..., this=) at /usr/include/c++/4.8.2/functional:588
#8  __call (__args=, this=) at 
/usr/include/c++/4.8.2/functional:1296
#9  operator()<, void> (this=) at 
/usr/include/c++/4.8.2/functional:1355
#10 std::_Function_handler::*)()> 
(std::reference_wrapper >)> 
>::_M_invoke(std::_Any_data const&) (__functor=...) at 
/usr/include/c++/4.8.2/functional:2071
#11 0x00476976 in std::function::operator()() const 
(this=) at /usr/include/c++/4.8.2/functional:2471
#12 0x0047698a in call (function=...) at 
/deal_II_install_dir/include/deal.II/base/thread_management.h:756
#13 dealii::Threads::internal::TaskEntryPoint::execute 
(this=) at 
/deal_II_install_dir/include/deal.II/base/thread_management.h:2689
#14 0x7306cfb1 in 
tbb::internal::custom_scheduler::local_wait_for_all
 
(this=0x8f1080, parent=..., child=child@entry=0x0)
at 
/deal_II/dealii-8.3.0/bundled/tbb41_20130401oss/src/tbb/custom_scheduler.h:455
#15 0x7306df6e in 
tbb::internal::custom_scheduler::wait_for_all
 
(this=, parent=..., child=0x0)
at 
/deal_II/dealii-8.3.0/bundled/tbb41_20130401oss/src/tbb/custom_scheduler.h:89
#16 0x0047f0db in wait_for_all (this=) at 
/deal_II_install_dir/include/deal.II/bundled/tbb/task.h:717
#17 join (this=) at 
/deal_II_install_dir/include/deal.II/base/thread_management.h:2888
#18 dealii::Threads::Task::join (this=this@entry=0x2570660) at 
/deal_II_install_dir/include/deal.II/base/thread_management.h:3003
#19 0x0048b12a in join_all (this=0x7fffb8b0) at 
/deal_II_install_dir/include/deal.II/base/thread_management.h:4011
#20 Step14::LaplaceSolver::WeightedResidual<3>::solve_problem 
(this=0x89ce50) at /deal_II/J2/modified_step_14.cc:2144
#21 0x004a6e78 in Step14::Framework<3>::run (descriptor=...) at 
/deal_II/J2/modified_step_14.cc:3004
#22 0x00471b16 in main () at /deal_II/J2/modified_step_14.cc:3072

Thanks
Ehsan


On Friday, May 20, 2016 at 2:57:29 PM UTC+2, Bruno Turcksin wrote:
>
> Ehsan, 
>
> 2016-05-20 8:47 GMT-04:00 Ehsan >: 
> > Yes I run the code in gdb and I receive below error: 
> > 
> > Program received signal SIGSEGV, Segmentation fault. 
> > dealii::SparsityPattern::reinit (this=this@entry=0x7fffb498, 
> > m=m@entry=829992, n=n@entry=829992, row_lengths=...) at 
> > /deal_II/dealii-8.3.0/source/lac/sparsity_pattern.cc:369 
> > 369   std::fill_n (&colnums[0], vec_len, invalid_entry); 
> > 
> > How can I check if this error is due to the memory shortage or not? 
> We need to see the entire backtrace. One line is not enough to 
> understand what's happening. 
>
> 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] Re: Segmentation fault (core dumped) error

2016-05-20 Thread Ehsan
Yes I run the code in gdb and I receive below error:

Program received signal SIGSEGV, Segmentation fault.
dealii::SparsityPattern::reinit (this=this@entry=0x7fffb498, 
m=m@entry=829992, n=n@entry=829992, row_lengths=...) at 
/deal_II/dealii-8.3.0/source/lac/sparsity_pattern.cc:369
369   std::fill_n (&colnums[0], vec_len, invalid_entry);

How can I check if this error is due to the memory shortage or not?


On Monday, March 14, 2016 at 8:17:35 PM UTC+1, Guido Kanschat wrote:
>
> Did you run in debug mode?
>
> On Mon, Mar 7, 2016 at 6:24 AM, Wolfgang Bangerth  > wrote:
>
>> On 03/07/2016 05:07 AM, Ehsan wrote:
>>
>>>
>>>
>>> I checked CPU and memory usage and when the code crashes, it only uses 
>>> 0.2 of
>>> total available memory and 0.05 of total allocated CPUs.
>>> So it has plenty of memory and CPU to use.
>>>
>>> I don't think this error relates to insufficient memory.
>>>
>>
>> It's hard to tell. Can you run the program in a debugger and get a 
>> backtrace to see where the problem happens?
>>
>> Best
>>  W.
>>
>> -- 
>> 
>> Wolfgang Bangerth   email:bang...@math.tamu.edu 
>> 
>> www: http://www.math.tamu.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+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Prof. Dr. Guido Kanschat
> Interdisziplinäres Zentrum für Wissenschaftliches Rechnen
> Universität Heidelberg
> Im Neuenheimer Feld 368, 69120 Heidelberg
>

-- 
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] Error during P4EST installation

2016-05-18 Thread ehsan esfahani
I got this error with candi:

-- Configuring incomplete, errors occurred!
Failure with exit status: 1
Exit message: There was a problem configuring trilinos 12.4.2.

I don't need trilinos by the way :(

On Wednesday, May 18, 2016 at 2:22:22 PM UTC-5, Bruno Turcksin wrote:
>
> 2016-05-18 15:04 GMT-04:00 ehsan esfahani  >: 
> > Yes, it seems. 
> > $ gfortran --version 
> > GNU Fortran (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4) 
> > Copyright (C) 2015 Free Software Foundation, Inc. 
> >  this was the result. 
> This is very strange, I have installed p4est on RHEL 7 yesterday I had 
> no problem :-( Can you try again using candi 
> https://github.com/dealii/candi It has been tested on RHEL7 so it 
> should work out of the box. It also tells you which packages need to 
> be installed. 
>
> 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] Error during P4EST installation

2016-05-18 Thread ehsan esfahani
Yes, it seems. 
$ gfortran --version
GNU Fortran (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4)
Copyright (C) 2015 Free Software Foundation, Inc.
 this was the result. 

Thanks,

On Wednesday, May 18, 2016 at 1:57:54 PM UTC-5, Bruno Turcksin wrote:
>
> Hi,
>
> does "gfortran --version" work? Sometimes it is called gfortran-48 or some 
> other variants and you get that error from p4est.
>
> Best,
>
> Bruno
>
> On Wednesday, May 18, 2016 at 2:50:43 PM UTC-4, ehsan esfahani wrote:
>>
>> What do you mean by saying "your fortran compiler is not usable" because 
>> it says that gfortran was already installed and for this reason I cannot 
>> install gfortran with "yum install libgfortran" for example.
>>
>> On Wednesday, May 18, 2016 at 11:20:30 AM UTC-5, Tobi Young wrote:
>>>
>>> This happens when your fortan compiler is not useable. 
>>> Try to install gfortran on your machine and see if the problem goes 
>>> away. 
>>>
>>> Best, 
>>>Toby 
>>>
>>>
>>>
>>>
>>> 2016-05-18 17:29 GMT+02:00 ehsan esfahani : 
>>> > Hello, 
>>> > 
>>> > I am trying to install a package (P4EST) along with 
>>> > D 
>>> > eal ii library 
>>> > . 
>>> > I got an error telling me that " Fortran 77 cannot create 
>>> executables". My 
>>> > operation system is REDHAT LINUX and I find out package 
>>> > gcc-gfortran-4.8.5-4.el7.x86_64 already installed on my computer. I'm 
>>> a 
>>> > beginner at redhat and dealii as well. 
>>> > 
>>> > Thanks in advance for your help, 
>>> > 
>>> > -- 
>>> > The deal.II project is located at http://www.dealii.org/ 
>>> > For mailing list/forum options, see 
>>> > https://groups.google.com/d/forum/dealii?hl=en 
>>> > --- 
>>> > You received this message because you are subscribed to the Google 
>>> Groups 
>>> > "deal.II User Group" group. 
>>> > To unsubscribe from this group and stop receiving emails from it, send 
>>> an 
>>> > email to dealii+un...@googlegroups.com. 
>>> > For more options, visit https://groups.google.com/d/optout. 
>>>
>>

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


Re: [deal.II] Error during P4EST installation

2016-05-18 Thread ehsan esfahani
What do you mean by saying "your fortran compiler is not usable" because it 
says that gfortran was already installed and for this reason I cannot 
install gfortran with "yum install libgfortran" for example.

On Wednesday, May 18, 2016 at 11:20:30 AM UTC-5, Tobi Young wrote:
>
> This happens when your fortan compiler is not useable. 
> Try to install gfortran on your machine and see if the problem goes away. 
>
> Best, 
>Toby 
>
>
>
>
> 2016-05-18 17:29 GMT+02:00 ehsan esfahani  >: 
> > Hello, 
> > 
> > I am trying to install a package (P4EST) along with 
> > D 
> > eal ii library 
> > . 
> > I got an error telling me that " Fortran 77 cannot create executables". 
> My 
> > operation system is REDHAT LINUX and I find out package 
> > gcc-gfortran-4.8.5-4.el7.x86_64 already installed on my computer. I'm a 
> > beginner at redhat and dealii as well. 
> > 
> > Thanks in advance for your help, 
> > 
> > -- 
> > The deal.II project is located at http://www.dealii.org/ 
> > For mailing list/forum options, see 
> > https://groups.google.com/d/forum/dealii?hl=en 
> > --- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "deal.II User Group" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to dealii+un...@googlegroups.com . 
> > For more options, visit https://groups.google.com/d/optout. 
>

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


[deal.II] Error during P4EST installation

2016-05-18 Thread ehsan esfahani
Hello,

I am trying to install a package (P4EST) along with 
D
eal ii library
.
I got an error telling me that " Fortran 77 cannot create executables". My 
operation system is REDHAT LINUX and I find out package 
gcc-gfortran-4.8.5-4.el7.x86_64 already installed on my computer. I'm 
a beginner at redhat and dealii as well. 

Thanks in advance for your help, 

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