LORENE
Lorene::Base_vect_cart Class Reference

Cartesian vectorial bases (triads). More...

#include <base_vect.h>

Inheritance diagram for Lorene::Base_vect_cart:
Lorene::Base_vect

Public Member Functions

 Base_vect_cart (double rot_phi_i)
 Standard constructor. More...
 
 Base_vect_cart (double rot_phi_i, const char *name_i)
 Standard constructor with name. More...
 
 Base_vect_cart (const Base_vect_cart &)
 Copy constructor. More...
 
virtual ~Base_vect_cart ()
 Destructor. More...
 
void operator= (const Base_vect_cart &)
 Assignment to another Base_vect_cart. More...
 
void set_rot_phi (double rot_phi_i)
 Sets a new value to the angle rot_phi between the x –axis and the absolute frame X –axis. More...
 
virtual bool operator== (const Base_vect &) const
 Comparison operator (egality) More...
 
virtual void change_basis (Tenseur &) const
 Change the basis in which the components of a tensor are expressed. More...
 
virtual int identify () const
 Returns a number to identify the sub-classe of Base_vect the object belongs to. More...
 
int get_align () const
 Returns the indicator of alignment with respect to the absolute frame. More...
 
virtual void sauve (FILE *) const
 Save in a file. More...
 
void set_name (const char *name_i)
 Sets the basis name. More...
 
const char * get_name () const
 Returns the basis name. More...
 
bool operator!= (const Base_vect &) const
 Comparison operator (difference) More...
 

Static Public Member Functions

static Base_vectbvect_from_file (FILE *)
 Construction of a vectorial basis from a file (see sauve(FILE* ) ). More...
 

Protected Member Functions

 Base_vect_cart (FILE *)
 Constructor from a file. More...
 
virtual ostream & operator>> (ostream &) const
 Operator >> More...
 

Protected Attributes

char name [100]
 Name of the basis. More...
 

Private Member Functions

void set_align ()
 Computes align from the value of rot_phi. More...
 

Private Attributes

double rot_phi
 Angle between the x –axis and the absolute frame X –axis. More...
 
int align
 Indicator of alignment with respect to the absolute frame: \ align = 1 : basis aligned with the absolute frame ( ${\tt rot\_phi = 0}$) \ align = -1 : basis anti-aligned with the absolute frame ( ${\tt rot\_phi} = \pi$) \ align = 0 : general case. More...
 

Friends

Base_vectBase_vect::bvect_from_file (FILE *)
 The construction function from a file. More...
 

Detailed Description

Cartesian vectorial bases (triads).

()

Definition at line 201 of file base_vect.h.

Constructor & Destructor Documentation

◆ Base_vect_cart() [1/4]

Lorene::Base_vect_cart::Base_vect_cart ( double  rot_phi_i)
explicit

Standard constructor.

Definition at line 113 of file base_vect_cart.C.

References set_align().

◆ Base_vect_cart() [2/4]

Lorene::Base_vect_cart::Base_vect_cart ( double  rot_phi_i,
const char *  name_i 
)

Standard constructor with name.

Definition at line 123 of file base_vect_cart.C.

References set_align().

◆ Base_vect_cart() [3/4]

Lorene::Base_vect_cart::Base_vect_cart ( const Base_vect_cart bi)

Copy constructor.

Definition at line 133 of file base_vect_cart.C.

References set_align().

◆ Base_vect_cart() [4/4]

Lorene::Base_vect_cart::Base_vect_cart ( FILE *  fich)
explicitprotected

Constructor from a file.

This constructor is protected because any Base_vect_cart
construction from a file must be done via the function Base_vect::bvect_from_file .

Definition at line 142 of file base_vect_cart.C.

References Lorene::fread_be(), rot_phi, and set_align().

◆ ~Base_vect_cart()

Lorene::Base_vect_cart::~Base_vect_cart ( )
virtual

Destructor.

Definition at line 155 of file base_vect_cart.C.

Member Function Documentation

◆ bvect_from_file()

Base_vect * Lorene::Base_vect::bvect_from_file ( FILE *  fich)
staticinherited

Construction of a vectorial basis from a file (see sauve(FILE* ) ).

Definition at line 87 of file base_vect_from_file.C.

References Lorene::fread_be().

◆ change_basis()

void Lorene::Base_vect_cart::change_basis ( Tenseur ti) const
virtual

Change the basis in which the components of a tensor are expressed.

Implements Lorene::Base_vect.

Definition at line 283 of file base_vect_cart.C.

References Lorene::Tenseur::get_etat().

◆ get_align()

int Lorene::Base_vect_cart::get_align ( ) const
inline

Returns the indicator of alignment with respect to the absolute frame.

Returns
1 : basis aligned with the absolute frame ( ${\tt rot\_phi = 0}$) \ -1 : basis anti-aligned with the absolute frame ( ${\tt rot\_phi} = \pi$) \ 0 : general case

Definition at line 285 of file base_vect.h.

References align.

◆ get_name()

const char * Lorene::Base_vect::get_name ( ) const
inherited

Returns the basis name.

Definition at line 143 of file base_vect.C.

References Lorene::Base_vect::name.

◆ identify()

int Lorene::Base_vect_cart::identify ( ) const
virtual

Returns a number to identify the sub-classe of Base_vect the object belongs to.

Implements Lorene::Base_vect.

Definition at line 77 of file base_vect_from_file.C.

◆ operator!=()

bool Lorene::Base_vect::operator!= ( const Base_vect bi) const
inherited

Comparison operator (difference)

Definition at line 177 of file base_vect.C.

◆ operator=()

void Lorene::Base_vect_cart::operator= ( const Base_vect_cart bi)

Assignment to another Base_vect_cart.

Definition at line 168 of file base_vect_cart.C.

References Lorene::Base_vect::name, rot_phi, set_align(), and Lorene::Base_vect::set_name().

◆ operator==()

bool Lorene::Base_vect_cart::operator== ( const Base_vect bi) const
virtual

Comparison operator (egality)

Implements Lorene::Base_vect.

Definition at line 227 of file base_vect_cart.C.

References Lorene::Base_vect::identify(), identify(), and rot_phi.

◆ operator>>()

ostream & Lorene::Base_vect_cart::operator>> ( ostream &  ost) const
protectedvirtual

Operator >>

Implements Lorene::Base_vect.

Definition at line 265 of file base_vect_cart.C.

References rot_phi.

◆ sauve()

void Lorene::Base_vect_cart::sauve ( FILE *  fich) const
virtual

Save in a file.

Reimplemented from Lorene::Base_vect.

Definition at line 257 of file base_vect_cart.C.

References Lorene::fwrite_be(), rot_phi, and Lorene::Base_vect::sauve().

◆ set_align()

void Lorene::Base_vect_cart::set_align ( )
private

Computes align from the value of rot_phi.

Definition at line 182 of file base_vect_cart.C.

References align, Lorene::arrete(), and rot_phi.

◆ set_name()

void Lorene::Base_vect::set_name ( const char *  name_i)
inherited

Sets the basis name.

Definition at line 137 of file base_vect.C.

References Lorene::Base_vect::name.

◆ set_rot_phi()

void Lorene::Base_vect_cart::set_rot_phi ( double  rot_phi_i)

Sets a new value to the angle rot_phi between the x –axis and the absolute frame X –axis.

Definition at line 215 of file base_vect_cart.C.

References rot_phi, and set_align().

Friends And Related Function Documentation

◆ Base_vect::bvect_from_file

Base_vect* Base_vect::bvect_from_file ( FILE *  )
friend

The construction function from a file.

Member Data Documentation

◆ align

int Lorene::Base_vect_cart::align
private

Indicator of alignment with respect to the absolute frame: \ align = 1 : basis aligned with the absolute frame ( ${\tt rot\_phi = 0}$) \ align = -1 : basis anti-aligned with the absolute frame ( ${\tt rot\_phi} = \pi$) \ align = 0 : general case.

Definition at line 217 of file base_vect.h.

◆ name

char Lorene::Base_vect::name[100]
protectedinherited

Name of the basis.

Definition at line 110 of file base_vect.h.

◆ rot_phi

double Lorene::Base_vect_cart::rot_phi
private

Angle between the x –axis and the absolute frame X –axis.

Definition at line 207 of file base_vect.h.


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