Hello,

Working on my project (see mailinglist entry [deal.II] "Combining BEM and
FEM") I have come to an unexpected obstacle: 
I don't seem to be able to create a FESystem<1,2> BEM_fe (FE_Q<1,2>(1), 2)
in the main class' constructor

template <int dim>
ElasticProblem<dim>::ElasticProblem ()
                :
                FEM_dof_handler (FEM_triangulation),
                FEM_fe (FE_Q<dim>(1), dim),
                BEM_dof_handler (BEM_triangulation),
                BEM_fe (FE_Q<dim-1,dim>(1), dim+1) // create dim+1 BEM
element with dim+1 degree of            // one for potential xi and three
displacement variables.
                //    FESystem<dim-1,dim>       BEM_fe;
{}

But that's only in 2D case, 3D runs fine. 

The exception is due to the FESystem constructor's attempt to
dealii::FESystem<1,2>::initialize_unit_face_support_points(), as their
dimension is dim-1 referred to the FESystem's dimension, which is already
dim-1=1, so we get a point with dim=0, which is not valid.

As mentioned above, it's no problem in 3D or if I don't build a FESystem,
but use a single FE_Q object in dim=spacedim-1 (2D and 3D). Still I want to
solve a vector valued problem with BEM in 2D (and 3D)...

--------------------------------------------------------
An error occurred in line <391> of file
</home/user/Public/deal.II/base/include/base/tensor_base.h> in function
    dealii::Tensor<1, dim>::Tensor(bool) [with int dim = 0]
The violated condition was: 
    dim>0
The name and call sequence of the exception was:
    ExcDimTooSmall(dim)
Additional Information: 
dim must be positive, but was 0

Stacktrace:
-----------
#0  /home/user/Public/deal.II/lib/libdeal_II_1d.g.so.6.2.0:
dealii::Tensor<1, 0>::Tensor(bool)
#1  /home/user/Public/deal.II/lib/libdeal_II_1d.g.so.6.2.0:
dealii::Point<0>::Point()
#2  /home/user/Public/deal.II/lib/libdeal_II_1d.g.so.6.2.0:
dealii::FESystem<1, 2>::initialize_unit_face_support_points()
#3  /home/user/Public/deal.II/lib/libdeal_II_1d.g.so.6.2.0:
dealii::FESystem<1, 2>::initialize()
#4  /home/user/Public/deal.II/lib/libdeal_II_1d.g.so.6.2.0:
dealii::FESystem<1, 2>::FESystem(dealii::FiniteElement<1, 2> const&,
unsigned int)
#5  /home/user/Public/deal.II/examples/step-8/step-8:
ElasticProblem<2>::ElasticProblem()
#6  /home/user/Public/deal.II/examples/step-8/step-8: main
--------------------------------------------------------


Looking at the fe_system.cc I understand the 1D case is to be caught by a
preprocessor condition (line 1833), checking deal_II_dimension, which
appears to coincide with the spacial dimension. But it doesn't catch the
case of 1D objects in 2D space.
So I wanted to somehow change that condition in fe_system.cc.

But not being very experienced with C++ and preprocessor stuff, I have not
been able to find out, where (and how!) exactly this variable is
created/defined!! (I use a small project makefile as in step-8 tutorial). So
this would be my first (general) question.

The next one is whether this exception should be caught by an altered
preprocessor condition, or to implement another if(dim==1){// no faces, do
nothing} condition inside the general template <int dim, int spacedim> void
FESystem<dim,spacedim>::initialize_unit_face_support_points (){...} routine
(which I've done for simplicity in my library, seems to do the job, but
that's hardly professional I guess)


Greetings
Till

_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to