class StencilOp_d : public HCL_OpProductDomain_d

stencil operator class

Inheritance:


Public Methods

virtual int CheckStability ( const HCL_Vector_d & c )
CheckStability should check the appropriate stability condition for the given input vector, returning 1 if the condition is met (that is, if the integration can be done safely) and 0 if the condition fails
virtual HCL_VectorSpace_d& Domain ()
Domain space access
virtual HCL_EvaluateOp_d* Evaluate ( const HCL_Vector_d & x )
Evaluate creates an evaluation object which knows how to compute the image and the derivative (as a linear operator with adjoint) at a point
virtual void Image ()
Image (with no arguments) computes the action of the operator on the vector (c,u) and overwrites u with the result
virtual void Image ( const HCL_Vector_d & x, HCL_Vector_d & y )
Image computes the action of the operator on x, giving y
virtual void InitializeControl ( const HCL_Vector_d * c )
InitializeControl copies a pointer to the control variable
virtual void InitializeControlPerturbation ( const HCL_Vector_d * dc )
InitializeControlPerturbation copies a pointer to the control variable
virtual void PartialDerivAdjImageAddControl ( HCL_Vector_d & dc )
PartialDerivAdjImageAddControl computes the image of the adjoint of the partial derivative with respect to the control variable
virtual void PartialDerivAdjImageState ()
PartialDerivAdjImageState computes the image of the adjoint of the partial derivative with respect to the state variable
virtual void PartialDerivImage ( int i, const HCL_Vector_d & x, const HCL_Vector_d & dx, HCL_Vector_d & dy )
PartialDerivImage computes the image of the derivative on dx, yielding dy
virtual void PartialDerivImageAddControl ()
PartialDerivImageAddControl computes the image of the derivative, with respect to the control variable, acting on the control perturbation dc
virtual void PartialDerivImageState ()
PartialDerivImageState computes the image of the derivative, with respect to the state variable, acting on the (internal) state perturbation du
virtual void PartialInvImage ()
PartialInvImage computes the image of the inverse, with respect to the second component, of the operator
virtual HCL_VectorSpace_d& Range ()
Range space access
virtual int SetTime ( int it )
SetTime sets the time level parameter, which is used in finite difference simulation
virtual HCL_Vector_d& StatePerturbation ()
StatePerturbation returns a reference to the internally-stored state perturbation du; this is a vector in the second factor of the domain
virtual HCL_Vector_d& StateVector ()
StateVector returns a reference to the internally-stored state vector; this is a vector in the second factor of the domain
virtual ostream& Write ( ostream & str )
Debugging information

Inherited from HCL_OpProductDomain_d:

Public Methods

int CheckPartialDeriv( int ind, const HCL_Vector_d &, const HCL_Vector_d &, ostream & str, int n=10, double hmin=0.1, double hmax=1.0 )
int CheckPartialDerivAdj( int ind, const HCL_Vector_d &, const HCL_Vector_d &, ostream & str, int n=10, double hmin=0.1, double hmax=1.0 )
int CheckSecondPartialDeriv( int i, int j, const HCL_Vector_d & x, const HCL_Vector_d & dxj, const HCL_Vector_d & dxi, ostream & str, int n=10, double hmin=0.1, double hmax=1.0 )
int CheckSecondPartialDeriv( int i, const HCL_Vector_d & x, const HCL_Vector_d & dxi, ostream & str, int n=10, double hmin=0.1, double hmax=1.0 )
int CheckSecondPartialDerivAdj( int i, int j, const HCL_Vector_d & x, const HCL_Vector_d & dxj, const HCL_Vector_d & dxi, ostream & str, int n=10, double hmin=0.1, double hmax=1.0 )
int CheckSecondPartialDerivAdj( int i, const HCL_Vector_d & x, const HCL_Vector_d & dxi, ostream & str, int n=10, double hmin=0.1, double hmax=1.0 )
virtual HCL_LinearOp_d* PartialDeriv( int i, const HCL_Vector_d & x )
virtual HCL_ProductSpace_d& ProductDomain()
virtual HCL_BiLinearOp_d* SecondPartialDeriv( int i, int j, const HCL_Vector_d & x )

Protected Methods

virtual void Image1( const HCL_Vector_d & x, HCL_Vector_d & y )
virtual HCL_LinearOp_d* PartialDeriv1( int i, const HCL_Vector_d & x )
virtual void PartialDerivAdjImage( int i, const HCL_Vector_d & x, const HCL_Vector_d & dy, HCL_Vector_d & dx )
virtual void PartialDerivInvAdjImage( int i, const HCL_Vector_d & x, const HCL_Vector_d & dx, HCL_Vector_d & dy )
virtual void PartialDerivInvImage( int i, const HCL_Vector_d & x, const HCL_Vector_d & dy, HCL_Vector_d & dx )
virtual HCL_BiLinearOp_d* SecondPartialDeriv1( int i, int j, const HCL_Vector_d & x )
virtual void SecondPartialDerivImage( int i, int j, const HCL_Vector_d & x, const HCL_Vector_d & dxj, const HCL_Vector_d & dxi, HCL_Vector_d & dy )
virtual void SecondPartialDerivPartialAdjImage( int i, int j, int flag, const HCL_Vector_d & x, const HCL_Vector_d & dxij, const HCL_Vector_d & dy, HCL_Vector_d & dxji )

Inherited from HCL_Op_d:

Public Methods

int CheckDeriv( const HCL_Vector_d &, const HCL_Vector_d &, ostream & str, int n=10, double hmin=0.1, double hmax=1.0 )
int CheckDerivAdj( const HCL_Vector_d &, const HCL_Vector_d &, ostream & str, int n=10, double hmin=0.1, double hmax=1.0 )
int CheckSecondDeriv( const HCL_Vector_d &, const HCL_Vector_d &, ostream & str, int n=10, double hmin=0.1, double hmax=1.0 )
int CheckSecondDerivAdj( const HCL_Vector_d &, const HCL_Vector_d &, ostream & str, int n=10, double hmin=0.1, double hmax=1.0 )
virtual HCL_LinearOp_d* Deriv( const HCL_Vector_d & x )
virtual void ImageAdd( const HCL_Vector_d & x, HCL_Vector_d & y, double a=1.0, double b=1.0 )
virtual void ImageAdd( const HCL_Vector_d & x, const HCL_Vector_d & z, HCL_Vector_d & y, double a=1.0, double b=1.0 )
virtual double MaxStep( const HCL_Vector_d & x, const HCL_Vector_d &dir)
virtual HCL_BiLinearOp_d* SecondDeriv( const HCL_Vector_d & x )

Protected Methods

virtual HCL_LinearOp_d* Deriv1( const HCL_Vector_d & x )
virtual void DerivAdjImage( const HCL_Vector_d & x, const HCL_Vector_d & dy, HCL_Vector_d & dx )
virtual void DerivImage( const HCL_Vector_d & x, const HCL_Vector_d & dx, HCL_Vector_d & dy )
virtual void DerivInvAdjImage( const HCL_Vector_d & x, const HCL_Vector_d & dx, HCL_Vector_d & dy )
virtual void DerivInvImage( const HCL_Vector_d & x, const HCL_Vector_d & dy, HCL_Vector_d & dx )
virtual HCL_BiLinearOp_d* SecondDeriv1( const HCL_Vector_d & x )
virtual void SecondDerivImage( const HCL_Vector_d & x, const HCL_Vector_d & dx1, const HCL_Vector_d & dx2, HCL_Vector_d & dy )
virtual void SecondDerivPartialAdjImage(const HCL_Vector_d & x, const HCL_Vector_d & dx1, const HCL_Vector_d & dy, HCL_Vector_d & dx2 )

Inherited from HCL_Base:

Public Methods

int Count()
void DecCount()
void IncCount()

Private Fields

int ReferenceCount

Documentation

stencil operator class. has no-arg image method
virtual int SetTime( int it )
SetTime sets the time level parameter, which is used in finite difference simulation

virtual HCL_VectorSpace_d& Domain()
Domain space access. Returns a reference to the HCL_VectorSpace_d which forms the domain of the operator.

virtual HCL_VectorSpace_d& Range()
Range space access. Returns a reference to the HCL_VectorSpace_d which forms the range of the operator.

virtual int CheckStability( const HCL_Vector_d & c )
CheckStability should check the appropriate stability condition for the given input vector, returning 1 if the condition is met (that is, if the integration can be done safely) and 0 if the condition fails. The input to this method is the PDE coefficient (that is, the first component of the input to the stencil operator).

virtual void InitializeControl( const HCL_Vector_d * c )
InitializeControl copies a pointer to the control variable. This control variable will be used (together with the internal StateVector to compute the action of the operator when the no-argument Image method is invoked.

virtual void InitializeControlPerturbation( const HCL_Vector_d * dc )
InitializeControlPerturbation copies a pointer to the control variable. This control perturbation will be used to compute the action of the derivative of the operator when PartialDerivImageAddControl is invoked.

virtual HCL_Vector_d& StateVector()
StateVector returns a reference to the internally-stored state vector; this is a vector in the second factor of the domain

virtual HCL_Vector_d& StatePerturbation()
StatePerturbation returns a reference to the internally-stored state perturbation du; this is a vector in the second factor of the domain

virtual void Image()
Image (with no arguments) computes the action of the operator on the vector (c,u) and overwrites u with the result. Here u is the internal state vector which can be referenced by the StateVector method, and c is the control variable which must be intialized using InitializeControl.

virtual void PartialDerivImageAddControl()
PartialDerivImageAddControl computes the image of the derivative, with respect to the control variable, acting on the control perturbation dc. The result is added to the internal variable du, which is accessed with StatePerturbation. The control perturbation must be initialized with InitializeControlPerturbation. The derivative is computed at the point (c,u), where c is the control, intialized with InitializeControl, and u is the internal state vector, accessed with StateVector.

virtual void PartialDerivImageState()
PartialDerivImageState computes the image of the derivative, with respect to the state variable, acting on the (internal) state perturbation du. The result overwrites the internal variable du, which is accessed with StatePerturbation. The derivative is computed at the point (c,u), where c is the control, intialized with InitializeControl, and u is the internal state vector, accessed with StateVector.

virtual void PartialDerivAdjImageAddControl( HCL_Vector_d & dc )
PartialDerivAdjImageAddControl computes the image of the adjoint of the partial derivative with respect to the control variable. The input pertubation is du, the internal perturbation to the state variable, and the output perturbation is the argument to the method, dc. The derivative is computed at the point (c,u), where c is the control, intialized with InitializeControl, and u is the internal state vector, accessed with StateVector.

virtual void PartialDerivAdjImageState()
PartialDerivAdjImageState computes the image of the adjoint of the partial derivative with respect to the state variable. The input pertubation is du, the internal perturbation to the state variable, and the output perturbation overwrites du. The derivative is computed at the point (c,u), where c is the control, intialized with InitializeControl, and u is the internal state vector, accessed with StateVector.

virtual void Image( const HCL_Vector_d & x, HCL_Vector_d & y )
Image computes the action of the operator on x, giving y

virtual HCL_EvaluateOp_d* Evaluate( const HCL_Vector_d & x )
Evaluate creates an evaluation object which knows how to compute the image and the derivative (as a linear operator with adjoint) at a point.

virtual void PartialDerivImage( int i, const HCL_Vector_d & x, const HCL_Vector_d & dx, HCL_Vector_d & dy )
PartialDerivImage computes the image of the derivative on dx, yielding dy

virtual void PartialInvImage()
PartialInvImage computes the image of the inverse, with respect to the second component, of the operator. The result overwrites the internal state variable, which is also the input. The value of the control variable must be set first with InitializeControl. This method need only be implemented in a derived class if the method is conservative and the adjoint is to be computed. (In this case, the more efficient adjoint computation can be used by setting the ConservativeFlag to 1 in fdtd_d.

virtual ostream& Write( ostream & str )
Debugging information


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de