paso::TransportProblem Class Reference

`#include <Transport.h>`

Inheritance diagram for paso::TransportProblem:

## Public Member Functions

| TransportProblem ()
| Default constructor - throws exception. More...
| TransportProblem (SystemMatrixPattern_ptr pattern, int blocksize, const escript::FunctionSpace &functionspace)
| ~TransportProblem ()
virtual void | resetTransport (bool preserveSolverData) const
| resets the transport operator typically as they have been updated. More...
void | solve (double *u, double dt, double *u0, double *q, Options *options)
virtual double | getSafeTimeStepSize () const
virtual double | getUnlimitedTimeStepSize () const
void | insertConstraint (const double *r, double *source) const
void | setUpConstraint (const double *q)
dim_t | getBlockSize () const
SystemMatrix_ptr< double > | borrowTransportMatrix () const
SystemMatrix_ptr< double > | borrowMassMatrix () const
double * | borrowLumpedMassMatrix () const
dim_t | getTotalNumRows () const
Connector_ptr | borrowConnector () const
index_t * | borrowMainDiagonalPointer () const
Public Member Functions inherited from escript::AbstractTransportProblem
| AbstractTransportProblem ()
| Default constructor for AbstractTransportProblem. More...
| AbstractTransportProblem (const int blocksize, const FunctionSpace &functionspace)
virtual | ~AbstractTransportProblem ()
| Destructor. More...
int | isEmpty () const
FunctionSpace | getFunctionSpace () const
| returns the column function space More...
int | getBlockSize () const
| returns the block size More...
Data | solve (Data &u0, Data &source, const double dt, boost::python::object &options)
| returns the solution u for a time step dt>0 with initial value u0 at time t=0 More...
void | insertConstraint (Data &source, Data &q, Data &r)
| inserts constraint u_{,t}=r where q>0 into the problem More...

## Static Public Member Functions

static int | getTypeId (int solver, int preconditioner, int package, bool symmetry, const escript::JMPI &mpi_info)

## Public Attributes

SystemMatrix_ptr< double > | transport_matrix
SystemMatrix_ptr< double > | mass_matrix
SystemMatrix_ptr< double > | iteration_matrix
bool | valid_matrices
double | dt_max_R
| safe time step size for reactive part More...
double | dt_max_T
| safe time step size for transport part More...
double * | constraint_mask
double * | main_diagonal_low_order_transport_matrix
double * | lumped_mass_matrix
double * | reactive_matrix
double * | main_diagonal_mass_matrix
escript::JMPI | mpi_info

## Private Member Functions

virtual void | setToSolution (escript::Data &out, escript::Data &u0, escript::Data &source, double dt, boost::python::object &options)
| sets solution out by time step dt. More...
virtual void | copyConstraint (escript::Data &source, escript::Data &q, escript::Data &r)
| copy constraint u_{,t}=r where q>0 into the problem it can be assumed that q and r are not empty and have appropriate shape and function space. More...

## Constructor & Destructor Documentation

## TransportProblem() [1/2]

paso::TransportProblem::TransportProblem | ( |  | ) |

Default constructor - throws exception.

## TransportProblem() [2/2]

paso::TransportProblem::TransportProblem | ( | SystemMatrixPattern_ptr | pattern,
|  | int | blocksize,
|  | const escript::FunctionSpace & | functionspace
| ) |  |

References constraint_mask, lumped_mass_matrix, main_diagonal_low_order_transport_matrix, main_diagonal_mass_matrix, mass_matrix, MATRIX_FORMAT_BLK1, MATRIX_FORMAT_DEFAULT, mpi_info, reactive_matrix, and transport_matrix.

## ~TransportProblem()

paso::TransportProblem::~TransportProblem | ( |  | ) |

References constraint_mask, lumped_mass_matrix, main_diagonal_low_order_transport_matrix, main_diagonal_mass_matrix, and reactive_matrix.

## Member Function Documentation

## borrowConnector()

Connector_ptr paso::TransportProblem::borrowConnector | ( |  | ) | const

inline

## borrowLumpedMassMatrix()

double* paso::TransportProblem::borrowLumpedMassMatrix | ( |  | ) | const

inline

## borrowMainDiagonalPointer()

index_t* paso::TransportProblem::borrowMainDiagonalPointer | ( |  | ) | const

inline

## borrowMassMatrix()

SystemMatrix_ptr<double> paso::TransportProblem::borrowMassMatrix | ( |  | ) | const

inline

Referenced by ripley::RipleyDomain::addPDEToTransportProblem(), dudley::DudleyDomain::addPDEToTransportProblem(), and finley::FinleyDomain::addPDEToTransportProblem().

## borrowTransportMatrix()

SystemMatrix_ptr<double> paso::TransportProblem::borrowTransportMatrix | ( |  | ) | const

inline

Referenced by ripley::RipleyDomain::addPDEToTransportProblem(), dudley::DudleyDomain::addPDEToTransportProblem(), and finley::FinleyDomain::addPDEToTransportProblem().

## copyConstraint()

void paso::TransportProblem::copyConstraint | ( | escript::Data & | source,
|  | escript::Data & | q,
|  | escript::Data & | r
| ) |  |

private virtual

copy constraint u_{,t}=r where q>0 into the problem it can be assumed that q and r are not empty and have appropriate shape and function space.

Reimplemented from escript::AbstractTransportProblem.

References escript::Data::copyWithMask(), escript::DataTypes::DataVectorAlt< T >::data(), escript::Data::expand(), getBlockSize(), escript::Data::getDataPointShape(), escript::Data::getDataPointSize(), escript::Data::getExpandedVectorReference(), escript::AbstractTransportProblem::getFunctionSpace(), escript::Data::getFunctionSpace(), escript::Data::getSampleDataRW(), insertConstraint(), escript::Data::isComplex(), mass_matrix, escript::Data::requireWrite(), setUpConstraint(), and transport_matrix.

## getBlockSize()

dim_t paso::TransportProblem::getBlockSize | ( |  | ) | const

inline

Referenced by copyConstraint(), setToSolution(), and solve().

## getSafeTimeStepSize()

double paso::TransportProblem::getSafeTimeStepSize | ( |  | ) | const

virtual

Reimplemented from escript::AbstractTransportProblem.

References constraint_mask, dt_max_R, dt_max_T, paso::FCT_Solver::getSafeTimeStepSize(), paso::ReactiveSolver::getSafeTimeStepSize(), lumped_mass_matrix, main_diagonal_mass_matrix, mass_matrix, mpi_info, MPI_INT, MPI_MAX, reactive_matrix, transport_matrix, and valid_matrices.

Referenced by solve().

## getTotalNumRows()

dim_t paso::TransportProblem::getTotalNumRows | ( |  | ) | const

inline

## getTypeId()

static int paso::TransportProblem::getTypeId | ( | int | solver,
|  | int | preconditioner,
|  | int | package,
|  | bool | symmetry,
|  | const escript::JMPI & | mpi_info
| ) |  |

inline static

References MATRIX_FORMAT_BLK1, and MATRIX_FORMAT_DEFAULT.

Referenced by dudley::DudleyDomain::getTransportTypeId(), finley::FinleyDomain::getTransportTypeId(), and ripley::RipleyDomain::getTransportTypeId().

## getUnlimitedTimeStepSize()

double paso::TransportProblem::getUnlimitedTimeStepSize | ( |  | ) | const

virtual

Reimplemented from escript::AbstractTransportProblem.

## insertConstraint()

void paso::TransportProblem::insertConstraint | ( | const double * | r,
|  | double * | source
| ) |  | const

References constraint_mask, and transport_matrix.

Referenced by copyConstraint().

## resetTransport()

void paso::TransportProblem::resetTransport | ( | bool | preserveSolverData | ) | const

virtual

resets the transport operator typically as they have been updated.

Reimplemented from escript::AbstractTransportProblem.

References constraint_mask, iteration_matrix, mass_matrix, paso::solve_free(), transport_matrix, valid_matrices, and paso::util::zeroes().

## setToSolution()

void paso::TransportProblem::setToSolution | ( | escript::Data & | out,
|  | escript::Data & | u0,
|  | escript::Data & | source,
|  | double | dt,
|  | boost::python::object & | options
| ) |  |

private virtual

sets solution out by time step dt.

Reimplemented from escript::AbstractTransportProblem.

References escript::DataTypes::DataVectorAlt< T >::data(), escript::Data::expand(), getBlockSize(), escript::Data::getDataPointSize(), escript::Data::getExpandedVectorReference(), escript::AbstractTransportProblem::getFunctionSpace(), escript::Data::getFunctionSpace(), escript::Data::isComplex(), escript::Data::requireWrite(), solve(), and paso::Options::updateEscriptDiagnostics().

## setUpConstraint()

void paso::TransportProblem::setUpConstraint | ( | const double * | q | ) |

References constraint_mask, transport_matrix, and valid_matrices.

Referenced by copyConstraint().

## solve()

void paso::TransportProblem::solve | ( | double * | u,
|  | double | dt,
|  | double * | u0,
|  | double * | q,
|  | Options * | options
| ) |  |

References paso::Breakdown, paso::util::copy(), paso::Divergence, dt_max_R, dt_max_T, paso::EPSILON, getBlockSize(), getSafeTimeStepSize(), paso::ReactiveSolver::initialize(), paso::FCT_Solver::initialize(), paso::InputError, paso::LARGE_POSITIVE_FLOAT, paso::MaxIterReached, paso::MemoryError, paso::NegativeNormError, paso::NoError, paso::Options::num_iter, paso::Options::ode_solver, PASO_BACKWARD_EULER, PASO_CRANK_NICOLSON, PASO_LINEAR_CRANK_NICOLSON, escript::DataTypes::real_t_eps(), escript::DataTypes::real_t_max(), paso::ReactiveSolver::solve(), paso::Options::time_step_backtracking_used, transport_matrix, paso::FCT_Solver::update(), and paso::Options::verbose.

Referenced by setToSolution().

## Member Data Documentation

## constraint_mask

double* paso::TransportProblem::constraint_mask

mutable

Referenced by getSafeTimeStepSize(), insertConstraint(), resetTransport(), setUpConstraint(), TransportProblem(), and ~TransportProblem().

## dt_max_R

double paso::TransportProblem::dt_max_R

mutable

safe time step size for reactive part

Referenced by getSafeTimeStepSize(), and solve().

## dt_max_T

double paso::TransportProblem::dt_max_T

mutable

safe time step size for transport part

Referenced by getSafeTimeStepSize(), and solve().

## iteration_matrix

SystemMatrix_ptr<double> paso::TransportProblem::iteration_matrix

Referenced by resetTransport().

## lumped_mass_matrix

double* paso::TransportProblem::lumped_mass_matrix

'relevant' lumped mass matrix is assumed to be positive. Values with corresponding constraint_mask > 0 value are set to -1 to indicate the value infinity

Referenced by getSafeTimeStepSize(), TransportProblem(), and ~TransportProblem().

## main_diagonal_low_order_transport_matrix

double* paso::TransportProblem::main_diagonal_low_order_transport_matrix

Referenced by TransportProblem(), and ~TransportProblem().

## main_diagonal_mass_matrix

double* paso::TransportProblem::main_diagonal_mass_matrix

Referenced by getSafeTimeStepSize(), TransportProblem(), and ~TransportProblem().

## mass_matrix

SystemMatrix_ptr<double> paso::TransportProblem::mass_matrix

Referenced by copyConstraint(), getSafeTimeStepSize(), resetTransport(), and TransportProblem().

## mpi_info

escript::JMPI paso::TransportProblem::mpi_info

Referenced by getSafeTimeStepSize(), and TransportProblem().

## reactive_matrix

double* paso::TransportProblem::reactive_matrix

Referenced by getSafeTimeStepSize(), TransportProblem(), and ~TransportProblem().

## transport_matrix

SystemMatrix_ptr<double> paso::TransportProblem::transport_matrix

Referenced by copyConstraint(), getSafeTimeStepSize(), insertConstraint(), resetTransport(), setUpConstraint(), solve(), and TransportProblem().

## valid_matrices

bool paso::TransportProblem::valid_matrices

mutable

Referenced by getSafeTimeStepSize(), resetTransport(), and setUpConstraint().

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

- Transport.h
- Transport.cpp
- Transport_solve.cpp