1 #ifndef VTESTBED_CORE_FLOODING_SOLVER_HH     2 #define VTESTBED_CORE_FLOODING_SOLVER_HH     4 #include <vtestbed/core/types.hh>     5 #include <vtestbed/geometry/types.hh>    16             Vector<T,3> _point{T{}};
    21             inline Volume(T v, 
const Vector<T,3>& x): _volume(v), _point(x) {}
    24             accumulate(T v, 
const Vector<T,3>& x) {
    29             inline void normalise() { this->_point /= this->_volume; }
    30             inline void clear() { this->_point = 0, this->_volume = 0; }
    31             inline T volume()
 const { 
return this->_volume; }
    32             inline const Vector<T,3>& point()
 const { 
return this->_point; }
    42             using vertex_type = Vector<T,3>;
    47             vertex_type _centre{T{}};
    71             void level(T new_level);
    73             inline const bounds_type& z_bounds()
 const { 
return this->_z_bounds; }
    74             inline const vertex_type& centre_of_mass()
 const { 
return this->_centre; }
    75             inline T volume()
 const { 
return this->_volume; }
    76             inline T level()
 const { 
return this->_level; }
    77             inline const polyhedron_type& polyhedron()
 const { 
return this->_polyhedron; }
    90 #endif // vim:filetype=cpp 
void level(T new_level)
Compute fluid level by specifying its volume.
 
void volume(T new_volume)
Compute fluid level by specifying its volume.