Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Cornelius Class Reference

#include <JETSCAPE/blob/main/external_packages/cornelius.h>

+ Collaboration diagram for Cornelius:

Public Member Functions

 Cornelius ()
 
 ~Cornelius ()
 
void init (int, double, double *)
 
void init_print (string)
 
void find_surface_2d (double **)
 
void find_surface_3d (double ***)
 
void find_surface_3d_print (double ***, double *)
 
void find_surface_4d (double ****)
 
int get_Nelements ()
 
double ** get_normals ()
 
double ** get_centroids ()
 
double ** get_normals_4d ()
 
double ** get_centroids_4d ()
 
double get_centroid_elem (int, int)
 
double get_normal_elem (int, int)
 
 Cornelius ()
 
 ~Cornelius ()
 
void init (int, double, double *)
 
void init_print (string)
 
void find_surface_2d (double **)
 
void find_surface_3d (double ***)
 
void find_surface_3d_print (double ***, double *)
 
void find_surface_4d (double ****)
 
int get_Nelements ()
 
double ** get_normals ()
 
double ** get_centroids ()
 
double ** get_normals_4d ()
 
double ** get_centroids_4d ()
 
double get_centroid_elem (int, int)
 
double get_normal_elem (int, int)
 
 Cornelius ()
 
 ~Cornelius ()
 
void init (int, double, double *)
 
void init_print (string)
 
void find_surface_2d (double **)
 
void find_surface_3d (double ***)
 
void find_surface_3d_print (double ***, double *)
 
void find_surface_4d (double ****)
 
int get_Nelements ()
 
double ** get_normals ()
 
double ** get_centroids ()
 
double ** get_normals_4d ()
 
double ** get_centroids_4d ()
 
double get_centroid_elem (int, int)
 
double get_normal_elem (int, int)
 
 Cornelius ()
 
 ~Cornelius ()
 
void init (int, double, double *)
 
void init_print (string)
 
void find_surface_2d (double **)
 
void find_surface_3d (double ***)
 
void find_surface_3d_print (double ***, double *)
 
void find_surface_4d (double ****)
 
int get_Nelements ()
 
double ** get_normals ()
 
double ** get_centroids ()
 
double ** get_normals_4d ()
 
double ** get_centroids_4d ()
 
double get_centroid_elem (int, int)
 
double get_normal_elem (int, int)
 

Private Member Functions

void surface_3d (double ***, double *, int)
 
void surface_3d (double ***, double *, int)
 
void surface_3d (double ***, double *, int)
 
void surface_3d (double ***, double *, int)
 

Private Attributes

int Nelements
 
double ** normals
 
double ** centroids
 
int cube_dim
 
int initialized
 
int print_initialized
 
double value0
 
doubledx
 
ofstream output_print
 
Square cu2d
 
Cube cu3d
 
Hypercube cu4d
 

Static Private Attributes

static const int STEPS = 2
 
static const int DIM = 4
 
static const int MAX_ELEMENTS = 10
 

Detailed Description

A class for finding a constant value surface from a 2-4 dimensional cube. The values at corners and length of the side are needed as an input.

Algorithm by Pasi Huovinen. This code is based on the original FORTRAN code by Pasi Huovinen.

A class for finding a constant value surface from a 2-4 dimensional cube. The values at corners and length of the side are needed as an input.

Algorithm by Pasi Huovinen. This code is based on the original FORTRAN code by Pasi Huovinen.

23.04.2012 Hannu Holopainen

Definition at line 1999 of file cornelius.cpp.

View newest version in sPHENIX GitHub at line 1999 of file cornelius.cpp

Constructor & Destructor Documentation

Cornelius::Cornelius ( )

Constructor allocates some memory.

Definition at line 2041 of file cornelius.cpp.

View newest version in sPHENIX GitHub at line 2041 of file cornelius.cpp

References i.

Cornelius::~Cornelius ( )

Destructor frees memory and closes printing file is necessary.

Definition at line 2059 of file cornelius.cpp.

View newest version in sPHENIX GitHub at line 2059 of file cornelius.cpp

References i.

Cornelius::Cornelius ( )
Cornelius::~Cornelius ( )
Cornelius::Cornelius ( )
Cornelius::~Cornelius ( )
Cornelius::Cornelius ( )
Cornelius::~Cornelius ( )

Member Function Documentation

void Cornelius::find_surface_2d ( double **  )
void Cornelius::find_surface_2d ( double **  )
void Cornelius::find_surface_2d ( double **  )
void Cornelius::find_surface_2d ( double **  cube)

Finds the surface elements in 2-dimensional case.

Parameters
[in]cubeValues at the corners of the cube as a 2d table so that value [0][0] is at (0,0,0) and [1][1] is at (dx1,dx2).

Definition at line 2127 of file cornelius.cpp.

View newest version in sPHENIX GitHub at line 2127 of file cornelius.cpp

References GeneralElement::get_centroid(), GeneralElement::get_normal(), i, and j.

+ Here is the call graph for this function:

void Cornelius::find_surface_3d ( double ***  )
void Cornelius::find_surface_3d ( double ***  )
void Cornelius::find_surface_3d ( double ***  )
void Cornelius::find_surface_3d ( double ***  cube)

Finds the surface elements in 3-dimensional case.

Parameters
[in]cubeValues at the corners of the cube as a 3d table so that value [0][0][0] is at (0,0,0) and [1][1][1] is at (dx1,dx2,dx3).

Definition at line 2161 of file cornelius.cpp.

View newest version in sPHENIX GitHub at line 2161 of file cornelius.cpp

References Acts::Test::pos.

Referenced by SurfaceFinder::Find_full_hypersurface(), and Jetscape::SurfaceFinder::Find_full_hypersurface_3D().

+ Here is the caller graph for this function:

void Cornelius::find_surface_3d_print ( double ***  ,
double  
)
void Cornelius::find_surface_3d_print ( double ***  ,
double  
)
void Cornelius::find_surface_3d_print ( double ***  ,
double  
)
void Cornelius::find_surface_3d_print ( double ***  cube,
double pos 
)

Finds the surface elements in 3-dimensional case and prints the actual triangles which are found by the algorithm.

Parameters
[in]cubeValues at the corners of the cube as a 3d table so that value [0][0][0] is at (0,0,0) and [1][1][1] is at (dx1,dx2,dx3).
[in]posAbsolute position at the point [0][0][0] in form (0,x1,x2,x3).

Definition at line 2177 of file cornelius.cpp.

View newest version in sPHENIX GitHub at line 2177 of file cornelius.cpp

void Cornelius::find_surface_4d ( double ****  )
void Cornelius::find_surface_4d ( double ****  )
void Cornelius::find_surface_4d ( double ****  )
void Cornelius::find_surface_4d ( double ****  cube)

Finds the surface elements in 4-dimensional case.

Parameters
[in]cubeValues at the corners of the cube as a 4d table so that value [0][0][0][0] is at (0,0,0,0) and [1][1][1][1] is at (dx1,dx2,dx3,dx4).

Definition at line 2248 of file cornelius.cpp.

View newest version in sPHENIX GitHub at line 2248 of file cornelius.cpp

References GeneralElement::get_centroid(), GeneralElement::get_normal(), i, j, k, and merge_hashes::p.

Referenced by Jetscape::SurfaceFinder::Find_full_hypersurface_4D().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double Cornelius::get_centroid_elem ( int  ,
int   
)
double Cornelius::get_centroid_elem ( int  ,
int   
)
double Cornelius::get_centroid_elem ( int  ,
int   
)
double Cornelius::get_centroid_elem ( int  i,
int  j 
)

Returns an element of the centroid vector.

Parameters
[in]iNumber of surface element whose centroid one wants to get. Valid values are [0,number of elements in this cube].
[in]jIndex of the element of centroid. Valid values are [0,dimension of the problem].
Returns
Element j of the centroid of the surface element i.

Definition at line 2404 of file cornelius.cpp.

View newest version in sPHENIX GitHub at line 2404 of file cornelius.cpp

References i.

Referenced by SurfaceFinder::Find_full_hypersurface(), Jetscape::SurfaceFinder::Find_full_hypersurface_3D(), and Jetscape::SurfaceFinder::Find_full_hypersurface_4D().

+ Here is the caller graph for this function:

double** Cornelius::get_centroids ( )
double** Cornelius::get_centroids ( )
double** Cornelius::get_centroids ( )
double ** Cornelius::get_centroids ( )

Returns the centroid vectors as a 2d table with the following number of indices [number of elements][dimension of the problem]. Note that this function allocates memory and the user must free it!

Returns
Table with dimensions [number of elements][dimensions] containing the centroid vectors of the surface elements.

Definition at line 2358 of file cornelius.cpp.

View newest version in sPHENIX GitHub at line 2358 of file cornelius.cpp

References i, and j.

double** Cornelius::get_centroids_4d ( )
double** Cornelius::get_centroids_4d ( )
double ** Cornelius::get_centroids_4d ( )

Returns the centroid vectors as a 2d table with the following number of indices [number of elements][4]. If the dimension of the problem is smaller than four, first (4-dimension) elements are zero. Note that this function allocates memory and the user must free it!

Returns
Table with dimensions [number of elements][4] containing the normal vectors of the surface elements.

Definition at line 2312 of file cornelius.cpp.

View newest version in sPHENIX GitHub at line 2312 of file cornelius.cpp

References i, and j.

double** Cornelius::get_centroids_4d ( )
int Cornelius::get_Nelements ( )
int Cornelius::get_Nelements ( )
int Cornelius::get_Nelements ( )
int Cornelius::get_Nelements ( )

Returns the number of the surface elements in the given cube.

Returns
Number of surface elements in the given cube.

Definition at line 2296 of file cornelius.cpp.

View newest version in sPHENIX GitHub at line 2296 of file cornelius.cpp

Referenced by SurfaceFinder::Find_full_hypersurface(), Jetscape::SurfaceFinder::Find_full_hypersurface_3D(), and Jetscape::SurfaceFinder::Find_full_hypersurface_4D().

+ Here is the caller graph for this function:

double Cornelius::get_normal_elem ( int  ,
int   
)
double Cornelius::get_normal_elem ( int  ,
int   
)
double Cornelius::get_normal_elem ( int  i,
int  j 
)

Returns an element of the normal vector. This gives without factors (sqrt(-g)) from the metric.

Parameters
[in]iNumber of surface element whose normal one wants to get. Valid values are [0,number of elements in this cube].
[in]jIndex of the element of centroid. Valid values are [0,dimension of the problem].
Returns
Element j of the normal of the surface element i.

Definition at line 2425 of file cornelius.cpp.

View newest version in sPHENIX GitHub at line 2425 of file cornelius.cpp

References i.

Referenced by SurfaceFinder::Find_full_hypersurface(), Jetscape::SurfaceFinder::Find_full_hypersurface_3D(), and Jetscape::SurfaceFinder::Find_full_hypersurface_4D().

+ Here is the caller graph for this function:

double Cornelius::get_normal_elem ( int  ,
int   
)
double** Cornelius::get_normals ( )
double** Cornelius::get_normals ( )
double** Cornelius::get_normals ( )
double ** Cornelius::get_normals ( )

Returns the normal vectors as a 2d table with the following number of indices [number of elements][dimension of the problem]. This gives without factors(sqrt(-g)) from the metric. Note that this function allocates memory and the user must free it!

Returns
Table with dimensions [number of elements][dimensions] containing the normal vectors of the surface elements.

Definition at line 2381 of file cornelius.cpp.

View newest version in sPHENIX GitHub at line 2381 of file cornelius.cpp

References i, and j.

double** Cornelius::get_normals_4d ( )
double** Cornelius::get_normals_4d ( )
double ** Cornelius::get_normals_4d ( )

Returns the normal vectors as a 2d table with the following number of indices [number of elements][4]. If the dimension of the problem is smaller than four, first (4-dimension) elements are zero. This gives without factors(sqrt(-g)) from the metric. Note that this function allocates memory and the user must free it!

Returns
Table with dimensions [number of elements][4] containing the normal vectors of the surface elements.

Definition at line 2336 of file cornelius.cpp.

View newest version in sPHENIX GitHub at line 2336 of file cornelius.cpp

References i, and j.

double** Cornelius::get_normals_4d ( )
void Cornelius::init ( int  ,
double  ,
double  
)
void Cornelius::init ( int  ,
double  ,
double  
)
void Cornelius::init ( int  ,
double  ,
double  
)
void Cornelius::init ( int  d,
double  v0,
double dex 
)

Initializes Cornelius. Can be used several times without any problems. This might be useful if cube size varies during evolution.

Parameters
[in]dDimension of the problem.
[in]v0Value which defines the surface.
[in]dexLength of the sides of the cube. Must contains as many elements as the dimension of the problem (dx1,dx2,...).

Definition at line 2087 of file cornelius.cpp.

View newest version in sPHENIX GitHub at line 2087 of file cornelius.cpp

References i.

Referenced by SurfaceFinder::Find_full_hypersurface(), Jetscape::SurfaceFinder::Find_full_hypersurface_3D(), and Jetscape::SurfaceFinder::Find_full_hypersurface_4D().

+ Here is the caller graph for this function:

void Cornelius::init_print ( string  )
void Cornelius::init_print ( string  )
void Cornelius::init_print ( string  )
void Cornelius::init_print ( string  filename)

This initializes the printing of the surface elements into file. Final elements are not printed with this, but instead this is used to print the triangles, which are used to construct the final elements.

Parameters
[in]filenameFilename of the file where the information is printed.

Definition at line 2113 of file cornelius.cpp.

View newest version in sPHENIX GitHub at line 2113 of file cornelius.cpp

void Cornelius::surface_3d ( double ***  ,
double ,
int   
)
private
void Cornelius::surface_3d ( double ***  ,
double ,
int   
)
private
void Cornelius::surface_3d ( double ***  ,
double ,
int   
)
private
void Cornelius::surface_3d ( double ***  cube,
double pos,
int  do_print 
)
private

Finds the surface elements in 3-dimensional case.

Parameters
[in]cubeValues at the corners of the cube as a 3d table so that value [0][0][0] is at (0,0,0) and [1][1][1] is at (dx1,dx2,dx3).
[in]posAbsolute position at the point [0][0][0] in form (0,x1,x2,x3).
[in]do_print1 if triangles are printed, otherwise 0

Definition at line 2192 of file cornelius.cpp.

View newest version in sPHENIX GitHub at line 2192 of file cornelius.cpp

References GeneralElement::get_centroid(), GeneralElement::get_normal(), i, j, k, merge_hashes::p, and Polygon::print().

+ Here is the call graph for this function:

Member Data Documentation

double ** Cornelius::centroids
private

Definition at line 2007 of file cornelius.cpp.

View newest version in sPHENIX GitHub at line 2007 of file cornelius.cpp

Square Cornelius::cu2d
private

Definition at line 2015 of file cornelius.cpp.

View newest version in sPHENIX GitHub at line 2015 of file cornelius.cpp

Cube Cornelius::cu3d
private

Definition at line 2016 of file cornelius.cpp.

View newest version in sPHENIX GitHub at line 2016 of file cornelius.cpp

Hypercube Cornelius::cu4d
private

Definition at line 2017 of file cornelius.cpp.

View newest version in sPHENIX GitHub at line 2017 of file cornelius.cpp

int Cornelius::cube_dim
private

Definition at line 2008 of file cornelius.cpp.

View newest version in sPHENIX GitHub at line 2008 of file cornelius.cpp

static const int Cornelius::DIM = 4
staticprivate

Definition at line 2003 of file cornelius.cpp.

View newest version in sPHENIX GitHub at line 2003 of file cornelius.cpp

double * Cornelius::dx
private

Definition at line 2012 of file cornelius.cpp.

View newest version in sPHENIX GitHub at line 2012 of file cornelius.cpp

int Cornelius::initialized
private

Definition at line 2009 of file cornelius.cpp.

View newest version in sPHENIX GitHub at line 2009 of file cornelius.cpp

static const int Cornelius::MAX_ELEMENTS = 10
staticprivate

Definition at line 2004 of file cornelius.cpp.

View newest version in sPHENIX GitHub at line 2004 of file cornelius.cpp

int Cornelius::Nelements
private

Definition at line 2005 of file cornelius.cpp.

View newest version in sPHENIX GitHub at line 2005 of file cornelius.cpp

double ** Cornelius::normals
private

Definition at line 2006 of file cornelius.cpp.

View newest version in sPHENIX GitHub at line 2006 of file cornelius.cpp

ofstream Cornelius::output_print
private

Definition at line 2013 of file cornelius.cpp.

View newest version in sPHENIX GitHub at line 2013 of file cornelius.cpp

int Cornelius::print_initialized
private

Definition at line 2010 of file cornelius.cpp.

View newest version in sPHENIX GitHub at line 2010 of file cornelius.cpp

static const int Cornelius::STEPS = 2
staticprivate

Definition at line 2002 of file cornelius.cpp.

View newest version in sPHENIX GitHub at line 2002 of file cornelius.cpp

double Cornelius::value0
private

Definition at line 2011 of file cornelius.cpp.

View newest version in sPHENIX GitHub at line 2011 of file cornelius.cpp


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