I think I still have one doubt.
// Updating the geometry
x.peq(dx); // x := x + dx
// Solving constraints
// Calls “solveConstraint” method of every ConstraintSolver objects found in the current context tree.
// todo(jnbrunet): Shouldn’t this be done AFTER the position propagation of the…[Read more]
Great, that is what I was looking for.
So if I understand correctly,
1) Compute forces and current error to bootstrap the solver
2) Compute a dx
3) Compute x as x0 + dx
4) Propagate this changes through the graph using
5) Recompute forces, now in the new state
Somewhere between 4 and 5,…[Read more]
I want to debug some forces on the initial state of the simulation. What I am doing right now is set the dt to 0 and do a step, that way the correct visitors are launched and the forces are computed, but looks like a hack.
What is the correct way to ask SOFA to compute force? I guess that I will also need to apply mappings before computing…[Read more]
I have looked at the EulerImplicitSolver and it only does a Newton step integration. I am trying to implement a version of it doing several Newton steps for integrating more complex energies and systems but I am stuck on the design of it.
Normally, when I do this kind of solvers outside of SOFA, I implement a solve very similar to what…[Read more]
Sorry, cant share the scene description right now. Ill do it ASAP.
One thing I normally dont have clear if is I have to add the kFactor or dt on the computations and also the sign of the result.
For example, if used in a EulerImplicit solver, the force is multiplied by the dt and the hessian is multiplied by dt+beta value (or something like…[Read more]
@Froy can you provide a bit more details or documentation on how to do this? I am trying to mimic what I see in other types, but I fail to actually make it work. I am having linking errors when I try to load my plugin.
[ERROR] [PluginManager] Plugin loading failed (/home/jjcasmar/projects/VNCSSofaPlugin/build/Debug/lib/libVNCSSofaPlugin.so):…
I am implementing a Mapping that, given my degress of freedom, computes the deformation gradient. Then I have an energy that depends on the deformation gradient. With this scheme, I have some doubts.
First of all, the math for this scheme would be
u = DoF
F = g(u) // Deformation gradient is a function of the DoF
E = e(F) // Energy is a…[Read more]
jjcasmar started the topic Unable to assign rest_position to MO in SofaPython3 plugin in Debug mode in the forum Programming with SOFA 3 months, 2 weeks ago
I have compiled SOFA and SofaPython3 plugni in debug mode. In this scenario, I try to assign a numpy vector to the rest position of a mechanical object, but it fails. This is the python code I am executing:
xNObject = coarseObject.addChild(“xN”)
xN_mo = xNObject.addObject(“MechanicalObject”, template=”Vec1″, name=”xN_MO”)…[Read more]
I want to replicate some of the functionality in Flexible plugin, and since I havent been able to make it work properly, I am trying to add some stuff of my own. In particular, I want to add a new template for deformation gradient types (3×3, 3×2, 2×2 and 1×1 matrices) but I am not sure how to create the types so that I can do a…[Read more]
I want to use Eigen::SparseMatrix in SofaPython3 and provide it as a scipy csr sparse matrix but SOFA fails to convert it with the following error:
[ERROR] [SofaPython3::SceneLoader] RuntimeError: Trying to set the value of the data C, but the later hasn’t register it’s DataTypeInfo (see sofa/defaulttype/DataTypeInfo.h for more…[Read more]
Well, that depends on your preconditioner. For my particular use case, the preconditioned can be represented as a matrix, but its easier to represent it as some functions, kind of matrix-free preconditioner. I think saying that a its based on a external linear direct solver may arise to some misconceptions later. Better to just say that is has to…[Read more]
Thanks Hugo. I have read the document you proposed and I think that this:
The ShewchukPCGLinearSolver allows to choose the preconditioner of our choice based on an external direct linear solver: LULinearSolver, SparseLDLSolver, etcIs not exactly correct.
From reading the source code, I think any linear solver can be used, not only direct linear…[Read more]
So ShewchukPCGSolver is a preconditioned conjugate gradient implementation. Why is not the default CG implementation? Seems like it is a bit hidden…
If I understand correctly, I just need to provide an implementation of my preconditioner, deriving it from
sofa::core::behavior::LinearSolverand link it to the preconditioners property, right?
I have been looking for preconditioners in SOFA but I havent been able to found any way to use them. Is there anyway to use a preconditioner or implement our own to use with the CG solver?
I am trying to implement an AngularVelocityConstraint. I am looking at the LinearVelocityConstraint for inspiration and I see that if the constraint is still active (
if(finished)...), it applies some corrections to the positions, but if not, it doesn’t. Is this the correct behavior? Do I need to apply the constraint to both the velocity and…[Read more]
Okay, was my problem. Didnt realize the the example scene I was looking to had the fixed collider outside the scope of the ODESolver and the CGSolver. I have put my shere outside the scope of my ODESolver and now is fixed.
- Load More