Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

JacobiPoissonX Class Reference

Class to solve JacobiPoissonX's equation on a SAMR grid. More...

Inheritance diagram for JacobiPoissonX:

Inheritance graph
[legend]
Collaboration diagram for JacobiPoissonX:

Collaboration graph
[legend]
List of all members.

Public Methods

 JacobiPoissonX (const string &object_name, tbox_Pointer< SAMRAI::tbox_Database > database)
 Constructor. More...

int registerVariablesWithPlotter (tbox_Pointer< plot_CartesianVizamraiDataWriterX > viz_writer) const
 Tell a plotter which data to write for this class. More...

int jacobiIteration (const tbox_Pointer< SAMRAI::hier_PatchHierarchyX > hierarchy, double relax_coef=1)
 Smooth the solution using one Jacobi iteration. More...

int JacobiPoissonX::computeError (const tbox_Pointer< SAMRAI::hier_PatchHierarchyX > hierarchy, double *l2norm, double *linorm) const
 Compute the error of the current solution. More...

 JacobiPoissonX (const string &object_name, tbox_Pointer< SAMRAI::tbox_Database > database)
 Constructor. More...

int registerVariablesWithPlotter (tbox_Pointer< plot_CartesianVizamraiDataWriterX > viz_writer) const
 Tell a plotter which data to write for this class. More...

int jacobiIteration (const tbox_Pointer< SAMRAI::hier_PatchHierarchyX > hierarchy, double relax_coef=1)
 Smooth the solution using one Jacobi iteration. More...

int JacobiPoissonX::computeError (const tbox_Pointer< SAMRAI::hier_PatchHierarchyX > hierarchy, double *l2norm, double *linorm) const
 Compute the error of the current solution. More...

SAMRAI::mesh_StandardTagAndInitStrategyX virtuals
virtual void initializeLevelData (const tbox_Pointer< SAMRAI::hier_PatchHierarchyX > hierarchy, const int level_number, const double init_data_time, const bool can_be_refined, const bool initial_time, const tbox_Pointer< SAMRAI::hier_PatchLevelX > old_level=tbox_Pointer< SAMRAI::hier_PatchLevelX >((0)), const bool allocate_data=true)
 Allocate and initialize data for a new level in the patch hierarchy. More...

virtual void resetHierarchyConfiguration (const tbox_Pointer< SAMRAI::hier_PatchHierarchyX > hierarchy, const int coarsest_level, const int finest_level)
SAMRAI::plot_VizamraiDerivedDataStrategyX virtuals
void JacobiPoissonX::writeDerivedDataToStream (tbox_AbstractStream &stream, const hier_PatchX &patch, int patch_level_number, const hier_BoxX &region, const string &variable_name, int plot_type)
 Function to support writing vizamrai derived data. More...

SAMRAI::mesh_StandardTagAndInitStrategyX virtuals
virtual void initializeLevelData (const tbox_Pointer< SAMRAI::hier_PatchHierarchyX > hierarchy, const int level_number, const double init_data_time, const bool can_be_refined, const bool initial_time, const tbox_Pointer< SAMRAI::hier_PatchLevelX > old_level=tbox_Pointer< SAMRAI::hier_PatchLevelX >((0)), const bool allocate_data=true)
 Allocate and initialize data for a new level in the patch hierarchy. More...

virtual void resetHierarchyConfiguration (const tbox_Pointer< SAMRAI::hier_PatchHierarchyX > hierarchy, const int coarsest_level, const int finest_level)
SAMRAI::plot_VizamraiDerivedDataStrategyX virtuals
void JacobiPoissonX::writeDerivedDataToStream (tbox_AbstractStream &stream, const hier_PatchX &patch, int patch_level_number, const hier_BoxX &region, const string &variable_name, int plot_type)
 Function to support writing vizamrai derived data. More...


Private Attributes

Private state variables for solution.
SAMRAI::hier_VariableContext d_context_persistent
 Context for persistent data. More...

SAMRAI::hier_VariableContext d_context_scratch
 Context for scratch data. More...

SAMRAI::pdat_SideVariableX<
double > 
d_diffcoef
 Diffusion coefficient. More...

SAMRAI::pdat_CellVariableX<
double > 
d_scalar
 Scalar solution of Poisson's equation. More...

SAMRAI::pdat_CellVariableX<
double > 
d_source
 Source for Poisson's equation. More...

SAMRAI::pdat_CellVariableX<
double > 
d_exact
 Exact solution. More...

SAMRAI::pdat_CellVariableX<
double > 
d_weight
 Vector weights. More...

int d_scalar_persistent
 Saved variable-context index. More...

int d_scalar_scratch
 Saved variable-context index. More...

int d_diffcoef_persistent
 Saved variable-context index. More...

int d_source_persistent
 Saved variable-context index. More...

int d_weight_persistent
 Saved variable-context index. More...

int d_exact_persistent
 Saved variable-context index. More...

Private state variables for solution.
SAMRAI::pdat_SideVariableX<
double > 
d_diffcoef
 Diffusion coefficient. More...

SAMRAI::pdat_CellVariableX<
double > 
d_scalar
 Scalar solution of Poisson's equation. More...

SAMRAI::pdat_CellVariableX<
double > 
d_source
 Source for Poisson's equation. More...

SAMRAI::pdat_CellVariableX<
double > 
d_exact
 Exact solution. More...

SAMRAI::pdat_CellVariableX<
double > 
d_weight
 Vector weights. More...


Detailed Description

Class to solve JacobiPoissonX's equation on a SAMR grid.

This class demonstrates how use the FAC solver class to solve JacobiPoissonX's equation on a SAMR grid.

This class inherits and implements virtual functions from SAMRAI::mesh_StandardTagAndInitStrategyX to initialize data on the SAMR grid.

Definition at line 48 of file JacobiPoissonX.h.sed.


Constructor & Destructor Documentation

JacobiPoissonX::JacobiPoissonX const string &    object_name,
tbox_Pointer< SAMRAI::tbox_Database   database
 

Constructor.

Requirements:

  • the referenced objects
Actions:
  • Initialize the viz_writer to serve this object
Parameters:
object_name  Ojbect name
database  Input database

Definition at line 41 of file JacobiPoissonX.C.sed.

References d_context_persistent, d_context_scratch, d_diffcoef, d_diffcoef_persistent, d_exact, d_exact_persistent, d_scalar, d_scalar_persistent, d_scalar_scratch, d_source, d_source_persistent, d_weight, and d_weight_persistent.

JacobiPoissonX::JacobiPoissonX const string &    object_name,
tbox_Pointer< SAMRAI::tbox_Database   database
 

Constructor.

Requirements:

  • the referenced objects
Actions:
  • Initialize the viz_writer to serve this object
Parameters:
object_name  Ojbect name
database  Input database


Member Function Documentation

virtual void JacobiPoissonX::initializeLevelData const tbox_Pointer< SAMRAI::hier_PatchHierarchyX   hierarchy,
const int    level_number,
const double    init_data_time,
const bool    can_be_refined,
const bool    initial_time,
const tbox_Pointer< SAMRAI::hier_PatchLevelX   old_level = tbox_Pointer< SAMRAI::hier_PatchLevelX >((0)),
const bool    allocate_data = true
[virtual]
 

Allocate and initialize data for a new level in the patch hierarchy.

This is where you implement the code for initialize data on the grid. Nevermind when it is called or where in the program that happens. All the information you need to initialize the grid are in the arguments.

See also:
SAMRAI::mesh_StandardTagAndInitStrategyX::initializeLevelData()
Parameters:
hierarchy  Hierarchy to initialize
level_number  Level to initialize
initial_time  Whether level is being introduced for the first time
old_level  Level to copy data from
allocate_data  Whether data on new patch needs to be allocated

void JacobiPoissonX::initializeLevelData const tbox_Pointer< SAMRAI::hier_PatchHierarchyX   hierarchy,
const int    level_number,
const double    init_data_time,
const bool    can_be_refined,
const bool    initial_time,
const tbox_Pointer< SAMRAI::hier_PatchLevelX   old_level = tbox_Pointer< SAMRAI::hier_PatchLevelX >((0)),
const bool    allocate_data = true
[virtual]
 

Allocate and initialize data for a new level in the patch hierarchy.

This is where you implement the code for initialize data on the grid. Nevermind when it is called or where in the program that happens. All the information you need to initialize the grid are in the arguments.

See also:
SAMRAI::mesh_StandardTagAndInitStrategyX::initializeLevelData()
Parameters:
hierarchy  Hierarchy to initialize
level_number  Level to initialize
initial_time  Whether level is being introduced for the first time
old_level  Level to copy data from
allocate_data  Whether data on new patch needs to be allocated

Definition at line 112 of file JacobiPoissonX.C.sed.

References arrayData2ArrayAccess(), d_diffcoef_persistent, d_exact_persistent, d_scalar_persistent, d_source_persistent, d_weight_persistent, M_PI, printObjectX(), setArrayDataToConstant(), setArrayDataToScaled(), setArrayDataToSinusoidal(), and setVectorWeightsX().

int JacobiPoissonX::jacobiIteration const tbox_Pointer< SAMRAI::hier_PatchHierarchyX   hierarchy,
double    relax_coef = 1
 

Smooth the solution using one Jacobi iteration.

Parameters:
hierarchy  The hierarchy containing the grid.
relax_coef  The relaxation coefficient in the iteration.

int JacobiPoissonX::jacobiIteration const tbox_Pointer< SAMRAI::hier_PatchHierarchyX   hierarchy,
double    relax_coef = 1
 

Smooth the solution using one Jacobi iteration.

Parameters:
hierarchy  The hierarchy containing the grid.
relax_coef  The relaxation coefficient in the iteration.

Definition at line 237 of file JacobiPoissonX.C.sed.

References arrayData2ArrayAccess(), d_scalar_persistent, d_scalar_scratch, d_source_persistent, jacobiPoissonBoundary(), jacobiPoissonExactBC(), and jacobiPoissonSmooth().

Referenced by main().

int JacobiPoissonX::JacobiPoissonX::computeError const tbox_Pointer< SAMRAI::hier_PatchHierarchyX   hierarchy,
double *    l2norm,
double *    linorm
const
 

Compute the error of the current solution.

int JacobiPoissonX::JacobiPoissonX::computeError const tbox_Pointer< SAMRAI::hier_PatchHierarchyX   hierarchy,
double *    l2norm,
double *    linorm
const
 

Compute the error of the current solution.

Referenced by resetHierarchyConfiguration().

void JacobiPoissonX::JacobiPoissonX::writeDerivedDataToStream tbox_AbstractStream &    stream,
const hier_PatchX &    patch,
int    patch_level_number,
const hier_BoxX &    region,
const string &    variable_name,
int    plot_type
 

Function to support writing vizamrai derived data.

void JacobiPoissonX::JacobiPoissonX::writeDerivedDataToStream tbox_AbstractStream &    stream,
const hier_PatchX &    patch,
int    patch_level_number,
const hier_BoxX &    region,
const string &    variable_name,
int    plot_type
 

Function to support writing vizamrai derived data.

int JacobiPoissonX::registerVariablesWithPlotter tbox_Pointer< plot_CartesianVizamraiDataWriterX >    viz_writer const
 

Tell a plotter which data to write for this class.

Parameters:
viz_writer  Vizramrai writer

int JacobiPoissonX::registerVariablesWithPlotter tbox_Pointer< plot_CartesianVizamraiDataWriterX >    viz_writer const
 

Tell a plotter which data to write for this class.

Parameters:
viz_writer  Vizramrai writer

Definition at line 478 of file JacobiPoissonX.C.sed.

References d_exact_persistent, d_scalar_persistent, d_source_persistent, d_weight_persistent, and SAMRAI::plot_VizamraiDerivedDataStrategyX::plot_VizamraiDerivedDataStrategyX().

Referenced by main().

virtual void JacobiPoissonX::resetHierarchyConfiguration const tbox_Pointer< SAMRAI::hier_PatchHierarchyX   hierarchy,
const int    coarsest_level,
const int    finest_level
[inline, virtual]
 

Definition at line 103 of file JacobiPoissonX.h.sed.

References JacobiPoissonX::computeError().

virtual void JacobiPoissonX::resetHierarchyConfiguration const tbox_Pointer< SAMRAI::hier_PatchHierarchyX   hierarchy,
const int    coarsest_level,
const int    finest_level
[inline, virtual]
 

Definition at line 103 of file JacobiPoissonX.h.sed.

References d_context_persistent, d_context_scratch, and JacobiPoissonX::computeError().


Member Data Documentation

SAMRAI::hier_VariableContext JacobiPoissonX::d_context_persistent [private]
 

Context for persistent data.

Definition at line 171 of file JacobiPoissonX.h.sed.

Referenced by JacobiPoissonX(), and resetHierarchyConfiguration().

SAMRAI::hier_VariableContext JacobiPoissonX::d_context_scratch [private]
 

Context for scratch data.

Definition at line 176 of file JacobiPoissonX.h.sed.

Referenced by JacobiPoissonX(), and resetHierarchyConfiguration().

SAMRAI::pdat_SideVariableX<double> JacobiPoissonX::d_diffcoef [private]
 

Diffusion coefficient.

Definition at line 181 of file JacobiPoissonX.h.sed.

SAMRAI::pdat_SideVariableX<double> JacobiPoissonX::d_diffcoef [private]
 

Diffusion coefficient.

Definition at line 181 of file JacobiPoissonX.h.sed.

Referenced by JacobiPoissonX().

int JacobiPoissonX::d_diffcoef_persistent [private]
 

Saved variable-context index.

Because we refer to them often, variable-context indices are saved. They are initialized in the constructor and never change. Each index represents a variable-context pair in this class. Thus the indices are not independent state variables. If we had to set them, we need the associated variable and context (and the variable database which manages the mapping). See the SAMRAI::hier_VariableDatabaseX class for more into.

Definition at line 219 of file JacobiPoissonX.h.sed.

Referenced by initializeLevelData(), and JacobiPoissonX().

SAMRAI::pdat_CellVariableX<double> JacobiPoissonX::d_exact [private]
 

Exact solution.

Definition at line 196 of file JacobiPoissonX.h.sed.

SAMRAI::pdat_CellVariableX<double> JacobiPoissonX::d_exact [private]
 

Exact solution.

Definition at line 196 of file JacobiPoissonX.h.sed.

Referenced by JacobiPoissonX().

int JacobiPoissonX::d_exact_persistent [private]
 

Saved variable-context index.

Because we refer to them often, variable-context indices are saved. They are initialized in the constructor and never change. Each index represents a variable-context pair in this class. Thus the indices are not independent state variables. If we had to set them, we need the associated variable and context (and the variable database which manages the mapping). See the SAMRAI::hier_VariableDatabaseX class for more into.

Definition at line 219 of file JacobiPoissonX.h.sed.

Referenced by initializeLevelData(), JacobiPoissonX(), and registerVariablesWithPlotter().

SAMRAI::pdat_CellVariableX<double> JacobiPoissonX::d_scalar [private]
 

Scalar solution of Poisson's equation.

Definition at line 186 of file JacobiPoissonX.h.sed.

SAMRAI::pdat_CellVariableX<double> JacobiPoissonX::d_scalar [private]
 

Scalar solution of Poisson's equation.

Definition at line 186 of file JacobiPoissonX.h.sed.

Referenced by JacobiPoissonX().

int JacobiPoissonX::d_scalar_persistent [private]
 

Saved variable-context index.

Because we refer to them often, variable-context indices are saved. They are initialized in the constructor and never change. Each index represents a variable-context pair in this class. Thus the indices are not independent state variables. If we had to set them, we need the associated variable and context (and the variable database which manages the mapping). See the SAMRAI::hier_VariableDatabaseX class for more into.

Definition at line 219 of file JacobiPoissonX.h.sed.

Referenced by initializeLevelData(), jacobiIteration(), JacobiPoissonX(), and registerVariablesWithPlotter().

int JacobiPoissonX::d_scalar_scratch [private]
 

Saved variable-context index.

Because we refer to them often, variable-context indices are saved. They are initialized in the constructor and never change. Each index represents a variable-context pair in this class. Thus the indices are not independent state variables. If we had to set them, we need the associated variable and context (and the variable database which manages the mapping). See the SAMRAI::hier_VariableDatabaseX class for more into.

Definition at line 219 of file JacobiPoissonX.h.sed.

Referenced by jacobiIteration(), and JacobiPoissonX().

SAMRAI::pdat_CellVariableX<double> JacobiPoissonX::d_source [private]
 

Source for Poisson's equation.

Definition at line 191 of file JacobiPoissonX.h.sed.

SAMRAI::pdat_CellVariableX<double> JacobiPoissonX::d_source [private]
 

Source for Poisson's equation.

Definition at line 191 of file JacobiPoissonX.h.sed.

Referenced by JacobiPoissonX().

int JacobiPoissonX::d_source_persistent [private]
 

Saved variable-context index.

Because we refer to them often, variable-context indices are saved. They are initialized in the constructor and never change. Each index represents a variable-context pair in this class. Thus the indices are not independent state variables. If we had to set them, we need the associated variable and context (and the variable database which manages the mapping). See the SAMRAI::hier_VariableDatabaseX class for more into.

Definition at line 219 of file JacobiPoissonX.h.sed.

Referenced by initializeLevelData(), jacobiIteration(), JacobiPoissonX(), and registerVariablesWithPlotter().

SAMRAI::pdat_CellVariableX<double> JacobiPoissonX::d_weight [private]
 

Vector weights.

For cells not covered by a finer cell, the weight is the volume. For cells that are, the weight is zero. This is used in computing norms on the AMR grid.

Definition at line 205 of file JacobiPoissonX.h.sed.

SAMRAI::pdat_CellVariableX<double> JacobiPoissonX::d_weight [private]
 

Vector weights.

For cells not covered by a finer cell, the weight is the volume. For cells that are, the weight is zero. This is used in computing norms on the AMR grid.

Definition at line 205 of file JacobiPoissonX.h.sed.

Referenced by JacobiPoissonX().

int JacobiPoissonX::d_weight_persistent [private]
 

Saved variable-context index.

Because we refer to them often, variable-context indices are saved. They are initialized in the constructor and never change. Each index represents a variable-context pair in this class. Thus the indices are not independent state variables. If we had to set them, we need the associated variable and context (and the variable database which manages the mapping). See the SAMRAI::hier_VariableDatabaseX class for more into.

Definition at line 219 of file JacobiPoissonX.h.sed.

Referenced by initializeLevelData(), JacobiPoissonX(), and registerVariablesWithPlotter().


The documentation for this class was generated from the following files:
Generated on Wed Apr 17 12:51:47 2002 for samtut by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001