MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / OPS_computeGradients

Function OPS_computeGradients

SRC/interpreter/OpenSeesCommands.cpp:3779–3799  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3777// Sensitivity:BEGIN /////////////////////////////////////////////
3778
3779int OPS_computeGradients()
3780{
3781 Integrator* theIntegrator = 0;
3782 if(cmds->getStaticIntegrator() != 0) {
3783 theIntegrator = cmds->getStaticIntegrator();
3784 } else if(cmds->getTransientIntegrator() != 0) {
3785 theIntegrator = cmds->getTransientIntegrator();
3786 }
3787
3788 if (theIntegrator == 0) {
3789 opserr << "WARNING: No integrator is created\n";
3790 return -1;
3791 }
3792
3793 if (theIntegrator->computeSensitivities() < 0) {
3794 opserr << "WARNING: failed to compute sensitivities\n";
3795 return -1;
3796 }
3797
3798 return 0;
3799}
3800
3801int OPS_sensitivityAlgorithm()
3802{

Callers 2

Tcl_ops_computeGradientsFunction · 0.85
Py_ops_computeGradientsFunction · 0.85

Calls 3

getStaticIntegratorMethod · 0.45
computeSensitivitiesMethod · 0.45

Tested by

no test coverage detected