Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MarkerParticles_3 Class Reference

#include <MarkerParticles_3.h>

Inheritance diagram for MarkerParticles_3:
Collaboration diagram for MarkerParticles_3:

Public Member Functions

 MarkerParticles_3 (Manifold *wm, COM::Window *buf)
 Construct an object from a window manifold. More...
 
virtual double time_stepping (const COM::Attribute *spd, double dt, COM::Attribute *disp, int *smoothed=NULL)
 Main entry of the algorithm. More...
 
- Public Member Functions inherited from Propagation_3
 Propagation_3 ()
 
virtual ~Propagation_3 ()
 
 Propagation_3 (Manifold *wm, COM::Window *buf)
 Construct an object from a window manifold. More...
 
virtual void set_constraints (const COM::Attribute *cnstr_types)
 Set the types and directions of nodal constraints. More...
 
void set_bounds (const COM::Attribute *bnd)
 Set the bounds. More...
 
void bound_facial_speed (COM::Attribute *fa)
 
virtual void enforce_nodal_constraints (COM::Attribute *du)
 Enforces the nodal constraints by projecting motion onto given direction. More...
 
virtual void bound_nodal_motion (COM::Attribute *disps)
 
void set_verbose (bool b)
 Set the verbose level. More...
 

Protected Member Functions

void multiply_nodal_normals (const COM::Attribute *a, COM::Attribute *b)
 
- Protected Member Functions inherited from Propagation_3
void convert_constraints (const COM::Attribute *ctypes_faces, COM::Attribute *ctypes_nodes)
 Convert facial constraints to nodal constraints. More...
 
void determine_constraint_boundary (const COM::Attribute *ctypes_faces, COM::Attribute *ctypes_bndry_edges, COM::Attribute *ctypes_bndry_nodes)
 Convert facial or panel constraints to nodal constraints. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from Propagation_3
static void get_constraint_directions (int type, int &ndirs, Vector_3 dirs[2])
 Get orthonormals of the constraints. More...
 
static void enforce_nodal_constraint (int type, Vector_3 &du)
 Enforce constraint for a specific vector. More...
 
static void bound_nodal_motion (const Point_3 &pnt, const double *bnd, Vector_3 &du, double eps=0)
 
static bool check_spherical_bound (const Point_3 &pnt, const Point_3 &org, const double rad_min, const double rad_max, double eps=0)
 
static void bound_spherical_disp (const Point_3 &pnt, const Point_3 &org, const double rad_min, const double rad_max, Vector_3 &disp, double eps=0)
 
static bool check_radial_bound (const double x, const double y, const double bnd_min, const double bnd_max, double eps=0)
 
static void bound_radial_disp (const double x, const double y, const double bnd_min, const double bnd_max, double &dx, double &dy, double eps=0)
 
static bool check_axial_bound (const double x, const double bnd_min, const double bnd_max, double eps=0)
 
static void bound_axial_disp (const double x, const double bnd_min, const double bnd_max, double &dx, double eps=0)
 
static bool reached_nodal_bound (const Point_3 &pnt, const double *bnd, double eps=0)
 
static bool in_bounding_box (const Point_3 &pnt, const Point_3 &lb, const Point_3 &ub)
 
static double square (double x)
 
- Protected Attributes inherited from Propagation_3
Manifold_surf
 
SURF::Access_Mode _mode
 
COM::Window * _buf
 
int _rank
 
bool _verb
 
bool _cnstr_set
 
bool _bnd_set
 
COM::Attribute * _cnstr_nodes
 
COM::Attribute * _cnstr_faces
 
COM::Attribute * _cnstr_bndry_edges
 
COM::Attribute * _cnstr_bndry_nodes
 
COM::Attribute * _cnstr_bound
 
std::vector< COM::Pane * > _panes
 

Detailed Description

Definition at line 38 of file MarkerParticles_3.h.

Constructor & Destructor Documentation

MarkerParticles_3 ( Manifold wm,
COM::Window *  buf 
)
inline

Construct an object from a window manifold.

Definition at line 41 of file MarkerParticles_3.h.

42  : Propagation_3( wm, buf) {}

Member Function Documentation

void multiply_nodal_normals ( const COM::Attribute *  a,
COM::Attribute *  b 
)
protected

Definition at line 45 of file MarkerParticles_3.C.

References Propagation_3::_surf, COM_DOUBLE, COM_MESH, E2N_ANGLE, Attribute::inherit(), and Rocblas::mul().

Referenced by time_stepping().

46  {
47  assert( spd->size_of_components()==1);
48 
49  if ( spd->is_nodal()) {
50  // compute normals
51  _surf->compute_normals( disp);
52 
53  // If spd is not elemental, simply need call Rocblas
54  Rocblas::mul( disp, spd, disp);
55  }
56  else {
57  // Create a buffer window to store the element normals
58  COM::Window *win = disp->window();
59  COM::Window buf( win->name()+"-marker", win->get_communicator());
60  buf.inherit( win->attribute( COM::COM_MESH), "", false, true, NULL, 0);
61  Attribute *node_disps = buf.inherit( disp, "disps", false, true, NULL, 0);
62  buf.inherit(const_cast<COM::Attribute*>(spd), "spd", false, true, NULL, 0);
63  Attribute *elem_normals =
64  buf.new_attribute( "elem_normals", 'e', COM_DOUBLE, 3, "");
65  buf.resize_array( "elem_normals", 0, NULL);
66  buf.init_done();
67 
68  // First, compute elemental normals
69  _surf->compute_normals( elem_normals);
70 
71  // Multiply elemental normals by speed
72  Rocblas::mul( elem_normals, spd, elem_normals);
73 
74  // Convert elemental motion to nodal motion
75  _surf->elements_to_nodes( elem_normals, node_disps, SURF::E2N_ANGLE);
76  }
77 }
void inherit(Attribute *a, bool clone, bool withghost, int depth=0)
Inherit from parent. If depth&gt;0, then the procedure is for the subcomponents.
Definition: Attribute.C:426
An Attribute object is a data member of a window.
Definition: Attribute.h:51
Manifold * _surf
static void mul(const Attribute *x, const Attribute *y, Attribute *z)
Operation wrapper for multiplication.
Definition: op3args.C:253

Here is the call graph for this function:

Here is the caller graph for this function:

PROP_BEGIN_NAMESPACE double time_stepping ( const COM::Attribute *  spd,
double  dt,
COM::Attribute *  disp,
int *  smoothed = NULL 
)
virtual

Main entry of the algorithm.

Implements Propagation_3.

Definition at line 31 of file MarkerParticles_3.C.

References COM_assertion, Rocblas::mul_scalar(), and multiply_nodal_normals().

32  {
33  COM_assertion( spd->size_of_components()==1);
34  COM_assertion( disp->size_of_components()==3 && disp->is_nodal());
35 
36  multiply_nodal_normals( spd, disp);
37  Rocblas::mul_scalar( disp, &dt, disp);
38 
39  if ( smoothed) *smoothed = false;
40  return dt;
41 }
#define COM_assertion(EX)
Error checking utility similar to the assert macro of the C language.
static void mul_scalar(const Attribute *x, const void *y, Attribute *z, int swap=0)
Operation wrapper for multiplication with y as a scalar pointer.
Definition: op3args.C:347
void multiply_nodal_normals(const COM::Attribute *a, COM::Attribute *b)

Here is the call graph for this function:


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