Komplex  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
List of all members
Komplex_Ordering Class Reference

Komplex_Ordering: A class for manipulating the KForm of various Komplex objects. More...

#include <Komplex_Ordering.h>

Public Member Functions

 Komplex_Ordering (const Epetra_BlockMap &Map, Komplex_KForms KForm, bool IsOneObject)
 Basic Komplex_Ordering constuctor. More...
 
 Komplex_Ordering (Komplex_Ordering &Source)
 Komplex_Ordering copy constructor. More...
 
virtual ~Komplex_Ordering (void)
 Komplex_Ordering destructor.
 
Komplex_KForms KForm (void)
 Returns the current K form.
 
int SwitchKForm (Komplex_KForms NewKForm)
 Switches the current K form. More...
 
int PermutationVector (int *Perms)
 
int ScalingVector (double *Scales)
 
int GlobalIndex (int GlobalRow, int &Index)
 
int GlobalScaling (int GlobalRow, double &Scalar)
 
int MyIndex (int MyRow, int &Index)
 
int MyScaling (int MyRow, double &Scalar)
 
void Reset (Komplex_KForms NewKForm)
 Reset the values of P_ and D_ to their original state and set KForm_ to NewKForm. More...
 

Detailed Description

Komplex_Ordering: A class for manipulating the KForm of various Komplex objects.

The Komplex_Ordering class aids other Komplex classes in switching from one KForm to another with minimal amounts of swapping.

Constructor & Destructor Documentation

Komplex_Ordering::Komplex_Ordering ( const Epetra_BlockMap Map,
Komplex_KForms  KForm,
bool  IsOneObject 
)

Basic Komplex_Ordering constuctor.

Creates a Komplex_Ordering object.

Parameters
Map(In) A Epetra_LocalMap, Epetra_Map or Epetra_BlockMap.
Warning
Note that, because Epetra_LocalMap derives from Epetra_Map and Epetra_Map derives from Epetra_BlockMap, this constructor works for all three types of Epetra map classes.
Parameters
KForm(In) The Komplex_KForms to use.
IsOneObject(In) If true, this ordering is for a single object, real and imaginary values interleaved.
Returns
Pointer to a Komplex_Ordering object.

References Epetra_BlockMap::NumGlobalElements().

Komplex_Ordering::Komplex_Ordering ( Komplex_Ordering Source)

Komplex_Ordering copy constructor.

Creates a Komplex_Ordering object from a pre-existing one.

Parameters
Source(In) A fully constructed Komplex_Ordering object.
Returns
Pointer to a Komplex_Ordering object.

Member Function Documentation

int Komplex_Ordering::GlobalIndex ( int  GlobalRow,
int &  Index 
)

Global element in P access function

Parameters
GlobalRow(In) Array row to be returned.
Index(Out) Integer code, 1 meaning GlobalRow is the TrueRow for a one-object object or 1 meaning GlobalRow/2 in the Real object; -1 meaning the preceding or following row for a one-object object or -1 meaning GlobalRow/2 in the Imag object.
Returns
Integer error code

Referenced by MyIndex(), Komplex_MultiVector::ReplaceGlobalValue(), and Komplex_MultiVector::SumIntoGlobalValue().

int Komplex_Ordering::GlobalScaling ( int  GlobalRow,
double &  Scalar 
)

Global element in D access function

Parameters
GlobalRow(In) Array row to be returned.
Scalar(Out) Double address to return the value.
Returns
Integer error code, set to 0 if successful.

Referenced by MyScaling(), Komplex_MultiVector::ReplaceGlobalValue(), and Komplex_MultiVector::SumIntoGlobalValue().

int Komplex_Ordering::MyIndex ( int  MyRow,
int &  Index 
)

Local element in P access function

Parameters
MyRow(In) Array row to be returned.
Index(Out) Integer code, 1 meaning MyRow is the TrueRow for a one-object object or 1 meaning MyRow/2 in the Real object; -1 meaning the preceding or following row for a one-object object or -1 meaning MyRow/2 in the Imag object.
Returns
Integer error code

References GlobalIndex().

Referenced by Komplex_MultiVector::ReplaceMyValue(), and Komplex_MultiVector::SumIntoMyValue().

int Komplex_Ordering::MyScaling ( int  MyRow,
double &  Scalar 
)

Local element in D access function

Parameters
MyRow(In) Array row to be returned.
Scalar(Out) Double address to return the value.
Returns
Integer error code, set to 0 if successful.

References GlobalScaling().

Referenced by Komplex_MultiVector::ReplaceMyValue(), and Komplex_MultiVector::SumIntoMyValue().

int Komplex_Ordering::PermutationVector ( int *  Perms)

P vector access function

Parameters
Perms(Out) Pointer to memory space that will contain the values of P.
Returns
Integer error code, set to 0 if successful.

References Epetra_Vector::ExtractCopy().

Referenced by Komplex_MultiVector::ImagValues(), Komplex_MultiVector::NormWeighted(), Komplex_MultiVector::operator[](), Komplex_MultiVector::Print(), and Komplex_MultiVector::RealValues().

void Komplex_Ordering::Reset ( Komplex_KForms  NewKForm)

Reset the values of P_ and D_ to their original state and set KForm_ to NewKForm.

Parameters
Source(In) Fully constructed Komplex_MultiVector that owns the this Komplex_Ordering.
Returns
Integer error code, set to 0 if successful.
int Komplex_Ordering::ScalingVector ( double *  Scales)

D vector access function

Parameters
Scales(Out) Pointer to memory space that will contain the values of D.
Returns
Integer error code, set to 0 if successful.

References Epetra_Vector::ExtractCopy().

Referenced by Komplex_MultiVector::ImagValues(), Komplex_MultiVector::MaxValue(), Komplex_MultiVector::MeanValue(), Komplex_MultiVector::MinValue(), Komplex_MultiVector::operator[](), Komplex_MultiVector::PutScalar(), and Komplex_MultiVector::RealValues().

int Komplex_Ordering::SwitchKForm ( Komplex_KForms  NewKForm)

Switches the current K form.

Parameters
NewKForm(In) The new KForms to use.
Returns
Integer error code, set to 0 if successful.

Referenced by Komplex_MultiVector::SwitchKForm().


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