#include <DiffusionFD.h>

Public Types | |
| typedef std::shared_ptr< AMP::Operator::Operator > | shared_ptr |
Static Public Member Functions | |
| static std::unique_ptr< AMP::Operator::Operator > | create (std::shared_ptr< AMP::Operator::OperatorParameters > params) |
Public Attributes | |
| std::shared_ptr< AMP::Database > | d_db |
| std::shared_ptr< AMP::Discretization::boxMeshDOFManager > | d_DOFMan |
Protected Member Functions | |
| void | getBackendFromInput (std::shared_ptr< AMP::Database > db) |
| virtual std::shared_ptr< OperatorParameters > | getJacobianParameters (std::shared_ptr< const AMP::LinearAlgebra::Vector >) |
| void | setMemoryAndBackendParameters (std::shared_ptr< AMP::Database > db) |
Protected Attributes | |
| AMP::Utilities::Backend | d_backend = AMP::Utilities::Backend::Serial |
| int | d_iDebugPrintInfoLevel = 0 |
| std::shared_ptr< AMP::LinearAlgebra::Variable > | d_inputVariable |
| int | d_iObject_id |
| std::shared_ptr< AMP::LinearAlgebra::Matrix > | d_matrix |
| AMP::Utilities::MemoryType | d_memory_location = AMP::Utilities::MemoryType::none |
| std::shared_ptr< AMP::Mesh::Mesh > | d_Mesh |
| std::shared_ptr< AMP::LinearAlgebra::Variable > | d_outputVariable |
Static Protected Attributes | |
| static int | d_iInstance_id |
Private Member Functions | |
| std::shared_ptr< AMP::LinearAlgebra::Matrix > | createDiscretizationMatrix () |
| std::vector< double > | createStencil () const |
| std::array< int, 3 > | DOFToGridInds (size_t dof) const |
| Get grid indices corresponding to the DOF. | |
| void | fillMatrixWithCSRData (std::shared_ptr< AMP::LinearAlgebra::Matrix > matrix) |
| void | getCSRData (size_t row, std::vector< size_t > &cols, std::vector< double > &data) |
| Pack cols+data vectors in given row. | |
| void | getCSRDataBoundary (size_t row, std::vector< size_t > &cols, std::vector< double > &data) const |
| void | getCSRDataInterior (std::array< size_t, 5 > &ijkLocal, size_t rowLocal, std::vector< size_t > &cols, std::vector< double > &data) const |
| AMP::Mesh::BoxMesh::Box | getGlobalNodeBox () const |
| AMP::Mesh::BoxMesh::Box | getLocalNodeBox () const |
| Convert a local element box to a local node box. | |
| size_t | gridIndsToDOF (std::array< int, 3 > ijk) const |
| Map from grid index ijk to the corresponding DOF. | |
| void | setDOFManager () |
Private Attributes | |
| std::shared_ptr< AMP::Mesh::BoxMesh > | d_BoxMesh = nullptr |
| Mesh. | |
| size_t | d_dim = static_cast<size_t>( -1 ) |
| Problem dimension. | |
| std::shared_ptr< AMP::Mesh::BoxMesh::Box > | d_globalBox = nullptr |
| Global grid index box w/ zero ghosts. | |
| std::vector< double > | d_h |
| Mesh sizes, hx, hy, hz. We compute these based on the incoming mesh. | |
| std::array< size_t, 5 > | d_ijk |
| Placeholder array of grid indices. | |
| std::shared_ptr< AMP::ArraySize > | d_localArraySize = nullptr |
| ArraySize of the local box. | |
| std::shared_ptr< AMP::Mesh::BoxMesh::Box > | d_localBox = nullptr |
| Local grid index box w/ zero ghosts. | |
| std::shared_ptr< std::vector< double > > | d_stencil = nullptr |
| FD coefficients. | |
Static Private Attributes | |
| static constexpr auto | VertexGeom = AMP::Mesh::GeomType::Vertex |
| Convenience member. | |
Definition at line 49 of file DiffusionFD.h.
|
inherited |
Definition at line 29 of file Operator.h.
| AMP::Operator::DiffusionFDOperator::DiffusionFDOperator | ( | std::shared_ptr< const AMP::Operator::OperatorParameters > | params_ | ) |
|
inlinevirtual |
Definition at line 75 of file DiffusionFD.h.
|
overridevirtualinherited |
The apply function for this operator, A, performs the following operation: f = A(u) Here, A(u) is simply a Matrix-Vector multiplication.
| [in] | u | input vector. |
| [out] | f | residual/output vector. |
Reimplemented in AMP::Operator::IdentityOperator, AMP::Operator::PetscMatrixShellOperator, AMP::Operator::TrilinosMatrixShellOperator, and AMP::Operator::BDFRadDifOpPJac.
|
pure virtualinherited |
This base class can not give a meaningful definition of apply. See the derived classes for how they define apply. Each operator is free to define apply in a way that is appropriate for that operator.
| u | shared pointer to const input vector u |
| f | shared pointer to output vector storing result of applying this operator |
Implemented in AMP::Operator::RadDifOp, AMP::Operator::RadDifOpPJac, AMP::Operator::FunctionOperator, AMP::Operator::MemorySpaceMigrationLinearOperator, and AMP::Operator::MemorySpaceMigrationOperator.
|
inlinestatic |
Definition at line 79 of file DiffusionFD.h.
|
private |
|
overridevirtualinherited |
Get a input vector ( For \(\mathbf{A(x)}\), \(\mathbf{x}\) is a input vector )
Reimplemented from AMP::Operator::Operator.
Reimplemented in AMP::Operator::MemorySpaceMigrationLinearOperator, and AMP::Operator::RadDifOpPJac.
|
overridevirtualinherited |
Get an output vector ( For \(\mathbf{y=A(x)}\), \(\mathbf{y}\) is an output vector )
Reimplemented from AMP::Operator::Operator.
Reimplemented in AMP::Operator::MemorySpaceMigrationLinearOperator.
| std::shared_ptr< AMP::LinearAlgebra::Vector > AMP::Operator::DiffusionFDOperator::createRHSVector | ( | std::function< double(const AMP::Mesh::Point &)> | PDESourceFun, |
| std::function< double(const AMP::Mesh::Point &, int boundary_id)> | boundaryFun | ||
| ) |
|
private |
Get grid indices corresponding to the DOF.
|
private |
| void AMP::Operator::DiffusionFDOperator::fillVectorWithFunction | ( | std::shared_ptr< AMP::LinearAlgebra::Vector > | u, |
| std::function< double(const AMP::Mesh::Point &)> | fun | ||
| ) | const |
|
protectedinherited |
|
private |
Pack cols+data vectors in given row.
|
private |
Pack cols+data vectors in given row. Note that, despite the name, this function works for any global row, not just those on the a (physical or processor) boundary, but for a DOF on the interior of a process it's less efficient than "getCSRDataInterior"
|
private |
Pack cols+data for the given row, which is a local row index, corresponding to a local DOF that's on the interior of the current process. The corresponding local ijk mesh indices are in ijkLocal
|
private |
Convert a global element box to a global node box. Modified from src/mesh/test/test_BoxMeshIndex.cpp by removing the possibility of any of the grid dimensions being periodic.
|
inlineoverridevirtualinherited |
Return the input variable.
Reimplemented from AMP::Operator::Operator.
Reimplemented in AMP::Operator::MassLinearFEOperator, AMP::Operator::MemorySpaceMigrationLinearOperator, AMP::Operator::PetscMatrixShellOperator, AMP::Operator::TrilinosMatrixShellOperator, and AMP::TimeIntegrator::LinearTimeOperator.
Definition at line 63 of file LinearOperator.h.
References AMP::Operator::LinearOperator::d_inputVariable.
|
inlineprotectedvirtualinherited |
This function returns a OperatorParameters object constructed by the operator which contains parameters from which new Jacobian operators can be created. Returning a parameter object instead of an Operator itself is meant to give users more flexibility.
Definition at line 180 of file Operator.h.
|
private |
Convert a local element box to a local node box.
|
virtualinherited |
Reimplemented in AMP::Operator::MemorySpaceMigrationLinearOperator.
|
inlineinherited |
Definition at line 89 of file Operator.h.
References AMP::Operator::Operator::d_memory_location.
|
inlineinherited |
Return the mesh.
Definition at line 149 of file Operator.h.
References AMP::Operator::Operator::d_Mesh.
|
inlineinherited |
Return the mesh.
Definition at line 152 of file Operator.h.
References AMP::Operator::Operator::d_Mesh.
|
inlineoverridevirtualinherited |
Return the output variable.
Reimplemented from AMP::Operator::Operator.
Reimplemented in AMP::Operator::MassLinearFEOperator, AMP::Operator::MemorySpaceMigrationLinearOperator, AMP::Operator::PetscMatrixShellOperator, AMP::Operator::TrilinosMatrixShellOperator, and AMP::TimeIntegrator::LinearTimeOperator.
Definition at line 67 of file LinearOperator.h.
References AMP::Operator::LinearOperator::d_outputVariable.
|
virtualinherited |
This function returns a OperatorParameters object constructed by the operator which contains parameters from which new operators can be created. Returning a parameter object instead of an Operator itself is meant to give users more flexibility. Examples of how this functionality might be used would be the construction of Jacobian, frozen Jacobian, preconditioner approximations to the Jacobian, adjoint operators etc
| type | std:string specifying type of return operator parameters being requested. Currently the valid option is Jacobian |
| u | const pointer to current solution vector |
| params | pointer to additional parameters that might be required to construct the return parameters |
Reimplemented in AMP::Operator::IdentityOperator, AMP::Operator::MemorySpaceMigrationLinearOperator, and AMP::Operator::MemorySpaceMigrationOperator.
Map from grid index ijk to the corresponding DOF.
|
inlinevirtualinherited |
given a vector return whether it is valid or not
Reimplemented in AMP::Operator::BDFRadDifOp, AMP::Operator::RadDifOp, AMP::Operator::ColumnOperator, AMP::Operator::CoupledOperator, AMP::TimeIntegrator::TimeOperator, AMP::Operator::MemorySpaceMigrationLinearOperator, and AMP::Operator::MemorySpaceMigrationOperator.
Definition at line 146 of file Operator.h.
|
virtualinherited |
virtual interface used to make a vector consistent in an operator defined way. An example of where an operator is required to make a vector consistent is in the context of AMR where ghost values on coarse-fine interfaces are filled in an operator dependent way. The default implementation is to simply call the vector makeConsistent(SET)
Reimplemented in AMP::Operator::MemorySpaceMigrationLinearOperator, AMP::Operator::MemorySpaceMigrationOperator, and AMP::TimeIntegrator::TimeOperator.
|
inlinevirtualinherited |
re-initialize a vector, e.g. after a regrid operation has happened. This is useful for example when numerical overshoots or undershoots have happened due to interpolation for example The default is a null op
Reimplemented in AMP::TimeIntegrator::TimeOperator, AMP::Operator::MemorySpaceMigrationLinearOperator, and AMP::Operator::MemorySpaceMigrationOperator.
Definition at line 167 of file Operator.h.
|
virtualinherited |
This function is useful for re-initializing/updating an operator
| params | parameter object containing parameters to change |
Reimplemented in AMP::TimeIntegrator::ColumnTimeOperator, AMP::TimeIntegrator::LinearTimeOperator, AMP::TimeIntegrator::TimeOperator, AMP::Operator::PowerShape, AMP::Operator::NeutronicsRhs, AMP::Operator::WeldOperator, AMP::Operator::ColumnBoundaryOperator, AMP::Operator::DirichletVectorCorrection, AMP::Operator::NeumannVectorCorrection, AMP::Operator::RobinMatrixCorrection, AMP::Operator::RobinVectorCorrection, AMP::Operator::ColumnOperator, AMP::Operator::FickSoretNonlinearFEOperator, AMP::Operator::IdentityOperator, AMP::Operator::GradientOperator, AMP::Operator::PelletStackOperator, AMP::Operator::MapOperator, AMP::Operator::MemorySpaceMigrationLinearOperator, AMP::Operator::MemorySpaceMigrationOperator, AMP::Operator::MoveMeshOperator, AMP::Operator::NonlinearBVPOperator, AMP::Operator::PetscMatrixShellOperator, AMP::Operator::CoupledFlowFrapconOperator, AMP::Operator::FlowFrapconJacobian, AMP::Operator::FlowFrapconOperator, AMP::Operator::SubchannelFourEqLinearOperator, AMP::Operator::SubchannelFourEqNonlinearOperator, AMP::Operator::SubchannelTwoEqLinearOperator, AMP::Operator::SubchannelTwoEqNonlinearOperator, AMP::Operator::TrilinosMatrixShellOperator, AMP::Operator::DirichletMatrixCorrection, AMP::Operator::MassMatrixCorrection, AMP::Operator::DiffusionNonlinearFEOperator, AMP::Operator::LinearFEOperator, AMP::Operator::VolumeIntegralOperator, AMP::Operator::LinearBVPOperator, AMP::Operator::Map1Dto3D, AMP::Operator::Map3Dto1D, and AMP::Operator::MechanicsNonlinearFEOperator.
Referenced by AMP::Operator::FirstOperator::FirstOperator(), and AMP::Operator::SecondOperator::SecondOperator().
|
virtualinherited |
Default base class implementation of the residual: f-L(u)
| f | shared pointer to const vector rhs |
| u | shared pointer to const vector u |
| r | shared pointer to vector residual |
Reimplemented in AMP::Solver::AMG::HasDeferConsistency< AMP::Operator::LinearOperator >, AMP::Operator::MemorySpaceMigrationLinearOperator, AMP::Operator::MemorySpaceMigrationOperator, AMP::TimeIntegrator::IDATimeOperator, and AMP::TimeIntegrator::TimeOperator.
|
virtualinherited |
Return the selector for input vectors.
Reimplemented in AMP::Operator::MemorySpaceMigrationLinearOperator, AMP::Operator::MemorySpaceMigrationOperator, AMP::Operator::FlowFrapconJacobian, AMP::Operator::FlowFrapconOperator, AMP::Operator::SubchannelFourEqLinearOperator, and AMP::Operator::SubchannelFourEqNonlinearOperator.
|
virtualinherited |
Return the selector for output vectors.
Reimplemented in AMP::Operator::MemorySpaceMigrationLinearOperator, AMP::Operator::MemorySpaceMigrationOperator, AMP::Operator::FlowFrapconJacobian, AMP::Operator::FlowFrapconOperator, AMP::Operator::SubchannelFourEqLinearOperator, and AMP::Operator::SubchannelFourEqNonlinearOperator.
Specify level of diagnostic information printed during iterations.
| level | zero prints none or minimal information, higher numbers provide increasingly verbose debugging information. |
Reimplemented in AMP::Operator::MemorySpaceMigrationLinearOperator, and AMP::Operator::MemorySpaceMigrationOperator.
Definition at line 97 of file Operator.h.
References AMP::Operator::Operator::d_iDebugPrintInfoLevel.
|
private |
|
virtualinherited |
Copies the shared pointer for the matrix representation of this linear operator.
| [in] | in_mat | The matrix representation of this linear operator. |
Reimplemented in AMP::Operator::IdentityOperator.
Referenced by AMP::Solver::AMG::coarse_operator< Config >::coarse_operator(), and AMP::Operator::EpetraMatrixOperator::EpetraMatrixOperator().
|
protectedinherited |
|
inlinevirtualinherited |
Definition at line 56 of file LinearOperator.h.
References AMP::Operator::LinearOperator::d_inputVariable, and AMP::Operator::LinearOperator::d_outputVariable.
Referenced by AMP::Solver::AMG::coarse_operator< Config >::coarse_operator().
|
inherited |
Subset input vector.
|
inherited |
Subset input vector.
|
inherited |
Subset output vector.
|
inherited |
Subset output vector.
|
inlineoverridevirtual |
Return the name of the operator.
Implements AMP::Operator::Operator.
Definition at line 85 of file DiffusionFD.h.
|
protectedinherited |
Definition at line 197 of file Operator.h.
|
private |
Mesh.
Definition at line 58 of file DiffusionFD.h.
| std::shared_ptr<AMP::Database> AMP::Operator::DiffusionFDOperator::d_db |
Definition at line 68 of file DiffusionFD.h.
|
private |
Problem dimension.
Definition at line 55 of file DiffusionFD.h.
| std::shared_ptr<AMP::Discretization::boxMeshDOFManager> AMP::Operator::DiffusionFDOperator::d_DOFMan |
Definition at line 69 of file DiffusionFD.h.
|
private |
Global grid index box w/ zero ghosts.
Definition at line 112 of file DiffusionFD.h.
|
private |
Mesh sizes, hx, hy, hz. We compute these based on the incoming mesh.
Definition at line 64 of file DiffusionFD.h.
|
protectedinherited |
Definition at line 187 of file Operator.h.
Referenced by AMP::Operator::Operator::setDebugPrintInfoLevel().
|
staticprotectedinherited |
Definition at line 191 of file Operator.h.
|
private |
Placeholder array of grid indices.
Definition at line 118 of file DiffusionFD.h.
|
protectedinherited |
Definition at line 88 of file LinearOperator.h.
Referenced by AMP::Operator::LinearOperator::getInputVariable(), AMP::Operator::IdentityOperator::setInputVariable(), and AMP::Operator::LinearOperator::setVariables().
|
protectedinherited |
Definition at line 189 of file Operator.h.
|
private |
ArraySize of the local box.
Definition at line 115 of file DiffusionFD.h.
|
private |
Local grid index box w/ zero ghosts.
Definition at line 109 of file DiffusionFD.h.
|
protectedinherited |
Definition at line 92 of file LinearOperator.h.
|
protectedinherited |
Definition at line 195 of file Operator.h.
Referenced by AMP::Operator::Operator::getMemoryLocation().
|
protectedinherited |
Definition at line 193 of file Operator.h.
Referenced by AMP::Operator::Operator::getMesh(), AMP::Operator::Operator::getMesh(), and AMP::Operator::ContactResidualCorrection::setMasterMesh().
|
protectedinherited |
Definition at line 90 of file LinearOperator.h.
Referenced by AMP::Operator::LinearOperator::getOutputVariable(), AMP::Operator::IdentityOperator::setOutputVariable(), and AMP::Operator::LinearOperator::setVariables().
|
private |
FD coefficients.
Definition at line 106 of file DiffusionFD.h.
|
staticconstexprprivate |
Convenience member.
Definition at line 61 of file DiffusionFD.h.
|
Advanced Multi-Physics (AMP) Oak Ridge National Laboratory Idaho National Laboratory Los Alamos National Laboratory |
This page automatically produced from the source code by Last updated: Tue Mar 10 2026 13:06:44. Comments on this page |