Skip to content

problem.solve() error for linear fitting #182

@aliikhsanul

Description

@aliikhsanul

I try to modify the linear fitting example from: https://github.com/OpenCMISS-Examples/examples/tree/v1.0/Fitting/CubeToSphere

So, in short, I am now able to fit the cube to the surface data. The script also allow for multiple fitting iteration but works only with “generatedMesh” and fixed “tau” and “kappa” parameter.

However, the error emerge when I try to do fitting from the previous data (exelem and exnode file). So far, the error is only during execution of “problem.Solve()” (line 588) command.

Here are the steps I have done:

  1. For 1st iteration, I run the python script within python virtual environment:
    python test.py
  2. For the 2nd iteration, I modify some lines in the code:
    a. Line 127. Change “iteration” from 1 to 2.
    b. Line 137. Change “tau” parameter to 0.1

Right after that steps, I got the following error message:

(oclibs_venv_py27_release) cml@CML-LINUX:~/Documents/Code/Github-repo/OpenCMISS/opencmiss/examples_Ali/CubeToSphere2/Python$ python test.py
Number of data points: 2000
Projecting data points onto geometric field
Projection complete
Solving fitting problem, iteration: 1
Solver:
Solver index = 1
Solver pre-solve:
Solver equations solve:

WARNING: Zero Determinant for matrix A.

I have been searching problem to the source code, but I couldn’t find it yet.
Anybody understand how to solve this?

Here I attach the test.py script file.

test.py.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions