Re: [deal.II] Re: Exec format error when using mpirun -n 2 ./parameters_sneddon_2d.prm

2017-02-13 Thread 'Uwe Köcher' via deal . II User Group
Qing, you are welcome. Thats what why we have made it.

On Tuesday, February 14, 2017 at 12:19:46 AM UTC+1, Qing Yin wrote:
>
> Uwe,
>
> Thanks. It works after reinstalling a recent version of the 
> library!"candi" is awesome! Before that the manual installation almost made 
> me cry.
>
> Best,
> Qing
>
> On Mon, Feb 13, 2017 at 9:38 AM, 'Uwe Köcher' via deal.II User Group <
> dea...@googlegroups.com > wrote:
>
>> Quig,
>>
>> you have to install a recent version of the library first. To do so, look 
>> at https://www.dealii.org/download.html
>>
>> For instance, you can use our automated build script candi:
>> https://www.github.com/dealii/candi
>>
>> and follow the instructions from there.
>>
>> Best
>>   Uwe
>>
>>
>> On Monday, February 13, 2017 at 5:17:00 PM UTC+1, Qing Yin wrote:
>>>
>>> Yes, @Daniel, @Uwe, both of you are right. parameters_sneddon_2d.prm is 
>>> a parameter file and I used this crack propagation code from Timo and 
>>> Thomas:
>>> https://github.com/tjhei/cracks
>>>
>>> I tried to run this code following that: 
>>> -
>>>
>>> You need to install deal.II (see http://www.dealii.org) with external 
>>> dependencies p4est and Trilinos. Then configure with:
>>>
>>> cmake -D DEAL_II_DIR=/your/dealii-installation/ .
>>>
>>> Compile with:
>>>
>>> make
>>>
>>> and finally run with:
>>>
>>> mpirun -n 2 ./cracks parameters_sneddon_2d.prm
>>>
>>> If the code crashes with an exception "ExcIO", create an empty directory 
>>> called "output".
>>> 
>>>
>>> I think "make" is the command line for compiling, but I do not find a an 
>>> executable after that.
>>>
>>> ( I just began to use Linux because of deal.II. So if the authors 
>>> ignored some steps, I do not know.)
>>> '
>>> Thanks for your help!
>>>
>>> Best,
>>> Qing
>>>
>>>
>>> On Mon, Feb 13, 2017 at 4:41 AM, 'Uwe Köcher' via deal.II User Group <
>>> dea...@googlegroups.com> wrote:
>>>
 @Daniel, I think he Qing is referencing to a crack propagation code 
 from Timo and Thomas:
 https://github.com/tjhei/cracks

 @Quig: Yes, you have to compile the application and then run as Daniel 
 said.
 "mpirun -n 2 ./cracks parameters_sneddon_2d.prm"

 Best
   Uwe

 On Monday, February 13, 2017 at 10:58:54 AM UTC+1, Daniel Arndt wrote:
>
> Qing,
>  
>
>> I am a new deal.ii user. I am trying to follow the "readme.md" to 
>> run the example by command line /$ mpirun -n 2 
>> ./parameters_sneddon_2d.prm
>>
> This looks like you try to execute a parameter file instead of passing 
> a parameter file to an executable that is launched via mpirun, i.e. you 
> should try
>
>  mpirun -n 2 ./executable ./parameters_sneddon_2d.prm
>
> What is this "parameters _sneddon_2d.prm" file anyway? Do you try to 
> execute something from the examples? At least there I can't find that 
> file.
>
> 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 a topic in the 
 Google Groups "deal.II User Group" group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/dealii/6iWETXPI4lg/unsubscribe.
 To unsubscribe from this group and all its topics, 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 a topic in the 
>> Google Groups "deal.II User Group" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/dealii/6iWETXPI4lg/unsubscribe.
>> To unsubscribe from this group and all its topics, 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] looking for an deallii example using trilinos's amesos direct solver in a parallel way

2017-02-13 Thread Praveen C
On Tue, Feb 14, 2017 at 4:59 AM, Lailai Zhu  wrote:

> hi, Proveen,
>
> After implementing and testing by following your solutions, I realized two
> issues.
> When you use the mumps solver, how does it scale? i mean with a couple of
> processors, say 4.
> In my case, I tried to solve a test Laplace equations, the time of solving
> the system increases
> when only using two processors compared to one. If i use the cg solver,
> then solving process
> roughly scales to 6 processors, not so nice, but still improves.
>
> I dont have any numbers regarding parallel performance. I will tell you if
I get any numbers on this. In my HDG code for compressible Navier-Stokes, I
found gmres to be faster than mumps. So I use mumps only when I am not too
particular about performance.


> The second question is about the  ->initialize function, I only see the
> constructor and solve
> member functions for trilino's direct solver?
>

I forgot about this. The initialize function is currently in the master
branch on github. See

https://www.dealii.org/developer/doxygen/deal.II/classTrilinosWrappers_1_1SolverDirect.html

You will have to compile the deal.II master branch to use this function.

Best
praveen

-- 
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] looking for an deallii example using trilinos's amesos direct solver in a parallel way

2017-02-13 Thread Lailai Zhu
hi, Proveen,

After implementing and testing by following your solutions, I realized two 
issues.
When you use the mumps solver, how does it scale? i mean with a couple of 
processors, say 4.
In my case, I tried to solve a test Laplace equations, the time of solving 
the system increases
when only using two processors compared to one. If i use the cg solver, 
then solving process 
roughly scales to 6 processors, not so nice, but still improves.

The second question is about the  ->initialize function, I only see the 
constructor and solve
member functions for trilino's direct solver? 
Thanks in advance,

best,
lailai



On Friday, February 10, 2017 at 11:12:59 PM UTC-5, Praveen C wrote:
>
> Hello Lailai
>
> Here is an example from my code where I use MUMPS via Trilinos
>
>   static TrilinosWrappers::SolverDirect::AdditionalData data (false, 
> "Amesos_Mumps");  static SolverControl solver_control (1, 0);  // 
> solve for x  { TrilinosWrappers::MPI::Vector tmp 
> (locally_owned_dofs, mpi_communicator); 
> TrilinosWrappers::SolverDirect solver (solver_control, data); 
> solver.solve (system_matrix, tmp, rhs); constraints.distribute (tmp); 
> x = tmp;  }
>
>
> If you want to do the LU decomposition only once and reuse it, e.g., in 
> case of mass matrix, you can do something like this
>
>   static TrilinosWrappers::SolverDirect::AdditionalData data (false, 
> "Amesos_Mumps");  static SolverControl solver_control (1, 0);
>
>   // put following in your class, not sure that you really need a 
> shared_ptr
>
> std_cxx11::shared_ptr mumps_solver;
> // If it is first time, compute LU decomposition if(!mumps_solver) { 
> mumps_solver = std_cxx11::shared_ptr (new 
> TrilinosWrappers::SolverDirect(solver_control, data)); mumps_solver->
> initialize (mass_matrix); } // solve for ax { TrilinosWrappers::MPI::
> Vector tmp (locally_owned_dofs, mpi_communicator); mumps_solver->solve (
> tmp, rhs); constraints.distribute (tmp); ax = tmp; }
>
>
> Best
> praveen
>
> On Sat, Feb 11, 2017 at 9:19 AM, Lailai Zhu  > wrote:
>
>> hi, dear all,
>>
>> I am looking for an dealII example that uses trilino's  amesos direct 
>> solver with MPI,
>> i guess more specifically, i mean how to call amesos_mumps solver based 
>> on MPI. I have installed
>> them correctly with dealII. I think i need to use the subroutine 
>>
>> void solve 
>> 
>>  
>> (const SparseMatrix 
>> 
>>  
>> ,::parallel::distributed::Vector 
>> <
>>  
>> double > , const ::parallel::distributed::Vector 
>> <
>>  
>> double > )
>>
>> May I ask is there any direct example or something close? Thanks in 
>> advance,
>>
>> best,
>> lailai
>>
>> -- 
>> 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] Re: Exec format error when using mpirun -n 2 ./parameters_sneddon_2d.prm

2017-02-13 Thread Qing Yin
Uwe,

Thanks. It works after reinstalling a recent version of the library!"candi"
is awesome! Before that the manual installation almost made me cry.

Best,
Qing

On Mon, Feb 13, 2017 at 9:38 AM, 'Uwe Köcher' via deal.II User Group <
dealii@googlegroups.com> wrote:

> Quig,
>
> you have to install a recent version of the library first. To do so, look
> at https://www.dealii.org/download.html
>
> For instance, you can use our automated build script candi:
> https://www.github.com/dealii/candi
>
> and follow the instructions from there.
>
> Best
>   Uwe
>
>
> On Monday, February 13, 2017 at 5:17:00 PM UTC+1, Qing Yin wrote:
>>
>> Yes, @Daniel, @Uwe, both of you are right. parameters_sneddon_2d.prm is a
>> parameter file and I used this crack propagation code from Timo and
>> Thomas:
>> https://github.com/tjhei/cracks
>>
>> I tried to run this code following that:
>> -
>>
>> You need to install deal.II (see http://www.dealii.org) with external
>> dependencies p4est and Trilinos. Then configure with:
>>
>> cmake -D DEAL_II_DIR=/your/dealii-installation/ .
>>
>> Compile with:
>>
>> make
>>
>> and finally run with:
>>
>> mpirun -n 2 ./cracks parameters_sneddon_2d.prm
>>
>> If the code crashes with an exception "ExcIO", create an empty directory
>> called "output".
>> 
>>
>> I think "make" is the command line for compiling, but I do not find a an
>> executable after that.
>>
>> ( I just began to use Linux because of deal.II. So if the authors ignored
>> some steps, I do not know.)
>> '
>> Thanks for your help!
>>
>> Best,
>> Qing
>>
>>
>> On Mon, Feb 13, 2017 at 4:41 AM, 'Uwe Köcher' via deal.II User Group <
>> dea...@googlegroups.com> wrote:
>>
>>> @Daniel, I think he Qing is referencing to a crack propagation code from
>>> Timo and Thomas:
>>> https://github.com/tjhei/cracks
>>>
>>> @Quig: Yes, you have to compile the application and then run as Daniel
>>> said.
>>> "mpirun -n 2 ./cracks parameters_sneddon_2d.prm"
>>>
>>> Best
>>>   Uwe
>>>
>>> On Monday, February 13, 2017 at 10:58:54 AM UTC+1, Daniel Arndt wrote:

 Qing,


> I am a new deal.ii user. I am trying to follow the "readme.md" to run
> the example by command line /$ mpirun -n 2 ./parameters_sneddon_2d.prm
>
 This looks like you try to execute a parameter file instead of passing
 a parameter file to an executable that is launched via mpirun, i.e. you
 should try

  mpirun -n 2 ./executable ./parameters_sneddon_2d.prm

 What is this "parameters _sneddon_2d.prm" file anyway? Do you try to
 execute something from the examples? At least there I can't find that file.

 Best,
 Daniel

>>> --
>>> The deal.II project is located at http://www.dealii.org/
>>> For mailing list/forum options, see https://groups.google.com/d/fo
>>> rum/dealii?hl=en
>>> ---
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "deal.II User Group" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>>> pic/dealii/6iWETXPI4lg/unsubscribe.
>>> To unsubscribe from this group and all its topics, 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 a topic in the
> Google Groups "deal.II User Group" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/dealii/6iWETXPI4lg/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> dealii+unsubscr...@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] looking for an deallii example using trilinos's amesos direct solver in a parallel way

2017-02-13 Thread Lailai Zhu
Hi, Praveen,

thanks very much for your quick answers.

best,
lailai

On Friday, February 10, 2017 at 11:12:59 PM UTC-5, Praveen C wrote:
>
> Hello Lailai
>
> Here is an example from my code where I use MUMPS via Trilinos
>
>   static TrilinosWrappers::SolverDirect::AdditionalData data (false, 
> "Amesos_Mumps");  static SolverControl solver_control (1, 0);  // 
> solve for x  { TrilinosWrappers::MPI::Vector tmp 
> (locally_owned_dofs, mpi_communicator); 
> TrilinosWrappers::SolverDirect solver (solver_control, data); 
> solver.solve (system_matrix, tmp, rhs); constraints.distribute (tmp); 
> x = tmp;  }
>
>
> If you want to do the LU decomposition only once and reuse it, e.g., in 
> case of mass matrix, you can do something like this
>
>   static TrilinosWrappers::SolverDirect::AdditionalData data (false, 
> "Amesos_Mumps");  static SolverControl solver_control (1, 0);
>
>   // put following in your class, not sure that you really need a 
> shared_ptr
>
> std_cxx11::shared_ptr mumps_solver;
> // If it is first time, compute LU decomposition if(!mumps_solver) { 
> mumps_solver = std_cxx11::shared_ptr (new 
> TrilinosWrappers::SolverDirect(solver_control, data)); mumps_solver->
> initialize (mass_matrix); } // solve for ax { TrilinosWrappers::MPI::
> Vector tmp (locally_owned_dofs, mpi_communicator); mumps_solver->solve (
> tmp, rhs); constraints.distribute (tmp); ax = tmp; }
>
>
> Best
> praveen
>
> On Sat, Feb 11, 2017 at 9:19 AM, Lailai Zhu  > wrote:
>
>> hi, dear all,
>>
>> I am looking for an dealII example that uses trilino's  amesos direct 
>> solver with MPI,
>> i guess more specifically, i mean how to call amesos_mumps solver based 
>> on MPI. I have installed
>> them correctly with dealII. I think i need to use the subroutine 
>>
>> void solve 
>> 
>>  
>> (const SparseMatrix 
>> 
>>  
>> ,::parallel::distributed::Vector 
>> <
>>  
>> double > , const ::parallel::distributed::Vector 
>> <
>>  
>> double > )
>>
>> May I ask is there any direct example or something close? Thanks in 
>> advance,
>>
>> best,
>> lailai
>>
>> -- 
>> 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] Re: More questions about FE_enriched & PUM FEM

2017-02-13 Thread Denis Davydov
or

system_to_base_index().first.first


> On 13 Feb 2017, at 18:06, Denis Davydov  wrote:
> 
> 
> 
> On Friday, February 10, 2017 at 4:00:25 PM UTC+1, Edith Sotelo wrote:
> 
> A follow up about this post:
> 
> This is the way I went on implementing the strong bc.:
> Assigned the Boundary value to the non-enriched dof, and assigned Zero to the 
> enriched dofs.. it worked for me.
> I used system_to_base_table() as suggested, though this function is 
> protected, I just changed the function to public to be able to use it.. 
> unless there is a different way to do it.
> 
> Oh, then I recommended you the wrong function. Sorry.
> 
> I would say you need to use `fe.system_to_component_index(local_dof).first` 
> to check whether a given DoF is enriched or not.
> See the table here https://github.com/dealii/dealii/issues/3646 and also 
> documentation of this function.
> 
> Regards,
> Denis.
> 
> 
> -- 
> The deal.II project is located at http://www.dealii.org/ 
> 
> For mailing list/forum options, see 
> https://groups.google.com/d/forum/dealii?hl=en 
> 
> --- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "deal.II User Group" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/dealii/7eI7aoYAIck/unsubscribe 
> .
> To unsubscribe from this group and all its topics, send an email to 
> dealii+unsubscr...@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] Re: More questions about FE_enriched & PUM FEM

2017-02-13 Thread Denis Davydov


On Friday, February 10, 2017 at 4:00:25 PM UTC+1, Edith Sotelo wrote:
>
>
> A follow up about this post:
>
> This is the way I went on implementing the strong bc.:
> Assigned the Boundary value to the non-enriched dof, and assigned Zero to 
> the enriched dofs.. it worked for me.
> I used system_to_base_table() as suggested, though this function is 
> protected, I just changed the function to public to be able to use it.. 
> unless there is a different way to do it.
>

Oh, then I recommended you the wrong function. Sorry.

I would say you need to use `fe.system_to_component_index(local_dof).first` 
to check whether a given DoF is enriched or not.
See the table here https://github.com/dealii/dealii/issues/3646 and also 
documentation of this function.

Regards,
Denis.

-- 
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: Exec format error when using mpirun -n 2 ./parameters_sneddon_2d.prm

2017-02-13 Thread 'Uwe Köcher' via deal . II User Group
Quig,

you have to install a recent version of the library first. To do so, look 
at https://www.dealii.org/download.html

For instance, you can use our automated build script candi:
https://www.github.com/dealii/candi

and follow the instructions from there.

Best
  Uwe


On Monday, February 13, 2017 at 5:17:00 PM UTC+1, Qing Yin wrote:
>
> Yes, @Daniel, @Uwe, both of you are right. parameters_sneddon_2d.prm is a 
> parameter file and I used this crack propagation code from Timo and 
> Thomas:
> https://github.com/tjhei/cracks
>
> I tried to run this code following that: 
> -
>
> You need to install deal.II (see http://www.dealii.org) with external 
> dependencies p4est and Trilinos. Then configure with:
>
> cmake -D DEAL_II_DIR=/your/dealii-installation/ .
>
> Compile with:
>
> make
>
> and finally run with:
>
> mpirun -n 2 ./cracks parameters_sneddon_2d.prm
>
> If the code crashes with an exception "ExcIO", create an empty directory 
> called "output".
> 
>
> I think "make" is the command line for compiling, but I do not find a an 
> executable after that.
>
> ( I just began to use Linux because of deal.II. So if the authors ignored 
> some steps, I do not know.)
> '
> Thanks for your help!
>
> Best,
> Qing
>
>
> On Mon, Feb 13, 2017 at 4:41 AM, 'Uwe Köcher' via deal.II User Group <
> dea...@googlegroups.com > wrote:
>
>> @Daniel, I think he Qing is referencing to a crack propagation code from 
>> Timo and Thomas:
>> https://github.com/tjhei/cracks
>>
>> @Quig: Yes, you have to compile the application and then run as Daniel 
>> said.
>> "mpirun -n 2 ./cracks parameters_sneddon_2d.prm"
>>
>> Best
>>   Uwe
>>
>> On Monday, February 13, 2017 at 10:58:54 AM UTC+1, Daniel Arndt wrote:
>>>
>>> Qing,
>>>  
>>>
 I am a new deal.ii user. I am trying to follow the "readme.md" to run 
 the example by command line /$ mpirun -n 2 ./parameters_sneddon_2d.prm

>>> This looks like you try to execute a parameter file instead of passing a 
>>> parameter file to an executable that is launched via mpirun, i.e. you 
>>> should try
>>>
>>>  mpirun -n 2 ./executable ./parameters_sneddon_2d.prm
>>>
>>> What is this "parameters _sneddon_2d.prm" file anyway? Do you try to 
>>> execute something from the examples? At least there I can't find that file.
>>>
>>> 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 a topic in the 
>> Google Groups "deal.II User Group" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/dealii/6iWETXPI4lg/unsubscribe.
>> To unsubscribe from this group and all its topics, 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] Recommendation: BCs in config

2017-02-13 Thread luca.heltai
Actually, you have some alternatives… 

Take a look at this class:

https://github.com/mathLab/deal2lkit/blob/master/include/deal2lkit/parsed_mapped_functions.h

It does something similar to what you are asking for. 

(documentation here:

http://mathlab.github.io/deal2lkit/class_parsed_mapped_functions.html

Best,
Luca.

> On 13 Feb 2017, at 16:49, Bruno Turcksin  wrote:
> 
> 2017-02-13 10:34 GMT-05:00 Franco Milicchio :
>> Because I can imagine that having several BCs with some magic char there is
>> simply a recipe for disaster :)
>> 
>> Just think about this example:
>> 
>>  set dirichlet = x^2+y^2 : if(x < 0, 1, 3) : 0; 0 : 0 : 0
>> 
>> Since I am working with people not well versed in programming, that is
>> quite a concern to me.
> Well then you will need to declare everything in advance. The only
> solution I can think of is to use sth like boost::property_tree
> instead of ParameterHandler.
> 
> 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.

-- 
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: Exec format error when using mpirun -n 2 ./parameters_sneddon_2d.prm

2017-02-13 Thread Qing Yin
Yes, @Daniel, @Uwe, both of you are right. parameters_sneddon_2d.prm is a
parameter file and I used this crack propagation code from Timo and Thomas:
https://github.com/tjhei/cracks

I tried to run this code following that:
-

You need to install deal.II (see http://www.dealii.org) with external
dependencies p4est and Trilinos. Then configure with:

cmake -D DEAL_II_DIR=/your/dealii-installation/ .

Compile with:

make

and finally run with:

mpirun -n 2 ./cracks parameters_sneddon_2d.prm

If the code crashes with an exception "ExcIO", create an empty directory
called "output".


I think "make" is the command line for compiling, but I do not find a an
executable after that.

( I just began to use Linux because of deal.II. So if the authors ignored
some steps, I do not know.)
'
Thanks for your help!

Best,
Qing


On Mon, Feb 13, 2017 at 4:41 AM, 'Uwe Köcher' via deal.II User Group <
dealii@googlegroups.com> wrote:

> @Daniel, I think he Qing is referencing to a crack propagation code from
> Timo and Thomas:
> https://github.com/tjhei/cracks
>
> @Quig: Yes, you have to compile the application and then run as Daniel
> said.
> "mpirun -n 2 ./cracks parameters_sneddon_2d.prm"
>
> Best
>   Uwe
>
> On Monday, February 13, 2017 at 10:58:54 AM UTC+1, Daniel Arndt wrote:
>>
>> Qing,
>>
>>
>>> I am a new deal.ii user. I am trying to follow the "readme.md" to run
>>> the example by command line /$ mpirun -n 2 ./parameters_sneddon_2d.prm
>>>
>> This looks like you try to execute a parameter file instead of passing a
>> parameter file to an executable that is launched via mpirun, i.e. you
>> should try
>>
>>  mpirun -n 2 ./executable ./parameters_sneddon_2d.prm
>>
>> What is this "parameters _sneddon_2d.prm" file anyway? Do you try to
>> execute something from the examples? At least there I can't find that file.
>>
>> 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 a topic in the
> Google Groups "deal.II User Group" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/dealii/6iWETXPI4lg/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> dealii+unsubscr...@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] Re: Recommendation: BCs in config

2017-02-13 Thread Bruno Turcksin
2017-02-13 9:46 GMT-05:00 Franco Milicchio :
> Yes, I have thought of that but I cannot see right now how I could express
> vector functions. Using a custom separator isn't really nice here...
Why not? You can split the string several times using different separators:

set value = 0.5*x+y, x, y; x*y^2

You first split value in 0.5*x+y, x, y and x*y^2 and then you can
split 0.5*x+y, x, y in three components.

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.


[deal.II] Re: Recommendation: BCs in config

2017-02-13 Thread Franco Milicchio


On Monday, February 13, 2017 at 3:09:20 PM UTC+1, Bruno Turcksin wrote:
>
> Franco,
>
> you could write everything into one string and then split it. So it would 
> like this:
>
> subsection bc
>   set value = 0.5*x+y; x*y^2
> end
>
> Take a look here 
> http://stackoverflow.com/questions/236129/split-a-string-in-c for some 
> ideas how to split a string.
>
> Best,
>
> Bruno
>

Thanks for your answer, Bruno.

Yes, I have thought of that but I cannot see right now how I could express 
vector functions. Using a custom separator isn't really nice here...

Thank you!

-- 
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] Recommendation: BCs in config

2017-02-13 Thread Franco Milicchio
Dear all,

I want to have a series of functions read from an input file handled by the 
*ParameterHandler* class. These are the BCs of my problem, but I don't know 
how I could express them, since I'd like to have an unknown number of them. 

As far as I've understood, the parameters sections must have a unique name, 
so I simply cannot do something like this:

subsection dirichlet

  subsection bc
set value = 0.5 * x + y
  end

  subsection bc
set value = x * y^2
  end

end

and I am forced to use *bc1*, *bc2*, and so on as names. Moreover, this 
means that I have to declare beforehand all the possible sections within a 
reasonable number of BCs.

Do you have any suggestions?

Thanks!




-- 
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: Exec format error when using mpirun -n 2 ./parameters_sneddon_2d.prm

2017-02-13 Thread 'Uwe Köcher' via deal . II User Group
@Daniel, I think he Qing is referencing to a crack propagation code from 
Timo and Thomas:
https://github.com/tjhei/cracks

@Quig: Yes, you have to compile the application and then run as Daniel said.
"mpirun -n 2 ./cracks parameters_sneddon_2d.prm"

Best
  Uwe

On Monday, February 13, 2017 at 10:58:54 AM UTC+1, Daniel Arndt wrote:
>
> Qing,
>  
>
>> I am a new deal.ii user. I am trying to follow the "readme.md" to run 
>> the example by command line /$ mpirun -n 2 ./parameters_sneddon_2d.prm
>>
> This looks like you try to execute a parameter file instead of passing a 
> parameter file to an executable that is launched via mpirun, i.e. you 
> should try
>
>  mpirun -n 2 ./executable ./parameters_sneddon_2d.prm
>
> What is this "parameters _sneddon_2d.prm" file anyway? Do you try to 
> execute something from the examples? At least there I can't find that file.
>
> 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.