[deal.II] use of "meshworker" for FESystem

2018-02-07 Thread Jaekwang Kim

Hi, all.

I am curious about whether i can use  MeshWorker: class for FESystem.

I am trying to solve system, 

that I need to solve 'stokes flow' and then use velocity solution to solve 
other scalar transport equation using DG method 

that looks like 


I solve for \lambda, and u is known from stokes solver. h(x,y) and f(x,y) 
is also known.  


So I declared my FESystem as, 


  template 

StokesProblem::StokesProblem (const unsigned int degree)

:

degree (degree),

triangulation (Triangulation::allow_anisotropic_smoothing),

fe (FE_Q(degree+1), dim,

FE_Q(degree), 1,

FE_DGQ(degree+1), 1),

dof_handler (triangulation)

{}


Afte solving stokes system just as in step-22, 

I need mesh-worker after that 

however when I try to reinitialize info_box, I receive errors like 

 template 

void StokesProblem::setup_mesh_worker ()

{

std::cout << "Setting up mesh worker ...\n";



MeshWorker::IntegrationInfoBox info_box;

const unsigned int n_gauss_points = dof_handler.get_fe().degree+1; // 
I haven't thought about this.



//Since quadratures for cells, boundary, and interior faces can be 
selected independently,

//We have to hand over this three times.

info_box.initialize_gauss_quadrature(n_gauss_points,

 n_gauss_points,

 n_gauss_points);



info_box.initialize_update_flags();

UpdateFlags update_flags = update_quadrature_points |

update_values|

update_gradients;

info_box.add_update_flags(update_flags, true, true, true, true);



const MappingQ mapping (degree);




info_box.initialize (fe , mapping); //Note that  ' FESystem fe'

}


I am receiving error saying that


*An error occurred in line <1198> of file 
 in 
function*

*const FiniteElement ::DoFHandler<2, 2>::get_fe() 
const [dim = 2, spacedim = 2]*

*The violated condition was: *

*selected_fe!=0*

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

*ExcMessage("You are trying to access the DoFHandler's FiniteElement 
object before it has been initialized.")*

*Additional Information: *

*You are trying to access the DoFHandler's FiniteElement object before it 
has been initialized.*

I would appreciate very much anyone who helps me...

Thanks, 

Jaekwang 

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


[deal.II] deal.II Newsletter #20

2018-02-07 Thread Rene Gassmoeller
Hello everyone!

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


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

#5875: improve documentation of ScaLAPACKMatrix::least_squares() (proposed by 
BenBrands) https://github.com/dealii/dealii/pull/5875

#5874: extend VectorTools::project() to take fe_component (proposed by 
davydden) https://github.com/dealii/dealii/pull/5874

#5873: Improve detection of ld.gold (proposed by masterleinad; merged) 
https://github.com/dealii/dealii/pull/5873

#5872: Fix another ice for ICC-15 (proposed by masterleinad; merged) 
https://github.com/dealii/dealii/pull/5872

#5871: Allow for braced initialization in astyle.rc (proposed by masterleinad; 
merged) https://github.com/dealii/dealii/pull/5871

#5870: Integrators for DG face integrals with tests. (proposed by kkormann) 
https://github.com/dealii/dealii/pull/5870

#5869: ScaLAPACKMatrix: add functions to perform addition, multiplication and 
row/column scaling (proposed by BenBrands) 
https://github.com/dealii/dealii/pull/5869

#5868: Fix deficiency in computation of norms for ScaLAPACKMatrix (proposed by 
BenBrands) https://github.com/dealii/dealii/pull/5868

#5867: enable chunking for save/load of ScaLAPACKMatrix (proposed by BenBrands) 
https://github.com/dealii/dealii/pull/5867

#5865: avoid icc 15 error on non-const reference (proposed by QiaoLei-88) 
https://github.com/dealii/dealii/pull/5865

#5864: Fix unused variables in SUNDIALS wrappers' destructors (proposed by 
masterleinad; merged) https://github.com/dealii/dealii/pull/5864

#5863: Expand on the explanation of update_quadrature_points. (proposed by 
bangerth; merged) https://github.com/dealii/dealii/pull/5863

#5862: add function to get max possible mg coarse level (proposed by 
tcclevenger) https://github.com/dealii/dealii/pull/5862

#5861: Restrict instantiations in GridRefinement to Vector (proposed by 
masterleinad) https://github.com/dealii/dealii/pull/5861

#5860: Step 49 modernization (proposed by drwells) 
https://github.com/dealii/dealii/pull/5860

#5859: Require a Tensor for an argument that indicates direction. (proposed by 
drwells; merged) https://github.com/dealii/dealii/pull/5859

#5857: Extend capabilities of ScaLAPACKMatrix (proposed by BenBrands) 
https://github.com/dealii/dealii/pull/5857

#5856: Fix bundled warnings (proposed by masterleinad; merged) 
https://github.com/dealii/dealii/pull/5856

#5855: Replace last Boundary occurences in the test folder (proposed by 
masterleinad; merged) https://github.com/dealii/dealii/pull/5855

#5854: Fix issues discovered by Coverity (proposed by masterleinad; merged) 
https://github.com/dealii/dealii/pull/5854

#5853: deal with unused variable warnings in scalapack bindings and bundled 
code. (proposed by drwells; merged) https://github.com/dealii/dealii/pull/5853

#5852: Remove the hidden CylindricalManifold code. (proposed by 
drwells; merged) https://github.com/dealii/dealii/pull/5852

#5851: Allow detecting unused parameters using clang (proposed by masterleinad; 
merged) https://github.com/dealii/dealii/pull/5851

#5850: Fix scalapack_10 (proposed by masterleinad; merged) 
https://github.com/dealii/dealii/pull/5850

#5849: Deal with the remaining Float64 output files (proposed by masterleinad; 
merged) https://github.com/dealii/dealii/pull/5849

#5848: Add/Remove some template parameters. (proposed by jppelteret) 
https://github.com/dealii/dealii/pull/5848

#5847: document sundials namespace (proposed by tjhei; merged) 
https://github.com/dealii/dealii/pull/5847

#5846: List for each tutorial what others it depends on. (proposed by bangerth; 
merged) https://github.com/dealii/dealii/pull/5846

#5845: Update documentation around hyper-balls and spherical manifolds. 
(proposed by bangerth; merged) https://github.com/dealii/dealii/pull/5845

#5844: Add missing template parameter to intermediate result (proposed by 
jppelteret) https://github.com/dealii/dealii/pull/5844

#5843: Fix unused variables in dof_handler.cc (proposed by masterleinad; 
merged) https://github.com/dealii/dealii/pull/5843

#5842: Add operator assigning a scalar to a Tensor<0>. (proposed by jppelteret; 
merged) https://github.com/dealii/dealii/pull/5842

#5841: Remove a typedef thats unused when compiling in release mode. (proposed 
by jppelteret; merged) https://github.com/dealii/dealii/pull/5841

#5838: Add macro for __restrict keyword. (proposed by kronbichler; merged) 
https://github.com/dealii/dealii/pull/5838

#5837: make icc 15 compiles on CentOS 7 (proposed by QiaoLei-88; merged) 
https://github.com/dealii/dealii/pull/5837

#5836: Use less obscure wording. (proposed by bangerth; merged) 
https://github.com/dealii/dealii/pull/5836

#5835: Remove reference to a function that does not exist (proposed by Rombur; 
merged) https://github.com/dealii/dealii/pull/5835

#5834: FullMatrix size type (proposed by 

[deal.II] a problem (or maybe bug) using grid_in.read_unv()

2018-02-07 Thread Moraad Biagooi

Dear All,

I developed a simple code which just import a simple UNV file, then prints 
the mesh's boundary_ids and material_ids.
The problem is that the output is EMPTY.

The mesh is 3*3*3 and hexahedral, made with SALOME. There is two integer 
group_ids attached to some of its faces and cells.

I attached the codes with the UNV file.

Bests,
Morad Biagooi
PhD student at IASBS

// The code :

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

#include 
#include 

using namespace dealii;

int main ()
{
  Triangulation<3> tria;
  
  std::ifstream in;
  in.open("box.unv");

  GridIn<3,3> gi;
  gi.attach_triangulation(tria);
  gi.read_unv(in);
  
  Triangulation<3>::active_cell_iterator cell = tria.begin_active();
  Triangulation<3>::active_cell_iterator endc = tria.end();
  for (; cell!=endc; ++cell) {
std::cout << "cell: " << cell->id() << "\n";
std::cout << "  material_id: " << cell->material_id()  << "\n";
for (unsigned int f=0; f::faces_per_cell; ++f) {
  if (cell->face(f)->at_boundary())
std::cout << "boundary_id: " << cell->face(f)->boundary_id() << 
"\n";
}
  }   
  in.close();
  return 0;
}

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


read_unv_example.tar.gz
Description: Binary data


Re: [deal.II] Solving the heat equation for round objects and small values for the diffusion coefficient

2018-02-07 Thread Praveen C
I suppose your heat source is discontinuous wrt (x,y). Does your mesh exactly 
represent the discontinuity in the circular case ? If not then you will be 
introducing a lot of error since your source terms will not be accurately 
approximated. To calculate the source terms in the galerkin method, you will be 
doing quadrature of a discontinuous function which will not be accurate.

Best
praveen

> On 07-Feb-2018, at 6:39 PM, 'Maxi Miller' via deal.II User Group 
>  wrote:
> 
> 
> 
> I am trying to solve the heat equation for round heat sources and very small 
> diffusion coefficients (<1e-7). Now when comparing the results between round 
> heat sources and square heat sources, I get the following result for round 
> heat sources: 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> and for square heat sources:
> 
> 
>  
> 
> 
> When comparing both results, I get spikes (i.e. overshooting values) at the 
> border of the square heat source, but none at the border for the round heat 
> source. I assume that there are discretization problems, after the 
> problematic cells overlap with the grid cells. 
> 
> 
> 
> What can I do to minimize those spikes? They only appear for very low values 
> of the diffusion coefficient, and get smaller for a higher grid resolution, 
> but I can not remove them completely.
> 
> 
> 
> 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 
> .

-- 
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] Solving the heat equation for round objects and small values for the diffusion coefficient

2018-02-07 Thread 'Maxi Miller' via deal.II User Group


I am trying to solve the heat equation for round heat sources and very 
small diffusion coefficients (<1e-7). Now when comparing the results 
between round heat sources and square heat sources, I get the following 
result for round heat sources: 




























and for square heat sources:





When comparing both results, I get spikes (i.e. overshooting values) at the 
border of the square heat source, but none at the border for the round heat 
source. I assume that there are discretization problems, after the 
problematic cells overlap with the grid cells. 


What can I do to minimize those spikes? They only appear for very low 
values of the diffusion coefficient, and get smaller for a higher grid 
resolution, but I can not remove them completely.


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.