16#ifndef BT_DEFORMABLE_LAGRANGIAN_FORCE_H
17#define BT_DEFORMABLE_LAGRANGIAN_FORCE_H
35 return low +
static_cast<double>(
rand()) /
RAND_MAX * (high - low);
139 for (
int i = 0; i <
dphi_dx.size(); ++i)
161 for (
int i = 0; i <
dx.size(); ++i)
169 for (
int it = 0;
it < 10; ++
it)
171 for (
int i = 0; i <
dx.size(); ++i)
178 for (
int i = 0; i <
dx.size(); ++i)
224 std::cout <<
"Iteration = " <<
it <<
", f1 = " <<
f1 <<
", f2 = " <<
f2 <<
", error = " <<
error << std::endl;
226 for (
int i = 1; i <
errors.size(); ++i)
228 std::cout <<
"Iteration = " << i <<
", ratio = " <<
errors[i - 1] /
errors[i] << std::endl;
270 for (
int i = 0; i <
dx.size(); ++i)
278 for (
int it = 0;
it < 10; ++
it)
280 for (
int i = 0; i <
dx.size(); ++i)
286 for (
int i = 0; i <
df.size(); ++i)
339 for (
int i = 0; i <
df.size(); ++i)
346 std::cout <<
"Iteration = " <<
it <<
", error = " <<
error << std::endl;
348 for (
int i = 1; i <
errors.size(); ++i)
350 std::cout <<
"Iteration = " << i <<
", ratio = " <<
errors[i - 1] /
errors[i] << std::endl;
const T & btMax(const T &a, const T &b)
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
btScalar btSqrt(btScalar y)
The btAlignedObjectArray template class uses a subset of the stl::vector interface for its methods It...
int size() const
return the number of elements in the array
void resize(int newsize, const T &fillData=T())
void remove(const T &key)
void push_back(const T &_Val)
The btMatrix3x3 class implements a 3x3 rotation matrix, to perform linear algebra in combination with...
btMatrix3x3 transpose() const
Return the transpose of the matrix.
The btSoftBody is an class to simulate cloth and volumetric soft bodies.
btVector3 can be used to represent 3D points and vectors.
btScalar length2() const
Return the length of the vector squared.