26 #include "../Rocsurf/include/Generic_element_2.h"
33 double t,
double dt,
int order) {
37 if ( order <= 1) {
return disp1; }
44 return (disp1+disp4)/6+(disp2+disp3)/3;
56 COM::Element_node_vectors_k_const<Point_3> ps; ps.set( pnts, ene, 1);
57 SURF::Generic_element_2 e(ene.size_of_edges(), ene.size_of_nodes());
60 for (
int i=0;
i<3; ++
i) {
62 Vector_2 nc; e.get_gp_nat_coor(
i, nc, 2);
63 Point_3 p; e.interpolate( ps, nc, &p);
73 double t,
double dt,
const std::string &vname) {
75 COM::Attribute *velos = win->attribute( vname);
78 "Velos must be elemental data associated with quadrature points");
81 std::vector<COM::Pane*> panes; win->panes( panes);
84 std::vector< COM::Pane*>::iterator it = panes.begin();
85 for (
int i=0, local_npanes = panes.size();
i<local_npanes; ++
i, ++it) {
86 COM::Pane *pane = *it;
87 const Point_3 *pnts =
reinterpret_cast<Point_3*
>(pane->coordinates());
89 (pane->attribute( velos->id())->pointer());
92 COM::Element_node_enumerator ene( pane, 1);
93 for (
int j=0,
nj=pane->size_of_real_elements();
j<
nj; ++
j, ene.next()) {
99 velos_ptr[3*
j] /= dt; velos_ptr[3*j+1] /= dt; velos_ptr[3*j+2] /= dt;
107 double t,
double dt,
const std::string &vname) {
109 COM::Attribute *velos = win->attribute( vname);
112 "Velos must be nodal data associated");
117 std::vector<COM::Pane*> panes; win->panes( panes);
119 std::vector< COM::Pane*>::iterator it = panes.begin();
120 for (
int i=0, local_npanes = panes.size();
i<local_npanes; ++
i, ++it) {
121 COM::Pane *pane = *it;
122 const Point_3 *pnts =
reinterpret_cast<Point_3*
>(pane->coordinates());
124 (pane->attribute( velos->id())->pointer());
127 for (
int j=0,
nj=pane->size_of_real_nodes();
j<
nj; ++
j) {
#define COM_assertion(EX)
Error checking utility similar to the assert macro of the C language.
#define PROP_END_NAMESPACE
static void propagate_faces(const std::string &wname, const Speed &s, double t, double dt, const std::string &vname)
#define PROP_BEGIN_NAMESPACE
#define COM_assertion_msg(EX, msg)
static void propagate_gp_of_element(const Point_3 *pnts, COM::Element_node_enumerator &ene, const Speed &s, double t, double dt, Vector_3 *qp_vels)
virtual Vector_3 get_velocity(const Point_3 &p, double t) const
static void propagate_nodes(const std::string &wname, const Speed &s, double t, double dt, const std::string &vname)
Some basic geometric data types.
COM_END_NAME_SPACE COM::Roccom_base * COM_get_roccom()
static Vector_3 time_integrate(const Point_3 &p, const Speed &s, double t, double dt, int order)