Thank you very much! This bug has been corrected.
Then I want to implement 
\alpha \int _{\partial \Omega }uvds+\beta \int _{\partial \Omega }\left ( 
\mathbf{n}\cdot\bigtriangledown v \right ) \left ( \mathbf{n}\cdot 
\bigtriangledown  u  \right )ds +\int _{\partial \Omega }\left \{ 
\mathbf{n}\cdot \bigtriangledown \left ( \Delta u \right ) \right \}\left [ 
v \right ]ds +\lambda _{1}\int _{\partial \Omega }\left \{ \mathbf{n}\cdot 
\bigtriangledown \left ( \Delta v \right ) \right \}\left [  u\right 
]ds-\int _{\partial \Omega }\left \{ \Delta u \right \}\left [ 
\mathbf{n}\cdot \bigtriangledown v \right ]ds-\lambda _{2}\int _{\partial 
\Omega }\left \{ \Delta v \right \}\left [ \mathbf{n}\cdot \bigtriangledown 
u \right ]ds
i.e.

<https://lh3.googleusercontent.com/-JblZpdmoty0/WpX4J4OrvBI/AAAAAAAAAAo/eFafJ2HUtz0qG1gmS6VnZtMsC-9i5CcFQCLcBGAs/s1600/20.JPG>

I want to make delta_u and delta_v with same data structure as u and v, I 
think is Class FEValuesBase, but I can't create a FEValuesBase object 
correctly:
 template <int dim>
    void nitsche_matrix (
      FullMatrix<double> &M,
      const FEValuesBase<dim> &fe,
      double penalty_alpha,
      double penalty_beta,
      double factor = 1.,
      double lambda1 = 1.,
      double lambda2 = 1.)
    {
      const unsigned int n_dofs = fe.dofs_per_cell;
      const unsigned int n_comp = fe.get_fe().n_components();
      
      
      dealii::FEValuesBase<2, dim>::FEValuesBase() ;{}

      FEValuesBase<2,dim> delta_v;
      FEValuesBase<2,dim> delta_u;
      
      Assert (M.m() == n_dofs, ExcDimensionMismatch(M.m(), n_dofs));
      Assert (M.n() == n_dofs, ExcDimensionMismatch(M.n(), n_dofs));

      for (unsigned int k=0; k<fe.n_quadrature_points; ++k)
        {
          const double dx = fe.JxW(k) * factor;
          const Tensor<1,dim> n = fe.normal_vector(k);
          for (unsigned int i=0; i<n_dofs; ++i)
          {
            for (unsigned int j=0; j<n_dofs; ++j)
            {
             
              for (unsigned int d=0; d<n_comp; ++d)
              {
                Tensor<2, dim> hessian_phi_v = 
fe.shape_hessian_component(i, k, d);
                Tensor<2, dim> hessian_phi_u = 
fe.shape_hessian_component(j, k, d);
                delta_v.shape_value_component(i,k,d) = trace(hessian_phi_v);
                delta_u.shape_value_component(j,k,d) = trace(hessian_phi_u);
              } 
              }
              }
              
         for (unsigned int i=0; i<n_dofs; ++i)
          {
            for (unsigned int j=0; j<n_dofs; ++j)
            {
              for (unsigned int d=0; d<n_comp; ++d)
              {
                M(i,j) += dx *
                          (2. * fe.shape_value_component(i,k,d) * 
penalty_alpha * fe.shape_value_component(j,k,d)
                          +2. * (n * fe.shape_grad_component(i,k,d)) * 
penalty_beta * (n * fe.shape_grad_component(j,k,d))
                           + (n * delta_u.shape_grad_component(j,k,d)) * 
fe.shape_value_component(i,k,d)  
                           + lambda1 * (n * 
delta_v.shape_grad_component(i,k,d)) * fe.shape_value_component(j,k,d) 
                           - (n * fe.shape_grad_component(i,k,d)) * 
delta_u.shape_value_component(j,k,d)
                           - lambda2 * (n * fe.shape_grad_component(j,k,d)) 
* delta_v.shape_value_component(i,k,d));
                           }
                           }
                           }
        }
    }

When "run", it shows

yucan@ubuntu-csrc-b224:~/boost/deal.II/examples/practice-4order-39$ make
Scanning dependencies of target practice4order39
[100%] Building CXX object 
CMakeFiles/practice4order39.dir/practice-4order-39.cc.o
In file included from 
/home/yucan/boost/deal.II/examples/practice-4order-39/practice-4order-39.cc:48:0:
/home/yucan/boost/deal.II/include/deal.II/integrators/biharmonic.h: In 
instantiation of ‘void 
dealii::LocalIntegrators::Biharmonic::nitsche_matrix(dealii::FullMatrix<double>&,
 
const dealii::FEValuesBase<dim>&, double, double, double, double, double) 
[with int dim = 2]’:
/home/yucan/boost/deal.II/examples/practice-4order-39/practice-4order-39.cc:138:81:
 
  required from ‘void 
practice4order39::MatrixIntegrator<dim>::boundary(dealii::MeshWorker::DoFInfo<dim>&,
 
dealii::MeshWorker::IntegrationInfo<dim>&) const [with int dim = 2]’
/home/yucan/boost/deal.II/examples/practice-4order-39/practice-4order-39.cc:973:1:
 
  required from here
/home/yucan/boost/deal.II/include/deal.II/integrators/biharmonic.h:93:50: 
error: dependent-name ‘dealii::FEValuesBase<2, dim>::FEValuesBase’ is 
parsed as a non-type, but instantiation yields a type
       dealii::FEValuesBase<2, dim>::FEValuesBase() ;{}
                                                  ^
/home/yucan/boost/deal.II/include/deal.II/integrators/biharmonic.h:93:50: 
note: say ‘typename dealii::FEValuesBase<2, dim>::FEValuesBase’ if a type 
is meant
/home/yucan/boost/deal.II/include/deal.II/integrators/biharmonic.h:95:27: 
error: no matching function for call to ‘dealii::FEValuesBase<2, 
2>::FEValuesBase()’
       FEValuesBase<2,dim> delta_v;
                           ^
/home/yucan/boost/deal.II/include/deal.II/integrators/biharmonic.h:95:27: 
note: candidates are:
In file included from 
/home/yucan/boost/deal.II/include/deal.II/meshworker/dof_info.h:24:0,
                 from 
/home/yucan/boost/deal.II/examples/practice-4order-39/practice-4order-39.cc:42:
/home/yucan/boost/deal.II/include/deal.II/fe/fe_values.h:2739:3: note: 
dealii::FEValuesBase<dim, spacedim>::FEValuesBase(const 
dealii::FEValuesBase<dim, spacedim>&) [with int dim = 2; int spacedim = 2]
   FEValuesBase (const FEValuesBase &);
   ^
/home/yucan/boost/deal.II/include/deal.II/fe/fe_values.h:2739:3: note:   
candidate expects 1 argument, 0 provided
/home/yucan/boost/deal.II/include/deal.II/fe/fe_values.h:1474:3: note: 
dealii::FEValuesBase<dim, spacedim>::FEValuesBase(unsigned int, unsigned 
int, dealii::UpdateFlags, const dealii::Mapping<dim, spacedim>&, const 
dealii::FiniteElement<dim, spacedim>&) [with int dim = 2; int spacedim = 2]
   FEValuesBase (const unsigned int n_q_points,
   ^
/home/yucan/boost/deal.II/include/deal.II/fe/fe_values.h:1474:3: note:   
candidate expects 5 arguments, 0 provided
In file included from 
/home/yucan/boost/deal.II/examples/practice-4order-39/practice-4order-39.cc:48:0:
/home/yucan/boost/deal.II/include/deal.II/integrators/biharmonic.h:96:27: 
error: no matching function for call to ‘dealii::FEValuesBase<2, 
2>::FEValuesBase()’
       FEValuesBase<2,dim> delta_u;
                           ^
/home/yucan/boost/deal.II/include/deal.II/integrators/biharmonic.h:96:27: 
note: candidates are:
In file included from 
/home/yucan/boost/deal.II/include/deal.II/meshworker/dof_info.h:24:0,
                 from 
/home/yucan/boost/deal.II/examples/practice-4order-39/practice-4order-39.cc:42:
/home/yucan/boost/deal.II/include/deal.II/fe/fe_values.h:2739:3: note: 
dealii::FEValuesBase<dim, spacedim>::FEValuesBase(const 
dealii::FEValuesBase<dim, spacedim>&) [with int dim = 2; int spacedim = 2]
   FEValuesBase (const FEValuesBase &);
   ^
/home/yucan/boost/deal.II/include/deal.II/fe/fe_values.h:2739:3: note:   
candidate expects 1 argument, 0 provided
/home/yucan/boost/deal.II/include/deal.II/fe/fe_values.h:1474:3: note: 
dealii::FEValuesBase<dim, spacedim>::FEValuesBase(unsigned int, unsigned 
int, dealii::UpdateFlags, const dealii::Mapping<dim, spacedim>&, const 
dealii::FiniteElement<dim, spacedim>&) [with int dim = 2; int spacedim = 2]
   FEValuesBase (const unsigned int n_q_points,
   ^
/home/yucan/boost/deal.II/include/deal.II/fe/fe_values.h:1474:3: note:   
candidate expects 5 arguments, 0 provided
In file included from 
/home/yucan/boost/deal.II/examples/practice-4order-39/practice-4order-39.cc:48:0:
/home/yucan/boost/deal.II/include/deal.II/integrators/biharmonic.h:114:54: 
error: lvalue required as left operand of assignment
                 delta_v.shape_value_component(i,k,d) = 
trace(hessian_phi_v);
                                                      ^
/home/yucan/boost/deal.II/include/deal.II/integrators/biharmonic.h:115:54: 
error: lvalue required as left operand of assignment
                 delta_u.shape_value_component(j,k,d) = 
trace(hessian_phi_u);
                                                      ^
make[2]: *** [CMakeFiles/practice4order39.dir/practice-4order-39.cc.o] 
Error 1
make[1]: *** [CMakeFiles/practice4order39.dir/all] Error 2
make: *** [all] Error 2


I wander if my idea is correct and is the problem initialization?
But I've been confused about the right format. Please give me some help! 
Thank you!

chucui1016


在 2018年2月27日星期二 UTC+8上午11:36:22,Timo Heister写道:
>
> > "make run" have error, and I don't understand what it mean and how to 
> do: 
>
> Did you read the error message, namely: 
>
> > You are requesting information from an 
> FEValues/FEFaceValues/FESubfaceValues 
> > object for which this kind of information has not been computed. What 
> > information these objects compute is determined by the update_* flags 
> you 
> > pass to the constructor. Here, the operation you are attempting requires 
> the 
> > <update_hessians> flag to be set, but it was apparently not specified 
> upon 
> > construction. 
>
> ? I think the message is pretty clear on what is wrong. If you 
> struggle with this, you should probably go back and work through the 
> first tutorials. 
>
> -- 
> Timo Heister 
> http://www.math.clemson.edu/~heister/ 
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to