46 #ifndef _PEXSI_SUPERLUGRID_IMPL_HPP_
47 #define _PEXSI_SUPERLUGRID_IMPL_HPP_
56 inline SuperLUGrid<Real>::SuperLUGrid ( MPI_Comm comm, Int nprow, Int npcol )
59 PushCallStack(
"SuperLUGrid::SuperLUGrid");
66 throw std::runtime_error(
"SuperLUGrid cannot be allocated." );
68 ptrData->GridInit(comm, nprow, npcol);
77 inline SuperLUGrid<Real>::~SuperLUGrid ( )
80 PushCallStack(
"SuperLUGrid::~SuperLUGrid");
101 inline SuperLUGrid<Real>::SuperLUGrid(
const SuperLUGrid<Real> & g)
104 PushCallStack(
"SuperLUGrid::SuperLUGrid");
107 if(g.ptrData == NULL){
108 throw std::runtime_error(
"Original SuperLUGrid not allocated." );
111 ptrData =
new RealGridData(*g.ptrData);
116 throw std::runtime_error(
"SuperLUGrid cannot be allocated." );
126 inline SuperLUGrid<Real> & SuperLUGrid<Real>::operator = (
const SuperLUGrid<Real> & g){
134 if(g.ptrData == NULL){
135 throw std::runtime_error(
"Original SuperLUGrid not allocated." );
138 ptrData =
new RealGridData(*g.ptrData);
140 throw std::runtime_error(
"SuperLUGrid cannot be allocated." );
158 inline SuperLUGrid<Complex>::SuperLUGrid ( MPI_Comm comm, Int nprow, Int npcol )
161 PushCallStack(
"SuperLUGrid::SuperLUGrid");
168 throw std::runtime_error(
"SuperLUGrid cannot be allocated." );
170 ptrData->GridInit(comm, nprow, npcol);
180 inline SuperLUGrid<Complex>::~SuperLUGrid ( )
183 PushCallStack(
"SuperLUGrid::~SuperLUGrid");
200 inline SuperLUGrid<Complex>::SuperLUGrid(
const SuperLUGrid<Complex> & g)
203 PushCallStack(
"SuperLUGrid::SuperLUGrid");
206 if(g.ptrData == NULL){
207 throw std::runtime_error(
"Original SuperLUGrid not allocated." );
210 ptrData =
new ComplexGridData(*g.ptrData);
215 throw std::runtime_error(
"SuperLUGrid cannot be allocated." );
225 inline SuperLUGrid<Complex> & SuperLUGrid<Complex>::operator = (
const SuperLUGrid<Complex> & g){
233 if(g.ptrData == NULL){
234 throw std::runtime_error(
"Original SuperLUGrid not allocated." );
237 ptrData =
new ComplexGridData(*g.ptrData);
239 throw std::runtime_error(
"SuperLUGrid cannot be allocated." );
260 #endif //_PEXSI_SUPERLUGRID_IMPL_HPP_
void * ptrData
SuperLUMatrix can have access to the grid information.
Definition: SuperLUGrid.hpp:101