WaveBEM: Unsteady Nonlinear Potential Flow Solver for Ship-Wave Interaction.
OpenCascade::LineSmoothing Class Reference

#include <occ_line_smoothing.h>

Public Types

typedef std::map< std::pair< double, double >, unsigned int, comp_points_on_curve >::iterator iterator
 

Public Member Functions

 LineSmoothing (Vector< double > &euler_vector, Handle(Geom_Curve) ref_curve, TopLoc_Location *curr_loc, const DoFHandler< 2, 3 > &dh, const std::vector< bool > &smoothing_dofs, const unsigned int base_point_id, const unsigned int driving_point_id, const double tolerance=1e-4)
 Smooth all dofs in. More...
 
void update_reference (unsigned int base_point_id, unsigned int driving_point_id)
 
void smooth (bool maintain_on_original_curve=true)
 Perform the actual smoothing. More...
 
 Handle (Geom_Curve) get_curve()
 
Vector< double > & get_lengths_before_smoothing ()
 
Vector< double > & get_lengths_after_smoothing ()
 
std::vector< unsigned int > & get_node_indices ()
 
void get_curve_tangent_vectors_at_smoothing_dofs (Vector< double > &tangents)
 
void get_curve_length_ratios_at_smoothing_dofs (Vector< double > &length_ratios)
 

Private Member Functions

 Handle (Geom_Curve) ref_curve
 
 Handle (Geom_Curve) curve
 

Private Attributes

Vector< double > & euler_vector
 
TopLoc_Location ref_location
 
TopLoc_Location used_location
 
TopLoc_Location * curr_location
 
NormalProjection< 1 > projection
 
const DoFHandler< 2, 3 > & dh
 
const std::vector< bool > & smoothing_dofs
 
unsigned int base_point_id
 
unsigned int driving_point_id
 
double occ_base_t
 
double occ_driving_t
 
std::vector< Point< 3 > > support_points
 
double ref_L
 
double tolerance
 
Vector< double > fixed_length_ratios
 
Vector< double > lengths_before_smoothing
 
Vector< double > lengths_after_smoothing
 
std::vector< unsigned int > node_indices
 
std::map< std::pair< double, double >, unsigned int, comp_points_on_curvesmoothing_list
 
GeomLib_Tool tool
 

Detailed Description

Definition at line 34 of file occ_line_smoothing.h.

Member Typedef Documentation

typedef std::map<std::pair<double, double>, unsigned int, comp_points_on_curve >::iterator OpenCascade::LineSmoothing::iterator

Definition at line 124 of file occ_line_smoothing.h.

Constructor & Destructor Documentation

OpenCascade::LineSmoothing::LineSmoothing ( Vector< double > &  euler_vector,
Handle(Geom_Curve)  ref_curve,
TopLoc_Location *  curr_loc,
const DoFHandler< 2, 3 > &  dh,
const std::vector< bool > &  smoothing_dofs,
const unsigned int  base_point_id,
const unsigned int  driving_point_id,
const double  tolerance = 1e-4 
)

Smooth all dofs in.

Definition at line 57 of file occ_line_smoothing.cc.

Member Function Documentation

void LineSmoothing::get_curve_length_ratios_at_smoothing_dofs ( Vector< double > &  length_ratios)

Definition at line 327 of file occ_line_smoothing.cc.

void LineSmoothing::get_curve_tangent_vectors_at_smoothing_dofs ( Vector< double > &  tangents)

Definition at line 303 of file occ_line_smoothing.cc.

Vector<double>& OpenCascade::LineSmoothing::get_lengths_after_smoothing ( )
inline

Definition at line 108 of file occ_line_smoothing.h.

Vector<double>& OpenCascade::LineSmoothing::get_lengths_before_smoothing ( )
inline

Definition at line 103 of file occ_line_smoothing.h.

std::vector<unsigned int>& OpenCascade::LineSmoothing::get_node_indices ( )
inline

Definition at line 113 of file occ_line_smoothing.h.

OpenCascade::LineSmoothing::Handle ( Geom_Curve  )
inline

Definition at line 98 of file occ_line_smoothing.h.

OpenCascade::LineSmoothing::Handle ( Geom_Curve  )
private
OpenCascade::LineSmoothing::Handle ( Geom_Curve  )
private
void OpenCascade::LineSmoothing::smooth ( bool  maintain_on_original_curve = true)

Perform the actual smoothing.

Notice that the argument decides wether or not the moving point is projected to the original curve. If this is not the case, then all points are maintained in their current location, a new curve is computed which passes through all current points, and their smoothing is computed according to their original location.

Definition at line 164 of file occ_line_smoothing.cc.

void OpenCascade::LineSmoothing::update_reference ( unsigned int  base_point_id,
unsigned int  driving_point_id 
)

Definition at line 87 of file occ_line_smoothing.cc.

Member Data Documentation

unsigned int OpenCascade::LineSmoothing::base_point_id
private

Definition at line 137 of file occ_line_smoothing.h.

TopLoc_Location* OpenCascade::LineSmoothing::curr_location
private

Definition at line 131 of file occ_line_smoothing.h.

const DoFHandler<2,3>& OpenCascade::LineSmoothing::dh
private

Definition at line 135 of file occ_line_smoothing.h.

unsigned int OpenCascade::LineSmoothing::driving_point_id
private

Definition at line 138 of file occ_line_smoothing.h.

Vector<double>& OpenCascade::LineSmoothing::euler_vector
private

Definition at line 127 of file occ_line_smoothing.h.

Vector<double> OpenCascade::LineSmoothing::fixed_length_ratios
private

Definition at line 147 of file occ_line_smoothing.h.

Vector<double> OpenCascade::LineSmoothing::lengths_after_smoothing
private

Definition at line 149 of file occ_line_smoothing.h.

Vector<double> OpenCascade::LineSmoothing::lengths_before_smoothing
private

Definition at line 148 of file occ_line_smoothing.h.

std::vector<unsigned int> OpenCascade::LineSmoothing::node_indices
private

Definition at line 150 of file occ_line_smoothing.h.

double OpenCascade::LineSmoothing::occ_base_t
private

Definition at line 139 of file occ_line_smoothing.h.

double OpenCascade::LineSmoothing::occ_driving_t
private

Definition at line 140 of file occ_line_smoothing.h.

NormalProjection<1> OpenCascade::LineSmoothing::projection
private

Definition at line 133 of file occ_line_smoothing.h.

double OpenCascade::LineSmoothing::ref_L
private

Definition at line 144 of file occ_line_smoothing.h.

TopLoc_Location OpenCascade::LineSmoothing::ref_location
private

Definition at line 129 of file occ_line_smoothing.h.

const std::vector<bool>& OpenCascade::LineSmoothing::smoothing_dofs
private

Definition at line 136 of file occ_line_smoothing.h.

std::map<std::pair<double, double>, unsigned int, comp_points_on_curve > OpenCascade::LineSmoothing::smoothing_list
private

Definition at line 151 of file occ_line_smoothing.h.

std::vector<Point<3> > OpenCascade::LineSmoothing::support_points
private

Definition at line 142 of file occ_line_smoothing.h.

double OpenCascade::LineSmoothing::tolerance
private

Definition at line 145 of file occ_line_smoothing.h.

GeomLib_Tool OpenCascade::LineSmoothing::tool
private

Definition at line 152 of file occ_line_smoothing.h.

TopLoc_Location OpenCascade::LineSmoothing::used_location
private

Definition at line 130 of file occ_line_smoothing.h.


The documentation for this class was generated from the following files: