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

#include <speeds.h>

Inheritance diagram for Vortex_flow:
Collaboration diagram for Vortex_flow:

Public Member Functions

 Vortex_flow (double T=2)
 
virtual ~Vortex_flow ()
 
Vector_3 get_velocity (const Point_3 &p, double t) const
 
- Public Member Functions inherited from Speed
 Speed ()
 
virtual ~Speed ()
 

Protected Member Functions

double square (double x) const
 

Protected Attributes

double _t
 

Detailed Description

Definition at line 69 of file speeds.h.

Constructor & Destructor Documentation

Vortex_flow ( double  T = 2)
inlineexplicit

Definition at line 72 of file speeds.h.

72 : _t(T>0?T:2) {}
double _t
Definition: speeds.h:92
virtual ~Vortex_flow ( )
inlinevirtual

Definition at line 73 of file speeds.h.

73 {}

Member Function Documentation

Vector_3 get_velocity ( const Point_3 p,
double  t 
) const
inlinevirtual

Reimplemented from Speed.

Definition at line 75 of file speeds.h.

References _t, cos, pi, s, sin, square(), and v.

75  {
76  const double pi = 3.14159265358979;
77 
78  Vector_3 v;
79  v[0] = square(std::sin(pi*p[0]))*(std::sin(2*pi*p[2])-std::sin(2*pi*p[1]));
80  v[1] = square(std::sin(pi*p[1]))*(std::sin(2*pi*p[0])-std::sin(2*pi*p[2]));
81  v[2] = square(std::sin(pi*p[2]))*(std::sin(2*pi*p[1])-std::sin(2*pi*p[0]));
82 
83  double s;
84  if ( _t<0) s = std::cos(pi*(0.5-t/_t));
85  else s = std::cos(pi*t/_t);
86 
87  return (v *= s);
88  }
double s
Definition: blastest.C:80
double _t
Definition: speeds.h:92
*********************************************************************Illinois Open Source License ****University of Illinois NCSA **Open Source License University of Illinois All rights reserved ****Developed free of to any person **obtaining a copy of this software and associated documentation to deal with the Software without including without limitation the rights to and or **sell copies of the and to permit persons to whom the **Software is furnished to do subject to the following this list of conditions and the following disclaimers ****Redistributions in binary form must reproduce the above **copyright this list of conditions and the following **disclaimers in the documentation and or other materials **provided with the distribution ****Neither the names of the Center for Simulation of Advanced the University of nor the names of its **contributors may be used to endorse or promote products derived **from this Software without specific prior written permission ****THE SOFTWARE IS PROVIDED AS WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **ARISING OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE v
Definition: roccomf90.h:20
NT & sin
double square(double x) const
Definition: speeds.h:91
const double pi
Some basic geometric data types.
Definition: mapbasic.h:54
NT & cos

Here is the call graph for this function:

double square ( double  x) const
inlineprotected

Definition at line 91 of file speeds.h.

References x.

Referenced by get_velocity().

91 { return x*x; }
void int int REAL * x
Definition: read.cpp:74

Here is the caller graph for this function:

Member Data Documentation

double _t
protected

Definition at line 92 of file speeds.h.

Referenced by get_velocity().


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