Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
compute_curvature.C File Reference
#include "Manifold_2.h"
#include "Generic_element_2.h"
#include "../Rocblas/include/Rocblas.h"
Include dependency graph for compute_curvature.C:

Go to the source code of this file.

Functions

static SURF_BEGIN_NAMESPACE double sign (double x)
 
static double compute_lbop_weights (Point_3< Real > *ps, Real *ws)
 

Function Documentation

static double compute_lbop_weights ( Point_3< Real > *  ps,
Real ws 
)
static

Definition at line 39 of file compute_curvature.C.

References Vector_3< Type >::cross_product(), Generic_element_2::get_gp_nat_coor(), Generic_element_2::get_gp_weight(), Generic_element_2::get_num_gp(), i, Vector_3< Type >::norm(), and v.

Referenced by Window_manifold_2::compute_mcn().

39  {
40  ws[0] = ws[1] = ws[2] = 0.;
41 
42  Generic_element_2 e(4);
43  int size = e.get_num_gp();
44 
45  double area = 0;
46  for (int i=0; i<size; i++){
47  // Compute tangents at quadrature points.
48  Vector_2<Real> nc;
49  e.get_gp_nat_coor(i, nc);
50 
51  const Real &xi=nc[0], &eta=nc[1];
52 
53  const Vector_3<Real> u = (1-eta)*(ps[1]-ps[0])+eta*(ps[2]-ps[3]);
54  const Vector_3<Real> v = (1-xi)* (ps[3]-ps[0])+xi* (ps[2]-ps[1]);
55 
56  // Obtain the weights and local area of quadrature point
57  const Real weight = e.get_gp_weight( i);
58 
59  // Evaluate the weights for Laplace-Beltrami operator
60  const Real jacobi_det = u.cross_product(u,v).norm();
61  const Real uv = u*v;
62 
63  const Real su = weight * ((1-eta)*uv-(1-xi)*(u*u))/jacobi_det;
64  const Real sv = weight * ((1-xi)*uv-(1-eta)*(v*v))/jacobi_det;
65 
66  ws[0] += (1-eta)*sv -xi*su;
67  ws[1] += xi*su + eta*sv;
68  ws[2] += (1-xi)*su - eta*sv;;
69  area += weight * jacobi_det;
70  }
71 
72  return area;
73 }
Encapsulation of the element-wise computations for two-dimensional elements.
double Real
Definition: mapbasic.h:322
*********************************************************************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
blockLoc i
Definition: read.cpp:79
static Vector_3 cross_product(const Vector_3 &v, const Vector_3 &w)
Definition: mapbasic.h:104
Type norm() const
Definition: mapbasic.h:112

Here is the call graph for this function:

Here is the caller graph for this function:

static SURF_BEGIN_NAMESPACE double sign ( double  x)
inlinestatic