On Wed, Apr 28, 2010 at 12:49 PM, Roy Stogner <[email protected]>wrote:

>
> On Wed, 28 Apr 2010, liang cheng wrote:
>
>  I made a 3D finite deformation elasticity input code and got the
>> executable
>> file, while the logical error displayed
>> in the screen when running it.
>>
>> Assertion `!_points.empty()' failed.
>> [0] /home/liang/Desktop/libmesh/include/quadrature/quadrature.h, line 116,
>>
>
> This usually means that the quadrature rule wasn't properly
> reinitialized on an element.  Did you attach it to your FE object, and
> did you reinit() the latter?
> ---
> Roy
>

Yes, I did it in the assemble subroutine as below. The system.init() is
added in the man().

I am using both the [SparseMatrix<Number>& stiffness] and
[DenseMatrix<Number> Ke]
to define the stiffness matrix, actually only [DenseMatrix<Number> Ke] is
used for computation,
and the compiler warned me that the [SparseMatrix<Number>& stiffness] is not
used, but
still pass the compile. I am thinking if the Newmark solver requires the
[SparseMatrix<Number>& stiffness]  to define the [K] matrix instead of
 [DenseMatrix<Number> Ke], and the same thing for the [C],[M]
matrix. Is this possible reason for the error?

Thanks!

Liang

*************************************
void assemble_ldm (EquationSystems& es,
                      const std::string& system_name)
{
  libmesh_assert (system_name == "Disp_finite_deform_3d");

  const MeshBase& mesh = es.get_mesh();
  const unsigned int dim = mesh.mesh_dimension();
  const Real G_neoHoo = es.parameters.get<Real>("shear modulus");
  const Real K_neoHoo = es.parameters.get<Real>("bulk modulus");
  const Real mass_dens = es.parameters.get<Real>("mass density");

  NewmarkSystem & large_deform_system =
    es.get_system< NewmarkSystem> (system_name);

  const unsigned int u_var = large_deform_system.variable_number ("u");
  const unsigned int v_var = large_deform_system.variable_number ("v");
  const unsigned int w_var = large_deform_system.variable_number ("w");

  FEType fe_type = large_deform_system.variable_type(u_var); // n1_var=0

  SparseMatrix<Number>& stiffness =
large_deform_system.get_matrix("stiffness");
  SparseMatrix<Number>& damping =
large_deform_system.get_matrix("damping");
  SparseMatrix<Number>& mass =      large_deform_system.get_matrix("mass");
  NumericVector<Number>& force =    large_deform_system.get_vector("force");


  SparseMatrix<Number>& matrix =    *large_deform_system.matrix;
  DenseMatrix<Number>   zero_matrix;

  AutoPtr<FEBase> fe        (FEBase::build(dim, fe_type));
  AutoPtr<FEBase> fe_face   (FEBase::build(dim, fe_type));

  QGauss qrule (dim,    fe_type.default_quadrature_order());
  QGauss qface (dim-1,  fe_type.default_quadrature_order());
*
  fe->      attach_quadrature_rule (&qrule);*
  fe_face-> attach_quadrature_rule (&qface);

  const std::vector<Real>& JxW =               fe->get_JxW();
  const std::vector<std::vector<Real> >& phi = fe->get_phi();
  const std::vector<std::vector<RealGradient> >& dphi = fe->get_dphi();
  const DofMap& dof_map = large_deform_system.get_dof_map();

  DenseMatrix<Number> Ke, Ce, Me;
  DenseVector<Number> Fe;
/********* 3 variables => 3x3 K matrix and 3 vectors *********/
  DenseSubMatrix<Number>
    Kuu(Ke), Kuv(Ke), Kuw(Ke),
    Kvu(Ke), Kvv(Ke), Kvw(Ke),
    Kwu(Ke), Kwv(Ke), Kww(Ke);

  DenseSubMatrix<Number>
    Cuu(Ce), Cuv(Ce), Cuw(Ce),
    Cvu(Ce), Cvv(Ce), Cvw(Ce),
    Cwu(Ce), Cwv(Ce), Cww(Ce);

  DenseSubMatrix<Number>
    Muu(Me), Muv(Me), Muw(Me),
    Mvu(Me), Mvv(Me), Mvw(Me),
    Mwu(Me), Mwv(Me), Mww(Me);

  DenseSubVector<Number>
    Fu(Fe),
    Fv(Fe),
    Fw(Fe);

.
.
......define additional vectors segment
.
.
.
  for ( ; el != end_el; ++el)
    {
      const Elem* elem = *el;
      dof_map.dof_indices (elem, dof_indices);
      dof_map.dof_indices (elem, dof_indices_u, v_var);
      dof_map.dof_indices (elem, dof_indices_v, u_var);
      dof_map.dof_indices (elem, dof_indices_w, w_var);

      const unsigned int n_dofs   = dof_indices.size();
      const unsigned int n_u_dofs = dof_indices_u.size();
      const unsigned int n_v_dofs = dof_indices_v.size();
      const unsigned int n_w_dofs = dof_indices_w.size();

   *   fe->reinit  (elem);*

      Ke.resize (n_dofs, n_dofs);
      Ce.resize (n_dofs, n_dofs);
      Me.resize (n_dofs, n_dofs);
      zero_matrix.resize (n_dofs, n_dofs);
      Fe.resize (n_dofs);
------------------------------------------------------------------------------
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to