Inheritance diagram for JacobiPoissonX:
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 ®ion, 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 ®ion, 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... |
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.
Requirements:
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. |
|
Constructor.
Requirements:
|
|
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.
|
|
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.
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(). |
|
Smooth the solution using one Jacobi iteration.
|
|
Smooth the solution using one Jacobi 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(). |
|
Compute the error of the current solution.
|
|
Compute the error of the current solution.
Referenced by resetHierarchyConfiguration(). |
|
Function to support writing vizamrai derived data.
|
|
Function to support writing vizamrai derived data.
|
|
Tell a plotter which data to write for this class.
|
|
Tell a plotter which data to write for this class.
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(). |
|
Definition at line 103 of file JacobiPoissonX.h.sed. References JacobiPoissonX::computeError(). |
|
Definition at line 103 of file JacobiPoissonX.h.sed. References d_context_persistent, d_context_scratch, and JacobiPoissonX::computeError(). |
|
Context for persistent data.
Definition at line 171 of file JacobiPoissonX.h.sed. Referenced by JacobiPoissonX(), and resetHierarchyConfiguration(). |
|
Context for scratch data.
Definition at line 176 of file JacobiPoissonX.h.sed. Referenced by JacobiPoissonX(), and resetHierarchyConfiguration(). |
|
Diffusion coefficient.
Definition at line 181 of file JacobiPoissonX.h.sed. |
|
Diffusion coefficient.
Definition at line 181 of file JacobiPoissonX.h.sed. Referenced by JacobiPoissonX(). |
|
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(). |
|
Exact solution.
Definition at line 196 of file JacobiPoissonX.h.sed. |
|
Exact solution.
Definition at line 196 of file JacobiPoissonX.h.sed. Referenced by JacobiPoissonX(). |
|
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(). |
|
Scalar solution of Poisson's equation.
Definition at line 186 of file JacobiPoissonX.h.sed. |
|
Scalar solution of Poisson's equation.
Definition at line 186 of file JacobiPoissonX.h.sed. Referenced by JacobiPoissonX(). |
|
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(). |
|
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(). |
|
Source for Poisson's equation.
Definition at line 191 of file JacobiPoissonX.h.sed. |
|
Source for Poisson's equation.
Definition at line 191 of file JacobiPoissonX.h.sed. Referenced by JacobiPoissonX(). |
|
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(). |
|
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. |
|
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(). |
|
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(). |