[deal.II] A small question about subdomain renumbering

2020-08-05 Thread yuesu jin
Dear all,
  I have a question about DoFRenumbering::subdomain_wise(dof_handler). In
step-17 tutorial for example, this function doesn't use the argument of
n_mpi_processes, how does it know how many subdomains it should divide the
dofs into?
After we renumbered the subdomain and get the
locally_owned_dofs_per_subomain, we can already use this_mpi_process to
access the partition vector, which means the subdomain partition has been
done according to the n_mpi_processes.
Best regards,
-- 
Yuesu Jin,
Ph.D student,
University of Houston,
College of Natural Sciences and Mathematics,
Department of Earth and Atmospheric Sciences,
Houston, Texas 77204-5008
346-404-2062

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CA%2B25a%3DJZBd%3DDp2VT%2B5mAzEiGAU9m4ZzaCOqQFf-45e2q7ZYP%3DQ%40mail.gmail.com.


Re: [deal.II] Re: Set up boundary id in gmsh

2020-08-05 Thread Bruno Blais
The pleasure is mine.
You will find that people the deal.II community are very helpfull :)!


On Wednesday, 5 August 2020 22:44:11 UTC-4, yuesu jin wrote:
>
> Dear Bruno,
>   Thank you very much!!! This solved my problem. This is very helpful! 
> Best regards,
> Yuesu
>
> On Wed, Aug 5, 2020 at 9:33 PM Bruno Blais  > wrote:
>
>> The best way to proceed is to set the boundary conditions using Physical 
>> Entities in GMSH.
>> An example is always better. For example, the following GMSH code :
>>
>>  lc = 2.0e-1;
>>  lf = 2.0e-1;
>>  RO=1;
>>  RI=0.25;
>>  
>>  Point(0) = {0, 0, 0, lc};
>>  Point(1) = {RO, 0, 0, lc};
>>  Point(2) = {0, -RO , 0, lc};
>>  Point(3) = {-RO, 0, 0, lc};
>>  Point(4) = {0, RO, 0, lc};
>>  
>>  Point(5) = {RI, 0, 0, lf};
>>  Point(6) = {0, -RI , 0, lf};
>>  Point(7) = {-RI, 0, 0, lf};
>>  Point(8) = {0, RI, 0, lf};
>>  
>>  Circle(1)={1,0,2};
>>  Circle(2)={2,0,3};
>>  Circle(3)={3,0,4};
>>  Circle(4)={4,0,1};
>>  
>>  Circle(5)={5,0,6};
>>  Circle(6)={6,0,7};
>>  Circle(7)={7,0,8};
>>  Circle(8)={8,0,5};
>>  
>>  Line Loop(1) = {1,2,3,4};
>>  Line Loop(2) = {5,6,7,8};
>>  
>>  Plane Surface(1) = {1,2} ;
>>  //Transfinite Surface{1}={1,2,3,4};
>>  Recombine Surface{1,2};
>>  
>>  // Creates a physical entity 1 (i.e. for a BC)
>>  //Physical Point(1) = {1,2} ;
>>  Physical Line(0)={1,2,3,4};
>>  Physical Line(1)={5,6,7,8};
>>  
>>  Physical Surface(0) = {1};
>>
>>
>> Produces a 2D mesh of a single surface with id 0. It has two boundary 
>> conditions (0) and (1). One on the outer circle and the other on the inner 
>> circle. We use it to simulate a Taylor-Couette flow.
>> If you wanted to use a 3D mesh, then you would make a Physical Volume(0) 
>> and you would use the Physical Surface for the boundary conditions
>>
>> Best
>> Bruno
>>
>>
>>
>> On Wednesday, 5 August 2020 20:36:09 UTC-4, yuesu jin wrote:
>>>
>>> Dear all,
>>>   I want to set up one Dirchlet boundary condition and one Neumann 
>>> boundary condition on a 2d  mesh, which is generated by gmsh. How can I set 
>>> up the mesh file in order to tell dealii with the boundary id when I input 
>>> the .msh file into dealii? Thanks!
>>> Best regards,
>>> -- 
>>> Yuesu Jin,
>>> Ph.D student,
>>> University of Houston,
>>> College of Natural Sciences and Mathematics,
>>> Department of Earth and Atmospheric Sciences,
>>> Houston, Texas 77204-5008 
>>> 346-404-2062
>>>
>>> -- 
>> 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 dea...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/dealii/756546c6-95a9-4b71-a58b-772a0884bb9do%40googlegroups.com
>>  
>> 
>> .
>>
>
>
> -- 
> Yuesu Jin,
> Ph.D student,
> University of Houston,
> College of Natural Sciences and Mathematics,
> Department of Earth and Atmospheric Sciences,
> Houston, Texas 77204-5008 
> 346-404-2062
>
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/37e3ef06-2abe-49c7-b172-b23222025a94o%40googlegroups.com.


Re: [deal.II] Re: Set up boundary id in gmsh

2020-08-05 Thread yuesu jin
Dear Bruno,
  Thank you very much!!! This solved my problem. This is very helpful!
Best regards,
Yuesu

On Wed, Aug 5, 2020 at 9:33 PM Bruno Blais  wrote:

> The best way to proceed is to set the boundary conditions using Physical
> Entities in GMSH.
> An example is always better. For example, the following GMSH code :
>
>  lc = 2.0e-1;
>  lf = 2.0e-1;
>  RO=1;
>  RI=0.25;
>
>  Point(0) = {0, 0, 0, lc};
>  Point(1) = {RO, 0, 0, lc};
>  Point(2) = {0, -RO , 0, lc};
>  Point(3) = {-RO, 0, 0, lc};
>  Point(4) = {0, RO, 0, lc};
>
>  Point(5) = {RI, 0, 0, lf};
>  Point(6) = {0, -RI , 0, lf};
>  Point(7) = {-RI, 0, 0, lf};
>  Point(8) = {0, RI, 0, lf};
>
>  Circle(1)={1,0,2};
>  Circle(2)={2,0,3};
>  Circle(3)={3,0,4};
>  Circle(4)={4,0,1};
>
>  Circle(5)={5,0,6};
>  Circle(6)={6,0,7};
>  Circle(7)={7,0,8};
>  Circle(8)={8,0,5};
>
>  Line Loop(1) = {1,2,3,4};
>  Line Loop(2) = {5,6,7,8};
>
>  Plane Surface(1) = {1,2} ;
>  //Transfinite Surface{1}={1,2,3,4};
>  Recombine Surface{1,2};
>
>  // Creates a physical entity 1 (i.e. for a BC)
>  //Physical Point(1) = {1,2} ;
>  Physical Line(0)={1,2,3,4};
>  Physical Line(1)={5,6,7,8};
>
>  Physical Surface(0) = {1};
>
>
> Produces a 2D mesh of a single surface with id 0. It has two boundary
> conditions (0) and (1). One on the outer circle and the other on the inner
> circle. We use it to simulate a Taylor-Couette flow.
> If you wanted to use a 3D mesh, then you would make a Physical Volume(0)
> and you would use the Physical Surface for the boundary conditions
>
> Best
> Bruno
>
>
>
> On Wednesday, 5 August 2020 20:36:09 UTC-4, yuesu jin wrote:
>>
>> Dear all,
>>   I want to set up one Dirchlet boundary condition and one Neumann
>> boundary condition on a 2d  mesh, which is generated by gmsh. How can I set
>> up the mesh file in order to tell dealii with the boundary id when I input
>> the .msh file into dealii? Thanks!
>> Best regards,
>> --
>> Yuesu Jin,
>> Ph.D student,
>> University of Houston,
>> College of Natural Sciences and Mathematics,
>> Department of Earth and Atmospheric Sciences,
>> Houston, Texas 77204-5008
>> 346-404-2062
>>
>> --
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see
> https://groups.google.com/d/forum/dealii?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to dealii+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/756546c6-95a9-4b71-a58b-772a0884bb9do%40googlegroups.com
> 
> .
>


-- 
Yuesu Jin,
Ph.D student,
University of Houston,
College of Natural Sciences and Mathematics,
Department of Earth and Atmospheric Sciences,
Houston, Texas 77204-5008
346-404-2062

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CA%2B25a%3DJJ5rbFSv-%3DoAez5nyNzF0sV1HWbyhakPjbriF5KN-CQg%40mail.gmail.com.


[deal.II] Re: Set up boundary id in gmsh

2020-08-05 Thread Bruno Blais
The best way to proceed is to set the boundary conditions using Physical 
Entities in GMSH.
An example is always better. For example, the following GMSH code :

 lc = 2.0e-1;
 lf = 2.0e-1;
 RO=1;
 RI=0.25;
 
 Point(0) = {0, 0, 0, lc};
 Point(1) = {RO, 0, 0, lc};
 Point(2) = {0, -RO , 0, lc};
 Point(3) = {-RO, 0, 0, lc};
 Point(4) = {0, RO, 0, lc};
 
 Point(5) = {RI, 0, 0, lf};
 Point(6) = {0, -RI , 0, lf};
 Point(7) = {-RI, 0, 0, lf};
 Point(8) = {0, RI, 0, lf};
 
 Circle(1)={1,0,2};
 Circle(2)={2,0,3};
 Circle(3)={3,0,4};
 Circle(4)={4,0,1};
 
 Circle(5)={5,0,6};
 Circle(6)={6,0,7};
 Circle(7)={7,0,8};
 Circle(8)={8,0,5};
 
 Line Loop(1) = {1,2,3,4};
 Line Loop(2) = {5,6,7,8};
 
 Plane Surface(1) = {1,2} ;
 //Transfinite Surface{1}={1,2,3,4};
 Recombine Surface{1,2};
 
 // Creates a physical entity 1 (i.e. for a BC)
 //Physical Point(1) = {1,2} ;
 Physical Line(0)={1,2,3,4};
 Physical Line(1)={5,6,7,8};
 
 Physical Surface(0) = {1};


Produces a 2D mesh of a single surface with id 0. It has two boundary 
conditions (0) and (1). One on the outer circle and the other on the inner 
circle. We use it to simulate a Taylor-Couette flow.
If you wanted to use a 3D mesh, then you would make a Physical Volume(0) 
and you would use the Physical Surface for the boundary conditions

Best
Bruno



On Wednesday, 5 August 2020 20:36:09 UTC-4, yuesu jin wrote:
>
> Dear all,
>   I want to set up one Dirchlet boundary condition and one Neumann 
> boundary condition on a 2d  mesh, which is generated by gmsh. How can I set 
> up the mesh file in order to tell dealii with the boundary id when I input 
> the .msh file into dealii? Thanks!
> Best regards,
> -- 
> Yuesu Jin,
> Ph.D student,
> University of Houston,
> College of Natural Sciences and Mathematics,
> Department of Earth and Atmospheric Sciences,
> Houston, Texas 77204-5008 
> 346-404-2062
>
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/756546c6-95a9-4b71-a58b-772a0884bb9do%40googlegroups.com.


[deal.II] Set up boundary id in gmsh

2020-08-05 Thread yuesu jin
Dear all,
  I want to set up one Dirchlet boundary condition and one Neumann boundary
condition on a 2d  mesh, which is generated by gmsh. How can I set up the
mesh file in order to tell dealii with the boundary id when I input the
.msh file into dealii? Thanks!
Best regards,
-- 
Yuesu Jin,
Ph.D student,
University of Houston,
College of Natural Sciences and Mathematics,
Department of Earth and Atmospheric Sciences,
Houston, Texas 77204-5008
346-404-2062

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CA%2B25a%3DJbEh9EXAMbWBjwBj-wZNn%3Ds1qTqUwvRPeh5oanJbzM_w%40mail.gmail.com.


Re: [deal.II] error: cannot declare field ‘CoupledTH<3>::triangulation’ to be of abstract type ‘dealii::parallel::distributed::Triangulation<3, 3>’

2020-08-05 Thread 孙翔
Hi, Wolfgang,

Thank you for your reply. The complete code can be found on GitHub and we 
also have the instruction for compiling the code on TACC in UTA. This code 
is in the branch thm_seg_distributed. You may like to download it and build 
it. 

https://github.com/cb-geo/thm/tree/thm_seg_distributed

Best,

Xiang


On Wednesday, 5 August 2020 16:23:07 UTC-7, Wolfgang Bangerth wrote:
>
> On 8/5/20 10:42 AM, 孙翔 wrote: 
> > 
> > Please see the attached file, which is the head file that used the 
> library. 
> > Thank you very much. 
>
> That's not enough -- you're using a file "interpolation.h" that I don't 
> have, 
> and parts of the rest of that file depend on this. You need to give me 
> something that's sufficiently complete for me to try and compile this to 
> obtain the error you see. 
>
> Best 
>   W. 
>
>
> -- 
>  
> Wolfgang Bangerth  email: bang...@colostate.edu 
>  
> www: http://www.math.colostate.edu/~bangerth/ 
>
>

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


Re: [deal.II] Output of Gauss point stress tensor

2020-08-05 Thread Wolfgang Bangerth



  Thanks for the guidance. I tried 
replacing the " source/particles/particle_handler.cc 
" 
file with the one present in 
"https://github.com/dealii/dealii/pull/10589/files";. Also 
include/deal.II/particles/particle_accessor.h 
 
and source/particles/particle_accessor.cc 
 
from "https://github.com/dealii/dealii/pull/10319/files";. Then compiled again 
my deal.ii 9.2.0 but it gives error during compilation.


Yes -- we put about 10 changes every day into deal.II. You can't just replace 
individual files in 9.2 with the current development sources :-)



Therefore as a second option, I have created a simplified code which 
represents my problem. Kindly receive the files attached. Looking forward for 
your guiding response!


The code in question looks like this:

  Particles::Particle new_particle;
  new_particle.set_location(location);
  new_particle.set_reference_location(
  mapping.transform_real_to_unit_cell(cell, location));
  new_particle.set_id(next_unused_particle_id);

  SymmetricTensor<2, dim> strain; strain = 0;
  new_particle.set_properties(make_array_view(strain));

  particle_handler.insert_particle(new_particle, cell);

It is correct that set_properties() throws an exception here, because there 
really is no property pool associated with this particle. If you write it like 
this:


  auto inserted_particle
= particle_handler.insert_particle(new_particle, cell);
  inserted_particle->set_properties(make_array_view(strain));

then things will work if you also change the number of properties stored by 
the ParticleHandler object to dim*(dim+1)/2=6 (it is currently 'dim').


Best
 W.

--

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

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/bc3f6ab2-bf49-1dc1-44fd-7e3b4e101a08%40colostate.edu.


Re: [deal.II] error: cannot declare field ‘CoupledTH<3>::triangulation’ to be of abstract type ‘dealii::parallel::distributed::Triangulation<3, 3>’

2020-08-05 Thread Wolfgang Bangerth

On 8/5/20 10:42 AM, 孙翔 wrote:


Please see the attached file, which is the head file that used the library. 
Thank you very much.


That's not enough -- you're using a file "interpolation.h" that I don't have, 
and parts of the rest of that file depend on this. You need to give me 
something that's sufficiently complete for me to try and compile this to 
obtain the error you see.


Best
 W.


--

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

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/636a9090-e6ee-6afa-d1c8-13d6ced82885%40colostate.edu.


Re: [deal.II] error: cannot declare field ‘CoupledTH<3>::triangulation’ to be of abstract type ‘dealii::parallel::distributed::Triangulation<3, 3>’

2020-08-05 Thread 孙翔
Hi, Wolfgang,

Please see the attached file, which is the head file that used the library. 
Thank you very much.

Best,

Xiang

On Wednesday, 5 August 2020 09:14:51 UTC-7, Wolfgang Bangerth wrote:
>
> On 8/5/20 10:13 AM, 孙翔 wrote: 
> > 
> > I have included it actually, and also the distributed/grid_refinement.h 
> was 
> > also included. Because I want to import the outside mesh to build up the 
> > triangulation, I also used Gridin to work on the triangulation, which is 
> like 
> > as the following: 
>
> Then I have no other idea -- send us the file that produces the error, I 
> think 
> that's the only way we can help :-) 
>
> Best 
>   W. 
>
> -- 
>  
> Wolfgang Bangerth  email: bang...@colostate.edu 
>  
> www: http://www.math.colostate.edu/~bangerth/ 
>
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/77598093-3c19-4f35-b44a-6f8399db71a9o%40googlegroups.com.


sample
Description: Binary data


Re: [deal.II] Output of Gauss point stress tensor

2020-08-05 Thread Muhammad Mashhood
Dear Prof. Wolfgang,
 Thanks for the guidance. I tried 
replacing the " source/particles/particle_handler.cc 
"
 
file with the one present in 
"https://github.com/dealii/dealii/pull/10589/files";. Also 
include/deal.II/particles/particle_accessor.h 

 
and source/particles/particle_accessor.cc 

 
from "https://github.com/dealii/dealii/pull/10319/files";. Then compiled 
again my deal.ii 9.2.0 but it gives error during compilation.

Therefore as a second option, I have created a simplified code which 
represents my problem. Kindly receive the files attached. Looking forward 
for your guiding response!
Thank you very much for ongoing cooperation.

Best regards,
Muhammad Mashhood 

On Friday, July 31, 2020 at 5:31:13 PM UTC+2 Wolfgang Bangerth wrote:

> On 7/30/20 5:26 PM, Muhammad Mashhood wrote:
> > 
> > _But it gives the following error on running:_
> > 
> > /An error occurred in line <298> of file 
> >  in 
> function
> > void dealii::Particles::Particle spacedim>::set_properties(const 
> > dealii::ArrayView&) [with int dim = 3; int spacedim = 3]
> > The violated condition was:
> > property_pool != nullptr
> > Additional information:
> > [...]
>
> > I explored the mailing list and found someone from the community already 
> had 
> > similar problem of assigning the properties to the particles where it 
> was 
> > suggested to use following way of assigning the properties:
>
> I believe that this is a bug that I fixed a while back:
> https://github.com/dealii/dealii/pull/10589
> https://github.com/dealii/dealii/issues/10590
> Unfortunately, this happened after the 9.2 release. Are you in a position 
> to 
> work with the current development sources?
>
> If this doesn't solve the problem, can you come up with a simplified piece 
> of 
> code that illustrates the issue?
>
> Best
> W.
>
> -- 
> 
> Wolfgang Bangerth email: bang...@colostate.edu
> www: http://www.math.colostate.edu/~bangerth/
>
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/dc35abbf-ee56-4917-863b-222199337b76n%40googlegroups.com.


3d_block.msh
Description: Mesh model
#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 
#include 

// For particles handling and data output
#include 
#include 
#include 



#include 
#include 
#include 
#include 
#include 



using namespace dealii;

int main ()
{


/
// Varible declaration and initializations //
/
const int dim = 3;

Triangulation triangulation;
MappingQ mapping(1);
Particles::ParticleHandler particle_handler(triangulation, mapping, /*n_properties=*/dim);
types::particle_index   next_unused_particle_id;

const unsigned int fe_degree = 1;

FESystem  fe(FE_Q(QGaussLobatto<1>(fe_degree+1)), dim);
const QGauss  quadrature_formula(fe_degree + 1);




// Reading mesh file //
//

GridIn gridin;
gridin.attach_triangulation(triangulation);
std::ifstream f("3d_block.msh");
gridin.read_msh(f);

std::cout << "Number of active cells after make_grid():   "
<< triangulation.n_active_cells()
<< std::endl;

//
// Distribution of dofs to the dof handler //
/

DoFHandlerdof_handler(triangulation);
dof_handler.distribute_dofs(fe);



/
// creating particles and assigning values for quadrature point locations and data //
/

next_unused_particle_id = 1;

FEValues fe_values (fe, quadrature_formula,
 update_values | update_gradients |
 up

Re: [deal.II] error: cannot declare field ‘CoupledTH<3>::triangulation’ to be of abstract type ‘dealii::parallel::distributed::Triangulation<3, 3>’

2020-08-05 Thread Wolfgang Bangerth

On 8/5/20 10:13 AM, 孙翔 wrote:


I have included it actually, and also the distributed/grid_refinement.h was 
also included. Because I want to import the outside mesh to build up the 
triangulation, I also used Gridin to work on the triangulation, which is like 
as the following:


Then I have no other idea -- send us the file that produces the error, I think 
that's the only way we can help :-)


Best
 W.

--

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

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/e24b8708-e9c3-7c24-ab46-318338e21bdb%40colostate.edu.


Re: [deal.II] error: cannot declare field ‘CoupledTH<3>::triangulation’ to be of abstract type ‘dealii::parallel::distributed::Triangulation<3, 3>’

2020-08-05 Thread 孙翔
Hi, Wolfgang,

I have included it actually, and also the distributed/grid_refinement.h was 
also included. Because I want to import the outside mesh to build up the 
triangulation, I also used Gridin to work on the triangulation, which is 
like as the following:

void CoupledTH::make_grid_and_dofs() {

  GridIn gridin;  // instantiate a gridinput
  gridin.attach_triangulation(triangulation);
  std::ifstream f("inputfiles/mesh.msh");
  gridin.read_msh(f);
...

I am not sure if this impacts the declaration. 

Thank you very much.

Best,

Xiang


On Wednesday, 5 August 2020 08:23:00 UTC-7, Wolfgang Bangerth wrote:
>
> On 8/5/20 3:01 AM, 孙翔 wrote: 
> > 
> > error: cannot declare field ‘CoupledTH<3>::triangulation’ to be of 
> abstract 
> > type ‘dealii::parallel::distributed::Triangulation<3, 3>’ 
>
> I suspect that you forgot in 
>#include  
>
> Best 
>   W. 
>
> -- 
>  
> Wolfgang Bangerth  email: bang...@colostate.edu 
>  
> www: http://www.math.colostate.edu/~bangerth/ 
>
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/60a7c6dc-66cd-4be2-aaad-46eeb1dd3c69o%40googlegroups.com.


Re: [deal.II] Reading a Tensor from parameter file

2020-08-05 Thread Luca Heltai

> Thank you. This really shortens the code. Is it also possible to set the 
> delimiter to a user desired value, say "|" instead of ",".

All functions of the Convert class take a unique pointer to a pattern. You can 
specify your own pattern, and use that in the conversion. The code is all in

deal.II/base/patterns_tools.h

After the Class declarations, you’ll find the implementations for the basic 
classes of deal.II, including vector, map, pairs and tuples of them. 

Best,
Luca 

> Also, where exactly is the procedure for conversion from string to 
> deali::Tensor or some other type say std::vector defined? I could not 
> find it in the source code.
> 
> Best regards,
> Paras
> 
>> On Tuesday, August 4, 2020 at 6:15:47 PM UTC+2, Paras Kumar wrote:
>> Hi,
>> 
>> Could you please provide an MWE to describe how the 
>> Patterns::Convert::to_value() function would work in this case.
>> 
>> Is it must to use prm.add_parameter()  to be able to do so? I usually use 
>> prm.declare_entry() and prm.get(). 
>> 
>> Best regards,
>> Paras
>> 
>>> On Wednesday, April 15, 2020 at 6:01:53 PM UTC+2, Luca Heltai wrote:
>>> Currently, this is also the simplest way:
>>> 
>>> Tensor tens;
>>> prm.add_parameter("Tensor", tens);
>>> 
>>> Take a look at the documentation of the add parameter method.
>>> 
>>> Patterns::Tools::to_string(tens);
>>> 
>>> And 
>>> 
>>> Patterns::Tools::to_value 
>>> 
>>> Are also available to simplify what you want to achieve. 
>>> 
>>> Alternatively: Patterns::Tools::Convert offers ways to construct default 
>>> Patterns for many types, including Tensors. 
>>> 
>>> Best,
>>> Luca
>>> 
>>  
> 
> -- 
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see 
> https://groups.google.com/d/forum/dealii?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to dealii+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/dealii/01e0068e-205b-4984-a5e8-f9d23ab1bb72o%40googlegroups.com.

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/2D1BF7D2-3C55-41E7-988F-110467401FAF%40gmail.com.


Re: [deal.II] error: cannot declare field ‘CoupledTH<3>::triangulation’ to be of abstract type ‘dealii::parallel::distributed::Triangulation<3, 3>’

2020-08-05 Thread Wolfgang Bangerth

On 8/5/20 3:01 AM, 孙翔 wrote:


error: cannot declare field ‘CoupledTH<3>::triangulation’ to be of abstract 
type ‘dealii::parallel::distributed::Triangulation<3, 3>’


I suspect that you forgot in
  #include 

Best
 W.

--

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

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/cd47ef94-8ede-114e-6859-b604ef262cf4%40colostate.edu.


Re: [deal.II] Reading a Tensor from parameter file

2020-08-05 Thread Paras Kumar
Dear Luca,

Thank you. This really shortens the code. Is it also possible to set the 
delimiter to a user desired value, say "|" instead of ",". Also, where 
exactly is the procedure for conversion from string to deali::Tensor or 
some other type say std::vector defined? I could not find it in the 
source code.

Best regards,
Paras

On Tuesday, August 4, 2020 at 6:15:47 PM UTC+2, Paras Kumar wrote:
>
> Hi,
>
> Could you please provide an MWE to describe how the 
> Patterns::Convert::to_value() function would work in this case.
>
> Is it must to use prm.add_parameter()  to be able to do so? I usually use 
> prm.declare_entry() and prm.get(). 
>
> Best regards,
> Paras
>
> On Wednesday, April 15, 2020 at 6:01:53 PM UTC+2, Luca Heltai wrote:
>>
>> Currently, this is also the simplest way:
>>
>> Tensor tens;
>> prm.add_parameter("Tensor", tens);
>>
>> Take a look at the documentation of the add parameter method.
>>
>> Patterns::Tools::to_string(tens);
>>
>> And 
>>
>> Patterns::Tools::to_value 
>>
>> Are also available to simplify what you want to achieve. 
>>
>> Alternatively: Patterns::Tools::Convert offers ways to construct default 
>> Patterns for many types, including Tensors. 
>>
>> Best,
>> Luca
>>
>>  
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/01e0068e-205b-4984-a5e8-f9d23ab1bb72o%40googlegroups.com.


[deal.II] Re: Getting started and posting guidelines for new users

2020-08-05 Thread Bruno Blais
Dear Kaleem,
It would be good to open your own topic with your question so that you may 
get help.
Best
Bruno


On Wednesday, 5 August 2020 05:30:44 UTC-4, kaleem iqbal wrote:
>
> The following error shown in step-49 during make run.
> Exception on processing: 
>
> 
> An error occurred in line <1430> of file 
>  
> in function
> void dealii::GridIn::read_msh(std::istream&) [with int 
> dim = 2; int spacedim = 2; std::istream = std::basic_istream]
> The violated condition was: 
> in
> Additional information: 
> An input/output error has occurred. There are a number of reasons why 
> this may be happening, both for reading and writing operations.
>
> If this happens during an operation that tries to read data: First, you 
> may be trying to read from a file that doesn't exist or that is not 
> readable given its file permissions. Second, deal.II uses this error at 
> times if it tries to read information from a file but where the information 
> in the file does not correspond to the expected format. An example would be 
> a truncated file, or a mesh file that contains not only sections that 
> describe the vertices and cells, but also sections for additional data that 
> deal.II does not understand.
>
> If this happens during an operation that tries to write data: you may be 
> trying to write to a file to which file or directory permissions do not 
> allow you to write. A typical example is where you specify an output file 
> in a directory that does not exist.
> 
>
> Aborting!
> 
> CMakeFiles/run.dir/build.make:57: recipe for target 'CMakeFiles/run' failed
> make[3]: *** [CMakeFiles/run] Error 1
> CMakeFiles/Makefile2:131: recipe for target 'CMakeFiles/run.dir/all' failed
> make[2]: *** [CMakeFiles/run.dir/all] Error 2
> CMakeFiles/Makefile2:138: recipe for target 'CMakeFiles/run.dir/rule' 
> failed
> make[1]: *** [CMakeFiles/run.dir/rule] Error 2
> Makefile:144: recipe for target 'run' failed
> make: *** [run] Error 2
>
> Regard's
> Kaleem iqbal
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/7cce5820-4ae3-469e-9a03-749805fae759o%40googlegroups.com.


[deal.II] Doctoral Programme in Mathematical Analysis, Modelling and Applications at SISSA, Trieste, Italy

2020-08-05 Thread luca.heltai
Dear All,

I would like to  bring at your attention that the second (and last) deadline to 
apply for a Phd position in Mathematical Analysis, Modelling and Applications 
at SISSA, Scuola Internazionale Superiore di Studi Avanzati Trieste, Italy is 
August 20, 2020 at noon (Rome time).

Research activities on applied mathematics (numerical analysis, computational 
and continuum mechanics) are carried out within SISSA mathLab 
(mathlab.sissa.it).

Our group is looking for PhD candidates with interest in scientific computing. 
In particular, I’m looking for candidates with some experience in deal.II 
programming.

Due to COVID-19, all admission exams will be held online on September 10-11, 
2020. The first part of the course will also be open for online-only students.

SISSA mathematics area is highly ranked both at national and international 
level and there are at least 5 Phd grants available.

Info about Phd programme: 
https://www.math.sissa.it/content/mathematical-analysis-modelling-and-applications-0
and https://www.sissa.it/sites/default/files/Scheda%20AMMA.pdf

(Admission exams: second session on September 10-11, 2020 with online written 
and oral examination). 

To apply: 
https://www.sissa.it/it/bandi/concorso-lammissione-ai-corsi-di-phd-della-sissa-lanno-accademico-202021

Please spread the info,
best regards

Luca.

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/6AB58D3B-9233-4705-90F1-942DD5A910DC%40gmail.com.


Re: [deal.II] Reading a Tensor from parameter file

2020-08-05 Thread luca.heltai
> Could you please provide an MWE to describe how the 
> Patterns::Convert::to_value() function would work in this case.

In the dealii/tests/parameter_handler/patterns_05.cc

there are many examples that show how to use these.

> Is it must to use prm.add_parameter()  to be able to do so?
> I usually use prm.declare_entry() and prm.get(). 


No. It is more convenient, but not necessary:

Tensor tensor;

using C = Patterns::Tools::Convert>;

prm.declare_entry(“My tensor”, C::to_string(tensor), *C::to_pattern(), 
“Documentation”);

...

tensor = C::to_value(prm.get(“My tensor”));


Best,
Luca.

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/3F36DBEA-4560-4F4B-965A-9EF52446EE7D%40gmail.com.


[deal.II] Re: Getting started and posting guidelines for new users

2020-08-05 Thread kaleem iqbal
The following error shown in step-49 during make run.
Exception on processing: 


An error occurred in line <1430> of file 
 
in function
void dealii::GridIn::read_msh(std::istream&) [with int 
dim = 2; int spacedim = 2; std::istream = std::basic_istream]
The violated condition was: 
in
Additional information: 
An input/output error has occurred. There are a number of reasons why 
this may be happening, both for reading and writing operations.

If this happens during an operation that tries to read data: First, you may 
be trying to read from a file that doesn't exist or that is not readable 
given its file permissions. Second, deal.II uses this error at times if it 
tries to read information from a file but where the information in the file 
does not correspond to the expected format. An example would be a truncated 
file, or a mesh file that contains not only sections that describe the 
vertices and cells, but also sections for additional data that deal.II does 
not understand.

If this happens during an operation that tries to write data: you may be 
trying to write to a file to which file or directory permissions do not 
allow you to write. A typical example is where you specify an output file 
in a directory that does not exist.


Aborting!

CMakeFiles/run.dir/build.make:57: recipe for target 'CMakeFiles/run' failed
make[3]: *** [CMakeFiles/run] Error 1
CMakeFiles/Makefile2:131: recipe for target 'CMakeFiles/run.dir/all' failed
make[2]: *** [CMakeFiles/run.dir/all] Error 2
CMakeFiles/Makefile2:138: recipe for target 'CMakeFiles/run.dir/rule' failed
make[1]: *** [CMakeFiles/run.dir/rule] Error 2
Makefile:144: recipe for target 'run' failed
make: *** [run] Error 2

Regard's
Kaleem iqbal

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


[deal.II] error: cannot declare field ‘CoupledTH<3>::triangulation’ to be of abstract type ‘dealii::parallel::distributed::Triangulation<3, 3>’

2020-08-05 Thread 孙翔
Hi, I want to declare a variable triangulation as the 
type dealii::parallel::distributed::Triangulation<3, 3>.  The code is :

in main function, 

using namespace dealii;

Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);

CoupledTH<3> coupled_TH_solver(1);
coupled_TH_solver.run();

in class CoupledTH,

parallel::distributed::Triangulation triangulation;

I also included the .h files which are shown in Step-40. 

When I compile the code, I got the error:  

error: cannot declare field ‘CoupledTH<3>::triangulation’ to be of abstract 
type ‘dealii::parallel::distributed::Triangulation<3, 3>’

Thank you very much.

Best,

Xiang


-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/99f202df-e709-41b8-b835-14ed2d00bc11o%40googlegroups.com.


Re: [deal.II] ERROR WHEN RUNNING THE CODE ON MULTIPLE NODES OF HPC

2020-08-05 Thread 孙翔
Got it. Thanks a lot.


On Monday, 3 August 2020 06:10:40 UTC-7, Wolfgang Bangerth wrote:
>
> On 8/2/20 11:26 PM, 孙翔 wrote: 
> > 
> > Yes, it cannot run on a cluster. Both of them run in release mode. I'm 
> also 
> > curious about the error. I debug the code by outputting some specific 
> values. 
>
> If you see any error, the first step always should be to run in debug mode 
> instead. Make sure that that works, and only then is it worth your time to 
> think about release mode! 
>
> Best 
>   W. 
>
> -- 
>  
> Wolfgang Bangerth  email: bang...@colostate.edu 
>  
> www: http://www.math.colostate.edu/~bangerth/ 
>
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/52ab07f5-5c85-4c1f-bb16-d4b8511a4fd5o%40googlegroups.com.