Points&Forces (survey)
Software tools facilitating the task of surveying architecture
|
structure class More...
#include <a_structure.h>
Classes | |
class | range_error |
Public Member Functions | |
a_structure () | |
~a_structure () | |
void | clear () |
int | nb () const |
get number of blocks More... | |
int | rb (const a_block *b) const |
get reference of a block (-1 if no block) More... | |
double | V () const |
get volume of structure More... | |
a_point | c () const |
get centre of mass More... | |
double | m () const |
mass More... | |
double | Ws () const |
get weight (scalar) More... | |
a_wrench | W () |
get weight (wrench) More... | |
a_wrench | fe () |
get external force on structure (wrench) More... | |
a_wrench | ft () |
get total force on structure fe+W (wrench) More... | |
double | potential () const |
get potential energy More... | |
int | add_block (a_block *b) |
add a block to the structure More... | |
void | link_blocks (int b1, int f1, int b2, int f2) |
link 2 blocks: [b1: ref_block1, f1: ref_face1, b2:...] More... | |
a_block * | b (const int i) const |
get pointer to the block i More... | |
bool | connected () const |
check whether all blocks are connected More... | |
std::vector< int > | out () const |
get list of extreme blocks (blocks connected only to 1 other block) More... | |
std::vector< int > | in () const |
get list of internal blocks (blocks connected at least to 2 other blocks) More... | |
std::vector< int > | nodes () const |
get list of blocks connected to more than 2 other blocks (sources of hyperstaticity) More... | |
void | clearinternal () |
clear all the internal face forces More... | |
void | clearexternal () |
clear all the external face forces More... | |
void | clearall () |
clear all the forces on faces More... | |
void | objective (a_ocriteria *objective) |
set objective function (used for optimisation) More... | |
double | objective () const |
get value of objective function More... | |
void | criteria (a_fcriteria *criteria) |
set resistance criteria More... | |
bool | ok () const |
check if forces on face are acceptable More... | |
double | penalty () const |
penalty value used for optimization More... | |
void | penalty_factor (const double v) |
set penalty factor More... | |
double | penalty_factor () const |
get penalty factor More... | |
double | objectivep () const |
get value of objective function + penalty*penalty_factor_ More... | |
void | rotate (int rb, int f, const a_point &x, const a_point &dir, double r) |
rotate of angle r (rad) all blocks connected to rb, around x using axis dir More... | |
void | rotate (int b, int f, double v, double r) |
rotate of angle r (rad) all blocks connected to b, around f, in the direction of opposite face to f More... | |
void | slide (int b, int f, double u, double v) |
slide of (u,v) all blocks connected to b in the plane of f More... | |
void | material (a_material *material) |
link a material More... | |
a_block * | compute (int b, int f) |
compute as far as possible the forces on the blocks, starting from block b, entrance face f, return the last block for which it succeeded More... | |
void | compute (const int rb1, const int rf1, const double u1, const double v1, const int rb2, const int rf2, const double u2, const double v2, const int rb3, const int rf3, const double u3, const double v3) |
compute inside forces resulting in resistance line passing by 3 points More... | |
double | min (const int face, const int rb1, const int rf1, const double u1, const int rb2, const int rf2, const double u2, const int rb3, const int rf3, const double u3) |
vary force on face to get a minimal objective function, respecting face criteria More... | |
double | mindir (const a_point &dir, const int rb1, const int rf1, double &u1, const int rb2, const int rf2, double &u2, const int rb3, const int rf3, double &u3) |
vary force on faces (in proportion to dir) to get a minimal objective function, respecting face criteria More... | |
double | max (const int face, const int rb1, const int rf1, const double u1, const int rb2, const int rf2, const double u2, const int rb3, const int rf3, const double u3) |
vary force on face to get a maximal objective function, respecting face criteria More... | |
void | min (const int rb1, const int rf1, const int rb2, const int rf2) |
compute inside forces leading to a minimal objective function, respecting face criteria More... | |
void | max (const int rb1, const int rf1, const int rb2, const int rf2) |
compute inside forces leading to a maximal objective function, respecting face criteria More... | |
void | minsteep (const int rb1, const int rf1, const int rb2, const int rf2) |
virtual void | writetri (std::ostream &o) const |
write a triangle file More... | |
virtual void | writeb (std::ostream &o) const |
write structure in blender format More... | |
virtual void | writeg (std::ostream &o) const |
write structure in brlcad format More... | |
void | trianglecloud (a_trianglecloud &) const |
void | polyline (a_linecloud &) const |
Static Public Member Functions | |
static const std::string | help () |
get information about the class More... | |
Protected Member Functions | |
bool | check_block (const int rb) const |
check whether references are in range More... | |
bool | check_blockref (const int rb, const int rf) const |
check whether references are in range More... | |
bool | faceonexit (const int rb1, const int rf1, const int rb2, const int rf2) |
check whether rf2 in an exit face More... | |
void | midblock (const int rb1, const int rf1, const int rb2, const int rf2, a_block *&rb, int &rf) |
block and face in between two face blocks More... | |
void | optimise (const bool is_min, const int rb1, const int rf1, const int rb2, const int rf2) |
compute inside forces leading to an optimal objective function, respecting face criteria More... | |
void | storeexits (std::vector< int > &) const |
store face exits situation More... | |
void | restoreexits (std::vector< int > &) |
restore face exits situation More... | |
double | grad1 (const int rb1, const int rf1, const int rb2, const int rf2, const int rb3, const int rf3, const double *u) |
grad of objective function + penalty More... | |
double | grad2 (const int rb1, const int rf1, const int rb2, const int rf2, const int rb3, const int rf3, const double *u) |
grad of objective function + penalty More... | |
double | grad3 (const int rb1, const int rf1, const int rb2, const int rf2, const int rb3, const int rf3, const double *u) |
grad of objective function + penalty More... | |
Protected Attributes | |
std::vector< a_block * > | blocks_ |
a_ocriteria * | objective_ |
double | penalty_factor_ |
Friends | |
std::istream & | operator>> (std::istream &i, a_structure &s) |
input/output More... | |
std::ostream & | operator<< (std::ostream &o, const a_structure &s) |
structure class
Definition at line 32 of file a_structure.h.
a_structure::a_structure | ( | ) |
Definition at line 37 of file a_structure.cxx.
a_structure::~a_structure | ( | ) |
int a_structure::add_block | ( | a_block * | b | ) |
add a block to the structure
Definition at line 119 of file a_structure.cxx.
a_block * a_structure::b | ( | const int | i | ) | const |
get pointer to the block i
Definition at line 217 of file a_structure.cxx.
a_point a_structure::c | ( | ) | const |
get centre of mass
Definition at line 144 of file a_structure.cxx.
|
protected |
check whether references are in range
check if range of rb is ok
Definition at line 439 of file a_structure.cxx.
|
protected |
check whether references are in range
check if range of rb is ok
check if range of rf is ok
Definition at line 448 of file a_structure.cxx.
void a_structure::clear | ( | ) |
void a_structure::clearall | ( | ) |
clear all the forces on faces
Definition at line 278 of file a_structure.cxx.
void a_structure::clearexternal | ( | ) |
clear all the external face forces
Definition at line 272 of file a_structure.cxx.
void a_structure::clearinternal | ( | ) |
clear all the internal face forces
Definition at line 266 of file a_structure.cxx.
void a_structure::compute | ( | const int | rb1, |
const int | rf1, | ||
const double | u1, | ||
const double | v1, | ||
const int | rb2, | ||
const int | rf2, | ||
const double | u2, | ||
const double | v2, | ||
const int | rb3, | ||
const int | rf3, | ||
const double | u3, | ||
const double | v3 | ||
) |
compute inside forces resulting in resistance line passing by 3 points
check if range of rb is ok
reset the forces on the exit faces of the arch
check whether b2 is in between b1 and b3 compute forces
face is on entrance b2 should be changed
weight in between 1&2 and 2&3
faces of passage
points of passage
compute in one direction
compute in other direction
Definition at line 460 of file a_structure.cxx.
a_block * a_structure::compute | ( | int | b, |
int | f | ||
) |
compute as far as possible the forces on the blocks, starting from block b, entrance face f, return the last block for which it succeeded
Definition at line 419 of file a_structure.cxx.
bool a_structure::connected | ( | ) | const |
check whether all blocks are connected
Definition at line 223 of file a_structure.cxx.
void a_structure::criteria | ( | a_fcriteria * | criteria | ) |
set resistance criteria
Definition at line 295 of file a_structure.cxx.
|
protected |
check whether rf2 in an exit face
Definition at line 384 of file a_structure.cxx.
a_wrench a_structure::fe | ( | ) |
get external force on structure (wrench)
Definition at line 181 of file a_structure.cxx.
a_wrench a_structure::ft | ( | ) |
get total force on structure fe+W (wrench)
Definition at line 189 of file a_structure.cxx.
|
protected |
grad of objective function + penalty
Definition at line 651 of file a_structure.cxx.
|
protected |
grad of objective function + penalty
Definition at line 664 of file a_structure.cxx.
|
protected |
grad of objective function + penalty
Definition at line 677 of file a_structure.cxx.
|
static |
get information about the class
Definition at line 54 of file a_structure.cxx.
std::vector< int > a_structure::in | ( | ) | const |
get list of internal blocks (blocks connected at least to 2 other blocks)
Definition at line 244 of file a_structure.cxx.
void a_structure::link_blocks | ( | int | b1, |
int | f1, | ||
int | b2, | ||
int | f2 | ||
) |
link 2 blocks: [b1: ref_block1, f1: ref_face1, b2:...]
Definition at line 205 of file a_structure.cxx.
double a_structure::m | ( | ) | const |
mass
Definition at line 157 of file a_structure.cxx.
void a_structure::material | ( | a_material * | material | ) |
link a material
Definition at line 365 of file a_structure.cxx.
double a_structure::max | ( | const int | face, |
const int | rb1, | ||
const int | rf1, | ||
const double | u1, | ||
const int | rb2, | ||
const int | rf2, | ||
const double | u2, | ||
const int | rb3, | ||
const int | rf3, | ||
const double | u3 | ||
) |
vary force on face to get a maximal objective function, respecting face criteria
Definition at line 875 of file a_structure.cxx.
void a_structure::max | ( | const int | rb1, |
const int | rf1, | ||
const int | rb2, | ||
const int | rf2 | ||
) |
compute inside forces leading to a maximal objective function, respecting face criteria
Definition at line 645 of file a_structure.cxx.
|
protected |
block and face in between two face blocks
check if ranges are ok
get pointers
Definition at line 543 of file a_structure.cxx.
double a_structure::min | ( | const int | face, |
const int | rb1, | ||
const int | rf1, | ||
const double | u1, | ||
const int | rb2, | ||
const int | rf2, | ||
const double | u2, | ||
const int | rb3, | ||
const int | rf3, | ||
const double | u3 | ||
) |
vary force on face to get a minimal objective function, respecting face criteria
Definition at line 792 of file a_structure.cxx.
void a_structure::min | ( | const int | rb1, |
const int | rf1, | ||
const int | rb2, | ||
const int | rf2 | ||
) |
compute inside forces leading to a minimal objective function, respecting face criteria
Definition at line 769 of file a_structure.cxx.
double a_structure::mindir | ( | const a_point & | dir, |
const int | rb1, | ||
const int | rf1, | ||
double & | u1, | ||
const int | rb2, | ||
const int | rf2, | ||
double & | u2, | ||
const int | rb3, | ||
const int | rf3, | ||
double & | u3 | ||
) |
vary force on faces (in proportion to dir) to get a minimal objective function, respecting face criteria
Definition at line 838 of file a_structure.cxx.
void a_structure::minsteep | ( | const int | rb1, |
const int | rf1, | ||
const int | rb2, | ||
const int | rf2 | ||
) |
Definition at line 690 of file a_structure.cxx.
|
inline |
get number of blocks
Definition at line 41 of file a_structure.h.
std::vector< int > a_structure::nodes | ( | ) | const |
get list of blocks connected to more than 2 other blocks (sources of hyperstaticity)
Definition at line 255 of file a_structure.cxx.
double a_structure::objective | ( | ) | const |
get value of objective function
Definition at line 284 of file a_structure.cxx.
|
inline |
set objective function (used for optimisation)
Definition at line 81 of file a_structure.h.
double a_structure::objectivep | ( | ) | const |
get value of objective function + penalty*penalty_factor_
Definition at line 290 of file a_structure.cxx.
bool a_structure::ok | ( | ) | const |
check if forces on face are acceptable
Definition at line 301 of file a_structure.cxx.
|
protected |
compute inside forces leading to an optimal objective function, respecting face criteria
Definition at line 724 of file a_structure.cxx.
std::vector< int > a_structure::out | ( | ) | const |
get list of extreme blocks (blocks connected only to 1 other block)
Definition at line 233 of file a_structure.cxx.
double a_structure::penalty | ( | ) | const |
penalty value used for optimization
Definition at line 311 of file a_structure.cxx.
|
inline |
get penalty factor
Definition at line 93 of file a_structure.h.
|
inline |
set penalty factor
Definition at line 91 of file a_structure.h.
void a_structure::polyline | ( | a_linecloud & | li | ) | const |
double a_structure::potential | ( | ) | const |
get potential energy
Definition at line 197 of file a_structure.cxx.
int a_structure::rb | ( | const a_block * | b | ) | const |
get reference of a block (-1 if no block)
Definition at line 125 of file a_structure.cxx.
|
protected |
restore face exits situation
Definition at line 377 of file a_structure.cxx.
void a_structure::rotate | ( | int | b, |
int | f, | ||
double | v, | ||
double | r | ||
) |
rotate of angle r (rad) all blocks connected to b, around f, in the direction of opposite face to f
Definition at line 337 of file a_structure.cxx.
void a_structure::rotate | ( | int | rb, |
int | f, | ||
const a_point & | x, | ||
const a_point & | dir, | ||
double | r | ||
) |
rotate of angle r (rad) all blocks connected to rb, around x using axis dir
Definition at line 324 of file a_structure.cxx.
void a_structure::slide | ( | int | b, |
int | f, | ||
double | u, | ||
double | v | ||
) |
slide of (u,v) all blocks connected to b in the plane of f
Definition at line 348 of file a_structure.cxx.
|
protected |
store face exits situation
Definition at line 371 of file a_structure.cxx.
void a_structure::trianglecloud | ( | a_trianglecloud & | tri | ) | const |
double a_structure::V | ( | ) | const |
get volume of structure
Definition at line 136 of file a_structure.cxx.
a_wrench a_structure::W | ( | ) |
get weight (wrench)
Definition at line 173 of file a_structure.cxx.
|
virtual |
write structure in blender format
Definition at line 930 of file a_structure.cxx.
|
virtual |
write structure in brlcad format
Definition at line 939 of file a_structure.cxx.
|
virtual |
write a triangle file
Definition at line 922 of file a_structure.cxx.
double a_structure::Ws | ( | ) | const |
get weight (scalar)
Definition at line 165 of file a_structure.cxx.
|
friend |
Definition at line 1004 of file a_structure.cxx.
|
friend |
input/output
Definition at line 991 of file a_structure.cxx.
|
protected |
Definition at line 187 of file a_structure.h.
|
protected |
Definition at line 188 of file a_structure.h.
|
protected |
Definition at line 189 of file a_structure.h.