Points&Forces (survey)
Software tools facilitating the task of surveying architecture
a_ocriteria_H.cxx
Go to the documentation of this file.
1 /*
2 Copyright 2010-2011 Pierre SMARS (smars@yuntech.edu.tw)
3 This program is free software: you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation, either version 2 of the License, or
6 (at your option) any later version.
7 
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12 
13 You should have received a copy of the GNU General Public License
14 along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16 #include "a_ocriteria_H.h"
17 #include "a_structure.h"
18 #include "a_face_2d4.h"
19 
20 #include "a_debug.h"
21 
22 //---------------------------------------------------------------------------
23 double a_ocriteria_H::f(const a_structure * s) const
24 {
25  const a_block * b = dynamic_cast<const a_block *>(s->b(rb_));
26  a_face_2d4 * f = cf_2d4(b->i(rf_));
27  a_point w = f->f().F();
28  return w*dir_;
29 }
30 //---------------------------------------------------------------------------
a_face_2d4 * cf_2d4(a_face *f)
Definition: a_face_2d4.cxx:26
a_face * i(const int i)
get pointer to face
Definition: a_block.cxx:148
virtual double f(const a_structure *f) const
return an objective value used for optimization (can be the thrust for instance) (look at derived cla...
structure class
Definition: a_structure.h:33
a_block * b(const int i) const
get pointer to the block i