# Singular Matrix

**URL:** <https://community.freefem.org/t/singular-matrix/2123>\
**Category:** General Discussion\
**Created:** [November 17, 2022, 4:43am UTC](https://community.freefem.org/t/singular-matrix/2123 "2022-11-17T04:43:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hyahoos](https://avatars.discourse-cdn.com/v4/letter/h/898d66/32.png) [@hyahoos](https://community.freefem.org/u/hyahoos)\
**Post date:** [November 17, 2022, 4:43am UTC](https://community.freefem.org/t/singular-matrix/2123/1 "2022-11-17T04:43:12Z")

</div>

```auto
load "msh3"

////////////////////////////////////////////////////////////////////////////////////
//Problem Variables
////////////////////////////////////////////////////////////////////////////////////
real EI=1.2;
real p=4.0;

////////////////////////////////////////////////////////////////////////////////////
//Meshing
////////////////////////////////////////////////////////////////////////////////////
meshL Msh = Sline(40,[x,1,x*0.1]);

////////////////////////////////////////////////////////////////////////////////////
//Solving
////////////////////////////////////////////////////////////////////////////////////
//Defining the Finite Element Simulation
fespace Ob(Msh, P2);
//Defining all variables within the FEM Simulation
Ob u, w;

//Implementing the PDE
solve OneDBeam(u, w)
    = int1d(Msh)(
        dxx(w)*EI*dxx(u)
    )
    - int1d(Msh)(
        w*p
    )
    + on(1, u=2);

////////////////////////////////////////////////////////////////////////////////////
//Plotting
////////////////////////////////////////////////////////////////////////////////////
//Show the Mesh, press enter to move to next plot
plot(Msh, wait=true);
plot(Msh, u, wait=true);

////////////////////////////////////////////////////////////////////////////////////
//End
////////////////////////////////////////////////////////////////////////////////////

```

I ran it on a linux machine and this is the output:

```auto
  39 : ////////////////////////////////////////////////////////////////////////////////////
   40 : //End
   41 : ////////////////////////////////////////////////////////////////////////////////////
   42 : sizestack + 1024 =1752 ( 728 )

  -- Build Nodes/DF on mesh : n.v. 41, n. elmt. 40, n b. elmt. 2
     nb of Nodes 81 nb of DoF 81 DFon=1100
  -- FESpace: Nb of Nodes 81 Nb of DoF 81
1 UMFPACK WARNING singular matrix 
1 UMFPACK WARNING singular matrix 
  -- Solve : 
          min inf max inf
  Plot:: Sorry no ps version for this type of plot 55
  Plot:: Sorry no ps version for this type of plot 55
  Plot:: Sorry no ps version for this type of plot 14
times: compile 0.004249s, execution 0.000558s, mpirank:0
 CodeAlloc : nb ptr 3830, size :515384 mpirank: 0
Ok: Normal End

```

I am trying to solve a simple 1d beam problem wherein I have something like a weak form:  
integral w’’ \* E_I \* u’’ dx - integral w_p dx  
wherein E\*I is flexural stiffness, w is weight function and p is distributed load.

I think that there is a problem with the matrix beign singular but I dont really see what I am missing from a problem definition standpoint. I hope you guys can help me. Thanks alot
