Re: [deal.II] Re: cmake fails when -DDEAL_II_WITH_MPI=ON

2018-01-25 Thread Eldar Khattatov
I tried both development and 8.5.1 as I found a discussion about changes in 
MPI configuration somewhere in deal.ii github page.
Thank you for pointing me to these lines in the error log, I will try to 
look into that.

On Thursday, January 25, 2018 at 4:17:26 PM UTC-5, Wolfgang Bangerth wrote:
>
> On 01/25/2018 12:32 PM, Eldar Khattatov wrote: 
> > Sorry that was indeed a wrong file. I attached the right one. 
>
> I *think* the problem comes from the this error: 
>
> /usr/bin/c++   [...] 
> /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_cxx.so: error: undefined 
> reference to 'opal_uses_threads' 
> /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_cxx.so: error: undefined 
> reference to 'opal_class_initialize' 
> /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_cxx.so: error: undefined 
> reference to 'opal_list_item_t_class' 
> collect2: error: ld returned 1 exit status 
> CMakeFiles/cmTC_48103.dir/build.make:130: recipe for target 'cmTC_48103' 
> failed 
> make[1]: *** [cmTC_48103] Error 1 
> make[1]: Leaving directory 
> '/home/username/Downloads/dealii/build/CMakeFiles/CMakeTmp' 
> Makefile:126: recipe for target 'cmTC_48103/fast' failed 
> make: *** [cmTC_48103/fast] Error 2 
>
> Source file was: 
> int main(){ return 0; } 
>
>
> Here, you are using the regular C++ compiler to link an MPI program, and 
> it forgets to link in one of the ancillary OpenMPI libraries that has 
> the opal_... functions. You ought to be using the mpic++ program to 
> compile. Do you have the CXX environment variable set? 
>
> There have been recent changes to the MPI cmake configuration. Are you 
> using the newest development version of deal.II? 
>
> 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.
For more options, visit https://groups.google.com/d/optout.


Re: [deal.II] Re: cmake fails when -DDEAL_II_WITH_MPI=ON

2018-01-25 Thread Eldar Khattatov
Sorry that was indeed a wrong file. I attached the right one.

On Thursday, January 25, 2018 at 11:25:21 AM UTC-5, Eldar Khattatov wrote:
>
> Hi,
>
> Thank you for the reply.
> I attached the cmake log file.
>
> On Wednesday, January 24, 2018 at 11:35:53 PM UTC-5, Matthias Maier wrote:
>>
>> Hi, 
>>
>> On Wed, Jan 24, 2018, at 11:17 CST, Eldar Khattatov  
>> wrote: 
>>
>> > I forgot to mention, I tried both the development and 8.5.1versions of 
>> > deal.II and the errors are the same. 
>>
>> The test in question tries to compile a very minimalistic 
>>
>>   int main () { return 0; } 
>>
>> with the given compiler, link interface and linker options. 
>>
>> Have a look at /CMakeFiles/CMakeErrors.log the detailed 
>> compiler output of what exactly fails should be at the very bottom. 
>>
>> I am curious what is going wrong. 
>>
>> Best, 
>> Matthias 
>>
>

-- 
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.
Performing C++ SOURCE FILE Test DEAL_II_HAVE_AVX failed with the following 
output:
Change Dir: /home/username/Downloads/dealii/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_ef482/fast"
/usr/bin/make -f CMakeFiles/cmTC_ef482.dir/build.make 
CMakeFiles/cmTC_ef482.dir/build
make[1]: Entering directory 
'/home/username/Downloads/dealii/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_ef482.dir/src.cxx.o
/usr/bin/c++-DDEAL_II_HAVE_AVX   -o CMakeFiles/cmTC_ef482.dir/src.cxx.o -c 
/home/username/Downloads/dealii/build/CMakeFiles/CMakeTmp/src.cxx
/home/username/Downloads/dealii/build/CMakeFiles/CMakeTmp/src.cxx:3:6: error: 
#error "__AVX__ flag not set, no support for AVX"
 #error "__AVX__ flag not set, no support for AVX"
  ^
/home/username/Downloads/dealii/build/CMakeFiles/CMakeTmp/src.cxx: In function 
‘int main()’:
/home/username/Downloads/dealii/build/CMakeFiles/CMakeTmp/src.cxx:35:9: 
warning: AVX vector return without AVX enabled changes the ABI [-Wpsabi]
   b = _mm256_set1_pd ((volatile double)(2.25));
   ~~^~
CMakeFiles/cmTC_ef482.dir/build.make:65: recipe for target 
'CMakeFiles/cmTC_ef482.dir/src.cxx.o' failed
make[1]: *** [CMakeFiles/cmTC_ef482.dir/src.cxx.o] Error 1
make[1]: Leaving directory 
'/home/username/Downloads/dealii/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_ef482/fast' failed
make: *** [cmTC_ef482/fast] Error 2

Return value: 1
Source file was:

#ifndef __AVX__
#error "__AVX__ flag not set, no support for AVX"
#endif
#include 
class VectorizedArray
{
public:
  VectorizedArray &
  operator += (const VectorizedArray &vec)
  {
data = _mm256_add_pd (data, vec.data);
return *this;
  }
  __m256d data;
};
inline
VectorizedArray
operator + (const VectorizedArray &u, const VectorizedArray &v)
{
  VectorizedArray tmp = u;
  return tmp+=v;
}
int main()
{
  __m256d a, b;
  const unsigned int vector_bytes = sizeof(__m256d);
  const int n_vectors = vector_bytes/sizeof(double);
  __m256d * data =
reinterpret_cast<__m256d*>(_mm_malloc (2*vector_bytes, vector_bytes));
  double * ptr = reinterpret_cast(&a);
  ptr[0] = (volatile double)(1.0);
  for (int i=1; i(&data[1]);
  unsigned int return_value = 0;
  if (ptr[0] != 7.3125)
return_value = 1;
  for (int i=1; i(&e.data);
  for (int i=0; i
int main()
{
  __m512d a, b;
  const unsigned int vector_bytes = sizeof(__m512d);
  const int n_vectors = vector_bytes/sizeof(double);
  __m512d * data =
reinterpret_cast<__m512d*>(_mm_malloc (2*vector_bytes, vector_bytes));
  double * ptr = reinterpret_cast(&a);
  ptr[0] = (volatile double)(1.0);
  for (int i=1; i(&data[1]);
  unsigned int return_value = 0;
  if (ptr[0] != 7.3125)
return_value = 1;
  for (int i=1; i’)
 double() * std::complex();
 ~^~~
In file included from 
/home/username/Downloads/dealii/build/CMakeFiles/CMakeTmp/src.cxx:2:0:
/usr/include/c++/7/complex:404:5: note: candidate: template 
std::complex<_Tp> std::operator*(const _Tp&, const std::complex<_Tp>&)
 operator*(const _Tp& __x, const complex<_Tp>&am

Re: [deal.II] Re: cmake fails when -DDEAL_II_WITH_MPI=ON

2018-01-25 Thread Eldar Khattatov
Hi,

Thank you for the reply.
I attached the cmake log file.

On Wednesday, January 24, 2018 at 11:35:53 PM UTC-5, Matthias Maier wrote:
>
> Hi, 
>
> On Wed, Jan 24, 2018, at 11:17 CST, Eldar Khattatov  > wrote: 
>
> > I forgot to mention, I tried both the development and 8.5.1versions of 
> > deal.II and the errors are the same. 
>
> The test in question tries to compile a very minimalistic 
>
>   int main () { return 0; } 
>
> with the given compiler, link interface and linker options. 
>
> Have a look at /CMakeFiles/CMakeErrors.log the detailed 
> compiler output of what exactly fails should be at the very bottom. 
>
> I am curious what is going wrong. 
>
> Best, 
> Matthias 
>

-- 
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.
Performing C++ SOURCE FILE Test DEAL_II_HAVE_AVX failed with the following 
output:
Change Dir: /home/username/Downloads/dealii/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_000f4/fast"
/usr/bin/make -f CMakeFiles/cmTC_000f4.dir/build.make 
CMakeFiles/cmTC_000f4.dir/build
make[1]: Entering directory 
'/home/username/Downloads/dealii/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_000f4.dir/src.cxx.o
/usr/bin/c++-DDEAL_II_HAVE_AVX   -o CMakeFiles/cmTC_000f4.dir/src.cxx.o -c 
/home/username/Downloads/dealii/build/CMakeFiles/CMakeTmp/src.cxx
/home/username/Downloads/dealii/build/CMakeFiles/CMakeTmp/src.cxx:3:6: error: 
#error "__AVX__ flag not set, no support for AVX"
 #error "__AVX__ flag not set, no support for AVX"
  ^
/home/username/Downloads/dealii/build/CMakeFiles/CMakeTmp/src.cxx: In function 
‘int main()’:
/home/username/Downloads/dealii/build/CMakeFiles/CMakeTmp/src.cxx:35:9: 
warning: AVX vector return without AVX enabled changes the ABI [-Wpsabi]
   b = _mm256_set1_pd ((volatile double)(2.25));
   ~~^~
CMakeFiles/cmTC_000f4.dir/build.make:65: recipe for target 
'CMakeFiles/cmTC_000f4.dir/src.cxx.o' failed
make[1]: *** [CMakeFiles/cmTC_000f4.dir/src.cxx.o] Error 1
make[1]: Leaving directory 
'/home/username/Downloads/dealii/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_000f4/fast' failed
make: *** [cmTC_000f4/fast] Error 2

Return value: 1
Source file was:

#ifndef __AVX__
#error "__AVX__ flag not set, no support for AVX"
#endif
#include 
class VectorizedArray
{
public:
  VectorizedArray &
  operator += (const VectorizedArray &vec)
  {
data = _mm256_add_pd (data, vec.data);
return *this;
  }
  __m256d data;
};
inline
VectorizedArray
operator + (const VectorizedArray &u, const VectorizedArray &v)
{
  VectorizedArray tmp = u;
  return tmp+=v;
}
int main()
{
  __m256d a, b;
  const unsigned int vector_bytes = sizeof(__m256d);
  const int n_vectors = vector_bytes/sizeof(double);
  __m256d * data =
reinterpret_cast<__m256d*>(_mm_malloc (2*vector_bytes, vector_bytes));
  double * ptr = reinterpret_cast(&a);
  ptr[0] = (volatile double)(1.0);
  for (int i=1; i(&data[1]);
  unsigned int return_value = 0;
  if (ptr[0] != 7.3125)
return_value = 1;
  for (int i=1; i(&e.data);
  for (int i=0; i
int main()
{
  __m512d a, b;
  const unsigned int vector_bytes = sizeof(__m512d);
  const int n_vectors = vector_bytes/sizeof(double);
  __m512d * data =
reinterpret_cast<__m512d*>(_mm_malloc (2*vector_bytes, vector_bytes));
  double * ptr = reinterpret_cast(&a);
  ptr[0] = (volatile double)(1.0);
  for (int i=1; i(&data[1]);
  unsigned int return_value = 0;
  if (ptr[0] != 7.3125)
return_value = 1;
  for (int i=1; i’)
 double() * std::complex();
 ~^~~
In file included from 
/home/username/Downloads/dealii/build/CMakeFiles/CMakeTmp/src.cxx:2:0:
/usr/include/c++/7/complex:404:5: note: candidate: template 
std::complex<_Tp> std::operator*(const _Tp&, const std::complex<_Tp>&)
 operator*(const _Tp& __x, const complex<_Tp>& __y)
 ^~~~
/usr/include/c++/7/complex:404:5: note:   template argument 
deduction/substitution failed:
/home/username/Downloads/dealii/build/CMakeFiles/CMakeTmp/src.cxx:6:36: note:   
deduced conflicting types for parameter ‘_Tp’ (‘double’ and ‘float’)
 d

[deal.II] Re: cmake fails when -DDEAL_II_WITH_MPI=ON

2018-01-24 Thread Eldar Khattatov
I forgot to mention, I tried both the development and 8.5.1versions of 
deal.II and the errors are the same.

-- 
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] cmake fails when -DDEAL_II_WITH_MPI=ON

2018-01-24 Thread Eldar Khattatov
I was asked to help a fellow graduate student with installing deal.ii on 
his laptop that runs Ubuntu 17.10, and for some reason, I end up having the 
following error message from cmake:

CMake Error at cmake/setup_finalize.cmake:95 (MESSAGE):
>
>   
>
> Configuration error: Cannot compile a test program with the final set 
>> of
>
> compiler and linker flags:
>
>   CXX flags (DEBUG): -pedantic -fPIC -Wall -Wextra -Wpointer-arith 
>> -Wwrite-strings -Wsynth -Wsign-compare -Wswitch -Woverloaded-virtual 
>> -Wno-placement-new -Wno-deprecated-declarations -Wno-literal-suffix 
>> -fopenmp-simd -std=c++17 -Wno-parentheses -Wno-unused-local-typedefs -Og 
>> -ggdb -Wa,--compress-debug-sections
>
>   LD flags  (DEBUG): -Wl,--as-needed -rdynamic -fuse-ld=gold -pthread 
>> -ggdb
>
>   LIBRARIES (DEBUG): 
>> /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_cxx.so;/usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_usempif08.so;/usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_usempi_ignore_tkr.so;/usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_mpifh.so;dl;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libumfpack.so;/usr/lib/x86_64-linux-gnu/libcholmod.so;/usr/lib/x86_64-linux-gnu/libccolamd.so;/usr/lib/x86_64-linux-gnu/libcolamd.so;/usr/lib/x86_64-linux-gnu/libcamd.so;/usr/lib/x86_64-linux-gnu/libsuitesparseconfig.so;/usr/lib/x86_64-linux-gnu/libamd.so;rt;/usr/lib/x86_64-linux-gnu/libparpack.so;/usr/lib/x86_64-linux-gnu/libarpack.so;/usr/lib/x86_64-linux-gnu/liblapack.so;/usr/lib/x86_64-linux-gnu/libblas.so;gfortran;quadmath;m;c;gcc_s;gcc;/usr/lib/libmpi.so;/usr/lib/x86_64-linux-gnu/libboost_iostreams.so;/usr/lib/x86_64-linux-gnu/libboost_serialization.so;/usr/lib/x86_64-linux-gnu/libboost_system.so;/usr/lib/x86_64-linux-gnu/libboost_thread.so;/usr/lib/x86_64-linux-gnu/libboost_regex.so;/usr/lib/x86_64-linux-gnu/libboost_chrono.so;/usr/lib/x86_64-linux-gnu/libboost_date_time.so;/usr/lib/x86_64-linux-gnu/libboost_atomic.so;pthread;/usr/lib/x86_64-linux-gnu/libnetcdf_c++.so;/usr/lib/x86_64-linux-gnu/libnetcdf.so;
>
> 
>
> Call Stack (most recent call first):
>
>   cmake/macros/macro_verbose_include.cmake:19 (INCLUDE)
>
>   CMakeLists.txt:132 (VERBOSE_INCLUDE)
>
>
>> -- Configuring incomplete, errors occurred!
>
> See also 
>> "/home/username/Downloads/dealii/build/CMakeFiles/CMakeOutput.log".
>
> See also "/home/username/Downloads/dealii/build/CMakeFiles/CMakeError.log".
>
>
When configured without MPI everything works smoothly. The openmpi version 
3.1 is installed, and it works fine on its own.
As I have never faced this issue before, could you please help me with 
figuring out what is going on?

I have also attached the complete console output of the cmake command. 

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.
Surface-Pro-4:~/Downloads/dealii/build$ cmake 
-DDEAL_INSTALL_PREFIX=~/libs/dealii -DDEAL_II_WITH_MPI=ON  ../
-- This is CMake 3.9.1
-- 
-- Include /home/username/Downloads/dealii/cmake/setup_external_macros.cmake
-- Include /home/username/Downloads/dealii/cmake/macros/macro_add_flags.cmake
-- Include 
/home/username/Downloads/dealii/cmake/macros/macro_check_compiler_setup.cmake
-- Include 
/home/username/Downloads/dealii/cmake/macros/macro_check_cxx_compiler_bug.cmake
-- Include 
/home/username/Downloads/dealii/cmake/macros/macro_check_mpi_interface.cmake
-- Include 
/home/username/Downloads/dealii/cmake/macros/macro_clear_cmake_required.cmake
-- Include 
/home/username/Downloads/dealii/cmake/macros/macro_configure_feature.cmake
-- Include 
/home/username/Downloads/dealii/cmake/macros/macro_deal_ii_add_definitions.cmake
-- Include 
/home/username/Downloads/dealii/cmake/macros/macro_deal_ii_add_library.cmake
-- Include 
/home/username/Downloads/dealii/cmake/macros/macro_deal_ii_add_test.cmake
-- Include 
/home/username/Downloads/dealii/cmake/macros/macro_deal_ii_find_file.cmake
-- Include 
/home/username/Downloads/dealii/cmake/macros/macro_deal_ii_find_library.cmake
-- Include 
/home/username/Downloads/dealii/cmake/macros/macro_deal_ii_find_path.cmake
-- Include 
/home/username/Downloads/dealii/cmake/macros/macro_deal_ii_find_program.cmake
-- Include 
/home/username/Downloads/dealii/cmake/macros/macro_deal_ii_initialize_cached_variables.cmake
-- Include 
/home/username/Downloads/dealii/cmake/macros/macro_deal_ii_insource_setup_target.cmake
-- Include 
/home/username/Downloads/dealii/cmake/macros/macro_deal_ii_invoke_autopilot.cmake
-- Include 
/home/username/Downloads/dealii/cmake/macros/macro_deal_ii_package_handle.cmake
-- Include 
/home/username/Downloads/dealii/cmake/macros/macro_deal_ii_pickup

Re: [deal.II] Combining Taylor-Hood and Raviart Thomas spaces with hp::FECollection

2017-08-31 Thread Eldar Khattatov
Thank you for the answer, it was indeed very easy to modify the RT_Nodal 
according to your comments. If this patch could be of use to the 
library/community I can commit my changes to the repo.

Best,
Eldar

On Friday, August 18, 2017 at 6:23:31 PM UTC-4, Wolfgang Bangerth wrote:
>
> On 08/18/2017 06:19 AM, Eldar Khattatov wrote: 
> > It tries to compare FE_RaviartThomas. This element indeed does not 
> implement 
> > compare_for_face_domination() function, 
>
> Correct. Though you could think about implementing it. 
>
>
> > so I tried using FE_RaviartThomasNodal 
> > instead, as it provides an implementation for this function. 
> Unfortunately, 
> > from what I understood from the implementation in RT_Nodal, it works 
> only if 
> > another element in the comparison is also of the same type RT_Nodal, 
> otherwise 
> > it has same Assert(false, ...) before return statement, 
>
> Yes, indeed. But it shouldn't be very difficult to extend it for the 
> particular case you are considering: that the other element is an 
> FE_Nothing. 
> The FE_Nothing describes a field that is constant zero, and so the 
> appropriate 
> interface condition is that the FE_RT_Nodal should also be zero at that 
> interface, or be left unconstrained, depending on how you want the 
> FE_Nothing 
> to be interpreted. That should be easy to implement. 
>
> Take a look at how the FE_Q element does this, in one of the classes that 
> sit 
> below class FiniteElement and class FE_Q in the class inheritance diagram. 
> I 
> think you'll see pretty quickly how you want to implement things for your 
> case. 
>
> 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.
For more options, visit https://groups.google.com/d/optout.


[deal.II] Re: Lagrange multipliers

2017-08-31 Thread Eldar Khattatov
One way of using Lagrange multipliers on the boundary is to have an 
additional full dimensional space for them. With this you will be able to 
compute the boundary terms, but you will need to restrict the interior DOFs 
of this space by adding something like: 

(epsilon * lambda, mu)_Omega,   (where epsilon some very small number not 
to affect your theoretical accuracy)

to your system (so it becomes nonsingular). This is not the most efficient 
way of doing it, but it is very easy as Deal.II has everything you need for 
this approach out of the box.

Best,
Eldar

On Tuesday, August 8, 2017 at 1:16:28 PM UTC-4, neverwoke wrote:
>
> Hello all. I am very new to the community but very eager to learn. I am 
> wonder if there is an out-of-the-box support for using Lagrange multipliers 
> on a boundary, to enforce rigid body motion in Stokes flow, similar to the 
> work of Glowinski [1] or Hwang [2]?
>
> [1] Glowinski, R., Pan, T. W., Hesla, T. I., Joseph, D. D., & Periaux, J. 
> (2001). A fictitious domain approach to the direct numerical simulation of 
> incompressible viscous flow past moving rigid bodies: application to 
> particulate flow. *Journal of Computational Physics*, *169*(2), 363-426.
> [2] Hwang, W. R., Hulsen, M. A., & Meijer, H. E. (2004). Direct 
> simulation of particle suspensions in sliding bi-periodic frames. *Journal 
> of Computational Physics*, *194*(2), 742-772.
>

-- 
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] Combining Taylor-Hood and Raviart Thomas spaces with hp::FECollection

2017-08-18 Thread Eldar Khattatov
It tries to compare FE_RaviartThomas. This element indeed does not 
implement compare_for_face_domination() function, so I tried using 
FE_RaviartThomasNodal instead, as it provides an implementation for this 
function. Unfortunately, from what I understood from the implementation in 
RT_Nodal, it works only if another element in the comparison is also of the 
same type RT_Nodal, otherwise it has same Assert(false, ...) before return 
statement, so I end up with similar exception message:

*An error occurred in line <537> of file 
<.../fe/fe_raviart_thomas_nodal.cc> in function*

*virtual FiniteElementDomination::Domination 
dealii::FE_RaviartThomasNodal<2>::compare_for_face_domination(const 
FiniteElement &) const [dim = 2]*

*The violated condition was:*

*false*



On Thursday, August 17, 2017 at 11:45:54 PM UTC-4, Wolfgang Bangerth wrote:
>
>
> > But this results in the error message: 
> > | 
> >  
> > An error occurred in line <936> of file 
>  
> > in function 
> >  dealii::FiniteElementDomination::Domination 
> > dealii::FiniteElement<,  
> >  >::compare_for_face_domination(const dealii::FiniteElement<, 
> >  >&) const [with int dim = 2; int spacedim = 2] 
> > The violated condition was: 
> >  false 
>
> The fact that you end up in the function of the FiniteElement base class 
> means 
> that one of the finite element classes on which you are calling this 
> function 
> does not implement this virtual function itself. 
>
>  From your backtrace, I do see that you're ending up in 
> FESystem::compare_for_face_domination(), but I can't see where it is 
> trying to 
> go from there. If you're in a debugger, can you see which element it's 
> currently trying to compare? 
>
> 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.
For more options, visit https://groups.google.com/d/optout.


[deal.II] Combining Taylor-Hood and Raviart Thomas spaces with hp::FECollection

2017-08-17 Thread Eldar Khattatov
Hi,

I am trying to implement a coupled Stokes-Darcy problem using Step-46 
tutorial as an example. So, essentially I would want to use something like 
the following

FESystem fe_stokes(FE_Q(2), dim,   // Stokes pair
FE_Q(1), 1,
FE_Nothing(dim), 1, // Darcy pair
FE_Nothing(), 1,
FE_Nothing(), 1);   // Lagrange multiplier

FESystem fe_darcy(FE_Nothing(), dim, 
   FE_Nothing(), 1,
   FE_RaviartThomas(0), 1,
   FE_DGQ(0), 1,
   FE_DGQ(0), 1);

hp::FECollection fe;
fe.push_back(fe_stokes);
fe.push_back(fe_darcy);

//...

dof_handler.distribute_dofs (fe);


But this results in the error message:

An error occurred in line <936> of file 
 in function
dealii::FiniteElementDomination::Domination 
dealii::FiniteElement<,  
>::compare_for_face_domination(const dealii::FiniteElement<, 
 >&) const [with int dim = 2; int spacedim = 2]
The violated condition was: 
false
Additional information: 
You are trying to use functionality in deal.II that is currently not 
implemented. In many cases, this indicates that there simply didn't appear 
much of a need for it, or that the author of the original code did not have 
the time to implement a particular case. If you hit this exception, it is 
therefore worth the time to look into the code to find out whether you may 
be able to implement the missing functionality. If you do, please consider 
providing a patch to the deal.II development sources (see the deal.II 
website on how to contribute).

Stacktrace:
---
#0  /home/eldar/Libs/DealII_8.5.1/lib/libdeal_II.g.so.9.0.0-pre: 
dealii::FiniteElement<2, 
2>::compare_for_face_domination(dealii::FiniteElement<2, 2> const&) const
#1  /home/eldar/Libs/DealII_8.5.1/lib/libdeal_II.g.so.9.0.0-pre: 
dealii::FESystem<2, 
2>::compare_for_face_domination(dealii::FiniteElement<2, 2> const&) const


>From what I could see the implementation of dealii::FiniteElement<2, 
2>::compare_for_face_domination(dealii::FiniteElement<2, 2> const&) const  
consists of Assert(false, ...) so for some reason what I am trying to do 
was not meant to be done this way. 

Could you please suggest what else could be done, or, maybe, there is just 
another way of approaching coupled problems like this one using Deal.II?

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] Re: Adding new finite element to the library

2017-01-09 Thread Eldar Khattatov
Thank you, it worked perfectly fine and now I can use these elements and do 
the tests.

On Friday, January 6, 2017 at 2:36:57 PM UTC-5, Denis Davydov wrote:
>
> Hi Eldar,
>
> The main thing to add your new FE class is 
> source/fe/CMakeLists.txt
> That should be all you need to do (plus, of course, don't forget to 
> instantiate it for all dim/spacedim as done for other FE spaces).
> You should also consider adding tests and checking that things like shape 
> values, gradients, evaluate of field values/ gradients 
> etc all work as expected both in volume as well as on faces.
> From my recent experience that is at least half of the work ;-)
>
> Regards,
> Denis.
>
>
> On Friday, January 6, 2017 at 8:24:20 PM UTC+1, Eldar Khattatov wrote:
>>
>> Hello,
>>
>> I was working on implementing new finite element space, which can roughly 
>> be described as RT + curl bubbles. I wrote the new FE class and the class 
>> for the underlying polynomials space. I wanted to incorporate these to my 
>> local installation of Deal.II in order to test it, so my question is how 
>> should I compile the library after adding these new source and header files 
>> in respective directories? I already added the appropriate inst.in files 
>> and modified the FE_poly_tensor.inst.in to account for this new 
>> polynomial space, however I still don't know how should I proceed with 
>> actual configuring and installing the library using cmake. 
>>
>> 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] Adding new finite element to the library

2017-01-06 Thread Eldar Khattatov
Hello,

I was working on implementing new finite element space, which can roughly 
be described as RT + curl bubbles. I wrote the new FE class and the class 
for the underlying polynomials space. I wanted to incorporate these to my 
local installation of Deal.II in order to test it, so my question is how 
should I compile the library after adding these new source and header files 
in respective directories? I already added the appropriate inst.in files 
and modified the FE_poly_tensor.inst.in to account for this new polynomial 
space, however I still don't know how should I proceed with actual 
configuring and installing the library using cmake. 

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] Re: Neumann condtitions in the mixed space setting

2016-08-30 Thread Eldar Khattatov
I managed to imply the Neumann conditions on stress only by first 
projecting the boundary values to the entire mixed space (affecting 
rotations), and then manually removing the constraints associated with 
rotations. The code is below if someone is interested.
VectorTools::project_boundary_values (dof_handler,
  stress_boundary_functions,
  QGauss(2),
  boundary_values_stress);

FEValuesExtractors::Scalar rotation(dim*dim + dim);
VectorTools::interpolate_boundary_values (dof_handler,
  0,
  ZeroFunction(dim*dim + dim + 
0.5*dim*(dim-1)),
  boundary_values_rotation,
  fe.component_mask(rotation));

for (std::map::iterator it_r=
boundary_values_rotation.begin();
 it_r!=boundary_values_rotation.end();
 ++it_r)
   boundary_values_stress.erase(it_r->first);

MatrixTools::apply_boundary_values (boundary_values_stress,
system_matrix,
solution,
system_rhs);


I still wonder, though, if there is a nicer way to do it.

-- 
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] Neumann condtitions in the mixed space setting

2016-08-30 Thread Eldar Khattatov
I am trying to implement mixed elasticity with Neumann conditions using 
deal.ii. The formulation seeks for stress, displacement and rotation as the 
unknowns, and the Neumann conditions are to set stress normal components to 
be equal to some function g. 

I know that for mixed Darcy it is possible to do this using

project_boundary_values

as from what I understood from the implementation of this method, it does 
not do anything to pressure DoFs as they are not on the boundary. However, 
in my setting I am using BDM1 - Q0 - Q1_cts for elasticity, and while this 
approach does not constrain displacements, it actually restricts rotations, 
which I would want to avoid. I looked at
  
interpolate_boundary_values

which takes ComponentMask as an argument, but unfortunately it does not 
work with the elements I am using. Could you please point me to the 
possible way of solving this issue?

Another question, for mixed Darcy, is there a difference in using

project_boundary_values

or
  
project_boundary_values_div_conforming

dealing with Neumann conditions?

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.