Example #1
0
    BaseMechanicsPlugin(): Plugin("BaseMechanics") {
        setDescription("");
        setVersion("");
        setLicense("LGPL");
        setAuthors("The SOFA Team");

    }
/**
 * An implementation of the AssemblySolver 
 *
 * @param model to assemble
 */
AssemblySolver::AssemblySolver
   (const Model &model, const SimTK::Array_<CoordinateReference> &coordinateReferences,
    double constraintWeight) : Solver(model),
    _coordinateReferencesp(coordinateReferences)
{
    setAuthors("Ajay Seth");
    _assembler = NULL;
    
    _constraintWeight = constraintWeight;

    // default accuracy
    _accuracy = 1e-4;

    // Get model coordinates
    const CoordinateSet& modelCoordSet = getModel().getCoordinateSet();

    SimTK::Array_<CoordinateReference>::iterator p;

    // Cycle through coordinate references
    for(p = _coordinateReferencesp.begin(); 
        p != _coordinateReferencesp.end(); p++) 
    {
        if(p){
            //Find if any references that are empty and throw them away
            if(p->getName() == "" || p->getName() == "unknown"){
                //Get rid of the corresponding reference too
                p = _coordinateReferencesp.erase(p);
            }
            // Otherwise an error if the coordinate does not exist for this model
            else if ( !modelCoordSet.contains(p->getName())){
                throw(Exception("AssemblySolver: Model does not contain coordinate "+p->getName()+"."));
            }
        }
    }
}
    GeneralImplicitOdeSolverPlugin(): Plugin("GeneralImplicitOdeSolver") {
        setDescription("");
        setVersion("");
        setLicense("LGPL");
        setAuthors("The SOFA Team");

    }
Example #4
0
    BoundaryConditionPlugin(): Plugin("BoundaryCondition") {
        setDescription("");
        setVersion("");
        setLicense("LGPL");
        setAuthors("The SOFA Team");

    }
Example #5
0
BaseVisualPlugin::BaseVisualPlugin():
    Plugin("BaseVisual") {
    setDescription("");
    setVersion("");
    setLicense("LGPL");
    setAuthors("The SOFA Team");
}
CoordinateReference::CoordinateReference() : Reference_<double>(),
    _coordinateValueFunction(_coordinateValueFunctionProp.getValueObjPtrRef()),
    _defaultWeight(_defaultWeightProp.getValueDbl())
{
    setAuthors("Ajay Seth");
    _names.resize(getNumRefs());
    _names[0] = getName();
}
/**
 * An implementation of the MomentArmSolver 
 *
 */
MomentArmSolver::MomentArmSolver(const Model &model) : Solver(model)
{
	setAuthors("Ajay Seth");
	_stateCopy = model.getWorkingState();

	// Get the body forces equivalent of the point forces of the path
	_bodyForces = Vector_<SpatialVec>(getModel().getNumBodies(), SpatialVec(0));
	// get the right size coupling vector
	_coupling = _stateCopy.getU();
}
/**
 * An implementation of the MomentArmSolver 
 *
 */
MomentArmSolver::MomentArmSolver(const Model &model) : Solver(model)
{
    setAuthors("Ajay Seth");
    _stateCopy = model.getWorkingState();

    // Get the body forces equivalent of the point forces of the path
    _bodyForces = getModel().getSystem()
        .getRigidBodyForces(_stateCopy, Stage::Instance);
    // get the right size coupling vector
    _coupling = _stateCopy.getU();
}
/**
 * An implementation of the InverseKinematicsSolver 
 *
 * @param model to assemble
 */
InverseKinematicsSolver::InverseKinematicsSolver(const Model &model, MarkersReference &markersReference,
                            SimTK::Array_<CoordinateReference> &coordinateReferences,
                            double constraintWeight) : AssemblySolver(model, coordinateReferences, constraintWeight),
                            _markersReference(markersReference) 
{
    setAuthors("Ajay Seth");

    // Base AssemblySolver takes care of creating the underlying _assembler and setting up CoordinateReferences;
    _markerAssemblyCondition = NULL;

    // Do some consistency checking for markers
    const MarkerSet &modelMarkerSet = getModel().getMarkerSet();

    if(modelMarkerSet.getSize() < 1){
        std::cout << "InverseKinematicsSolver: Model has no markers!"  << std::endl;
        throw Exception("InverseKinematicsSolver: Model has no markers!");
    }
    
    const SimTK::Array_<std::string> &markerNames = _markersReference.getNames(); // size and content as in trc file

    if(markerNames.size() < 1){
        std::cout << "InverseKinematicsSolver: No markers available from data provided."  << std::endl;
        throw Exception("InverseKinematicsSolver: No markers available from data provided.");
    }
    int index=0, cnt=0;
    for(unsigned int i=0; i < markerNames.size(); i++) {
        // Check if we have this marker in the model, else ignore it
        index = modelMarkerSet.getIndex(markerNames[i], index);
        if(index >= 0) //found corresponding model
            cnt++;
    }

    if(cnt < 1){
        std::cout <<"InverseKinematicsSolver: Marker data does not correspond to any model markers." << std::endl;
        throw Exception("InverseKinematicsSolver: Marker data does not correspond to any model markers.");
    }
    if(cnt < 4)
        cout << "WARNING: InverseKinematicsSolver found only " << cnt << " markers to track." << endl;

}
Example #10
0
 MiscMappingPlugin(): Plugin("MiscMapping") {
     setDescription("");
     setVersion("");
     setLicense("LGPL");
     setAuthors("The SOFA Team");
 }
Example #11
0
 MeshCollisionPlugin(): Plugin("MeshCollision") {
     setDescription("");
     setVersion("");
     setLicense("LGPL");
     setAuthors("The SOFA Team");
 }
void HuntCrossleyForce::ContactParametersSet::setNull()
{
    setAuthors("Peter Eastman");
}
Example #13
0
 MiscForceFieldPlugin(): Plugin("MiscForceField") {
     setDescription("");
     setVersion("");
     setLicense("LGPL");
     setAuthors("The SOFA Team");
 }
Example #14
0
 BaseTopologyPlugin(): Plugin("BaseTopology") {
     setDescription("");
     setVersion("");
     setLicense("LGPL");
     setAuthors("The SOFA Team");
 }
Example #15
0
 ObjectInteractionPlugin(): Plugin("ObjectInteraction") {
     setDescription("");
     setVersion("");
     setLicense("LGPL");
     setAuthors("The SOFA Team");
 }
void ElasticFoundationForce::ContactParametersSet::setNull()
{
	setAuthors("Peter Eastman");
}
/**
 * An implementation of the InverseDynamicsSolver 
 *
 * @param model to assemble
 */
InverseDynamicsSolver::InverseDynamicsSolver(const Model &model) : Solver(model)
{
	setAuthors("Ajay Seth");
}
Example #18
0
 PreconditionerPlugin(): Plugin("Preconditioner") {
     setDescription("");
     setVersion("");
     setLicense("LGPL");
     setAuthors("The SOFA Team");
 }
void ContactGeometry::setNull()
{
    setAuthors("Peter Eastman");
}
Example #20
0
 EnginePlugin(): Plugin("Engine") {
     setDescription("");
     setVersion("");
     setLicense("LGPL");
     setAuthors("The SOFA Team");
 }
Example #21
0
 DenseSolverPlugin(): Plugin("DenseSolver") {
     setDescription("");
     setVersion("");
     setLicense("LGPL");
     setAuthors("The SOFA Team");
 }
Example #22
0
//_____________________________________________________________________________
// Set the data members of this Force to their null values.
void Force::setNull()
{
    setAuthors("Peter Eastman, Ajay Seth");
}
Example #23
0
 NonUniformFemPlugin(): Plugin("NonUniformFem") {
     setDescription("");
     setVersion("");
     setLicense("LGPL");
     setAuthors("The SOFA Team");
 }
Example #24
0
 EulerianFluidPlugin(): Plugin("EulerianFluid") {
     setDescription("");
     setVersion("");
     setLicense("LGPL");
     setAuthors("The SOFA Team");
 }
Example #25
0
 GeneralLoaderPlugin(): Plugin("GeneralLoader") {
     setDescription("");
     setVersion("");
     setLicense("LGPL");
     setAuthors("The SOFA Team");
 }
void ContactHalfSpace::setNull()
{
    setAuthors("Peter Eastman");
}
Example #27
0
void ContactMesh::setNull()
{
    setAuthors("Peter Eastman");
}
MarkersReference::MarkersReference() : Reference_<SimTK::Vec3>()
{
    constructProperties();
    setAuthors("Ajay Seth");
}