[deal.II] Use of 'VectorTools::interpolate_boundary_values' using numerical solution.

2018-04-09 Thread Jaekwang Kim


Hi, all 


I am always thank you for all guys here in this community. 


I have a question on the use of  VectorTools::interpolate_boundary_values 
functions


Typically we use this function in when we set-up system as in the form 



VectorTools::interpolate_boundary_values (dof_handler,

1,

   *Original**_VelBndValues(),*

   constraints,

   fe.component_mask(velocities));



The red lined functions are usually declared out side of main class. 


One problem I am interested in now is to (Part A) solve stokes flow with no 
slip boundary condition on every boundary one time (as step-22), -


and then to (Part B) solve same system again with slightly different 
boundary condition comes from the straight problem


If I finish Part A, i have numerical solution of (u,p) linked with dot 
handler. 


In (Part B), I post process solutions part A, e.g. I calculated stress 
value and I calculated tangential velocity of a boundary using Navier slip 
condition, 


So, I need to use 



VectorTools::interpolate_boundary_values (dof_handler,

1,

   *New_VelBndValues(),*

   constraints,

   fe.component_mask(velocities));


such that 



 template

 double

 New_VelBndValues::value (constPoint  &p,

 constunsignedintcomponent) const

 {

 Assert (component < this->n_components,

 ExcIndexRange (component, 0, this->n_components));

 

 if(component == 0)

 *return calc_tangential_velocity (); (Error Here!!)*

 else

 return0;

 }




where '*calc_tangential_velocity ();' *is declared in main class, since I 
should have information of dot_handler and solution vectors.


  template

  classStokesProblem

  {

  public:

StokesProblem (constunsignedintdegree);

voidrun ();

  private:



  ……

 

*double calc_tangential_velocity ();*

 

BlockVector solution;

 

};



  

Obviously, this method does not work, I mean I cannot compile the code and 
it shows  'use of undeclared identifier 'calc_tangential_velocity' on the 
line  *(Error Here!!)*

I would appreciate any one who comment it. It seems that complier has to 
know what is that before. 


Will this be possible in a certain way? How can I  go around this problem ? 


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 #27

2018-04-09 Thread Rene Gassmoeller
Hello everyone!

This is deal.II newsletter #27.
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:

#6209: Fix documentation of SparsityPattern (proposed by masterleinad; merged) 
https://github.com/dealii/dealii/pull/6209

#6206: Improve assertions (proposed by drwells) 
https://github.com/dealii/dealii/pull/6206

#6205: doc: mention Kelly estimator in step-37 extensions (proposed by 
davydden; merged) https://github.com/dealii/dealii/pull/6205

#6204: Allow setup_astyle.sh to be used on macOS as well (proposed by 
masterleinad; merged) https://github.com/dealii/dealii/pull/6204

#6203: Guard blank line by HTML comment (proposed by masterleinad; merged) 
https://github.com/dealii/dealii/pull/6203

#6202: Convert data structures in MF::MappingInfo to a face-compatible variant 
(proposed by kronbichler) https://github.com/dealii/dealii/pull/6202

#6201: Separate a note from 'The commented program' (proposed by masterleinad; 
merged) https://github.com/dealii/dealii/pull/6201

#6199: fix changelog date format (proposed by tjhei; merged) 
https://github.com/dealii/dealii/pull/6199

#6198: make zero_out_ghosts() const (proposed by davydden; merged) 
https://github.com/dealii/dealii/pull/6198

#6196: Make a multigrid test more robust: Filter out small floats (proposed by 
kronbichler; merged) https://github.com/dealii/dealii/pull/6196

#6195: Use DEAL_II_ALWAYS_INLINE in SymmetricTensor (proposed by kronbichler; 
merged) https://github.com/dealii/dealii/pull/6195

#6193: Avoid using an alias variable. (proposed by bangerth; merged) 
https://github.com/dealii/dealii/pull/6193

#6192: Add a necessary include file. (proposed by bangerth; merged) 
https://github.com/dealii/dealii/pull/6192

#6191: Clarify a comment in FiniteElement. (proposed by bangerth; merged) 
https://github.com/dealii/dealii/pull/6191

#6190: Extend documentation of contrib/utilities/setup_astyle.sh. (proposed by 
bangerth; merged) https://github.com/dealii/dealii/pull/6190

#6189: Mark a couple of functions as '[[noreturn]]'. (proposed by bangerth; 
merged) https://github.com/dealii/dealii/pull/6189

#6188: Add replicate_triangulation to GridGenerator #6159 (proposed by 
weixiong-zheng-berkeley) https://github.com/dealii/dealii/pull/6188

#6187: Fix name in static_assert. (proposed by luca-heltai; merged) 
https://github.com/dealii/dealii/pull/6187

#6186: Add realpath for those OS that do not implement it (proposed by 
luca-heltai) https://github.com/dealii/dealii/pull/6186

#6185: Remove more boundary references (proposed by drwells) 
https://github.com/dealii/dealii/pull/6185

#6182: Clone manifolds + std::unique_ptr in Tria (proposed by luca-heltai) 
https://github.com/dealii/dealii/pull/6182

#6181: Check the result of a dynamic_cast. (proposed by masterleinad; merged) 
https://github.com/dealii/dealii/pull/6181

#6180: Move dynamic_unique_cast to Utilities (proposed by masterleinad; merged) 
https://github.com/dealii/dealii/pull/6180

#6178: Added to_string and to_value (proposed by luca-heltai) 
https://github.com/dealii/dealii/pull/6178

#6177: New function for Jacobi polynomial evaluation and its roots (proposed by 
kronbichler) https://github.com/dealii/dealii/pull/6177

#6176: Use dynamic_unique_cast in more places (proposed by masterleinad; 
merged) https://github.com/dealii/dealii/pull/6176

#6175: Add glossary entry on dimensions. (proposed by bangerth) 
https://github.com/dealii/dealii/pull/6175

#6174: Use dynamic_unique_cast() where appropriate. (proposed by bangerth; 
merged) https://github.com/dealii/dealii/pull/6174

#6173: Fix a couple minor issues with #6161. (proposed by bangerth; merged) 
https://github.com/dealii/dealii/pull/6173

#6171: Fix bug in patterns.h (proposed by luca-heltai; merged) 
https://github.com/dealii/dealii/pull/6171

#6170: Allow more digits for output in a few tests (proposed by masterleinad; 
merged) https://github.com/dealii/dealii/pull/6170

#6169: CMake: set policy in subdirectory (proposed by tamiko; merged) 
https://github.com/dealii/dealii/pull/6169

#6168: Improve changelog entry for #6129 (proposed by tjhei) 
https://github.com/dealii/dealii/pull/6168

#6167: Add double word script (proposed by drwells; merged) 
https://github.com/dealii/dealii/pull/6167

#6166: contrib/makeofflinedoc.sh: Use https instead of http (proposed by 
tamiko; merged) https://github.com/dealii/dealii/pull/6166

#6165: Remove some unnecessary ';'s. (proposed by drwells; merged) 
https://github.com/dealii/dealii/pull/6165

#6164: Remove double word typos. (proposed by drwells; merged) 
https://github.com/dealii/dealii/pull/6164

#6163: Make using astyle for indenting a bit easier (proposed by masterleinad; 
merged) https://github.com/dealii/dealii/pull/6163

#6161: GridGenerator::extrude_triangulation overload (proposed by 
weixiong-zheng-berkeley; merged) https://github.com/dealii/dealii/p

[deal.II] Re: Error in writing and reading cell based data for restart

2018-04-09 Thread Sambit Das

>
>
> *An error occurred in line <3236> of file 
> 
>  
> in function*
> *void dealii::parallel::distributed::Triangulation spacedim>::notify_ready_to_unpack(unsigned int, const std::function (const dealii::Triangulation::cell_iterator &, 
> dealii::Triangulation::CellStatus, const void *)> &) [with 
> int dim = 3, int spacedim = 3]*
> *The violated condition was: *
> *offset < sizeof(CellStatus)+attached_data_size*
> *Additional information: *
> *invalid offset in notify_ready_to_unpack()*
>

I tried to debug this using ddt debugger- the reason the above condition is 
violated is due to attached_data_size=0, which is strange as the 
*triangulationChk*.*info *file mentions one object to be attached:

* triangulationChk.info *
*version nproc attached_bytes n_attached_objs n_coarse_cells*
*2 1 12 1 1* 

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


[deal.II] Error in writing and reading cell based data for restart

2018-04-09 Thread Sambit Das
Hi all,

I have written the following failing minimal example (also attached) where 
I create a single element parallel distributed triangulation and try to 
write and read a double. 

*using namespace dealii;*
*int main (int argc, char *argv[])*
*{*
*  Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv);*

*  const double L=20;*
*  parallel::distributed::Triangulation<3> triangulation(MPI_COMM_WORLD);*
*  GridGenerator::hyper_cube (triangulation, -L, L);*

*  unsigned int offset = triangulation.register_data_attach*
*   (sizeof(double),*
*[&](const typename 
dealii::parallel::distributed::Triangulation<3>::cell_iterator &cell,*
*const typename 
dealii::parallel::distributed::Triangulation<3>::CellStatus status,*
*void * data) -> void*
*{*

*  double* dataStore = reinterpret_cast(data);*
*  *dataStore=0.0;*
*}*
*);*

*  std::cout<< "offset=" << offset << std::endl;*
*  std::string filename="triangulationChk";*
*  triangulation.save(filename.c_str());*

*  triangulation.load(filename.c_str());*
*  triangulation.notify_ready_to_unpack*
*   (offset,[&](const typename 
dealii::parallel::distributed::Triangulation<3>::cell_iterator &cell,*
* const typename 
dealii::parallel::distributed::Triangulation<3>::CellStatus status,*
* const void * data) -> void*
* {*
* }*
*);*
*}*


I get the following error:

*An error occurred in line <3236> of file 

 
in function*
*void dealii::parallel::distributed::Triangulation::notify_ready_to_unpack(unsigned int, const std::function::cell_iterator &, 
dealii::Triangulation::CellStatus, const void *)> &) [with 
int dim = 3, int spacedim = 3]*
*The violated condition was: *
*offset < sizeof(CellStatus)+attached_data_size*
*Additional information: *
*invalid offset in notify_ready_to_unpack()*

I am wondering if I am missing something in my implementation.

Thanks,
Sambit

-- 
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.
//Include all deal.II header file
#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 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
//Include generic C++ headers
#include 
#include 


using namespace dealii;
int main (int argc, char *argv[])
{
  Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv);

  const double L=20;
  parallel::distributed::Triangulation<3> triangulation(MPI_COMM_WORLD);
  GridGenerator::hyper_cube (triangulation, -L, L);

  unsigned int offset = triangulation.register_data_attach
	  (sizeof(double),
		   [&](const typename dealii::parallel::distributed::Triangulation<3>::cell_iterator &cell,
		   const typename dealii::parallel::distributed::Triangulation<3>::CellStatus status,
		   void * data) -> void
		   {

			 double* dataStore = reinterpret_cast(data);
			 *dataStore=0.0;
		   }
		   );

  std::cout<< "offset=" << offset << std::endl;
  std::string filename="triangulationChk";
  triangulation.save(filename.c_str());

  triangulation.load(filename.c_str());
  triangulation.notify_ready_to_unpack
	  (offset,[&](const typename dealii::parallel::distributed::Triangulation<3>::cell_iterator &cell,
	const typename dealii::parallel::distributed::Triangulation<3>::CellStatus status,
	const void * data) -> void
	{
	}
	   );
}


[deal.II] Re: deal.II cannot found HDF5

2018-04-09 Thread Bruno Turcksin
Peng,

On Saturday, April 7, 2018 at 7:29:31 AM UTC-4, Peng Ding wrote:
>
> Dear group:
>   I have compiled the HDF5 with "--enable-parallel". but deal.II still 
> cannot recognize it. 
> How to resolve this problem.
> Regards
>
Like Daniel said you need to give us more information. One possibility is 
that another library is using a different HDF5. For example, Trilinos could 
pick up a different version of hdf5 and then, deal.II will use the same 
version of hdf5.

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.