The Kokkos base system class. More...
#include <KokkosSystem.h>
Classes | |
| struct | Sparsity |
| CSR format sparsity data. More... | |
Public Member Functions | |
| System (SystemBase &system) | |
| Constructor. More... | |
| System (const System &src)=default | |
| Defaulted copy constructor Used by FESystem in mixed FE+FV simulations. More... | |
| void | sync (const MemcpyType dir) |
| Synchronize the active tagged vectors and matrices between host and device. More... | |
| void | setActiveVariables (const std::set< MooseVariableFieldBase *> &vars) |
| Set the active variables. More... | |
| void | setActiveSolutionTags (const std::set< TagID > &tags) |
| Set the active solution tags. More... | |
| void | setActiveResidualTags (const std::set< TagID > &tags) |
| Set the active residual tags. More... | |
| void | setActiveMatrixTags (const std::set< TagID > &tags) |
| Set the active matrix tags. More... | |
| void | clearActiveVariables () |
| Clear the cached active variables. More... | |
| void | clearActiveSolutionTags () |
| Clear the cached active solution tags. More... | |
| void | clearActiveResidualTags () |
| Clear the cached active residual tags. More... | |
| void | clearActiveMatrixTags () |
| Clear the cached active matrix tags. More... | |
| const libMesh::DofMap & | getDofMap () const |
| Get the libMesh DOF map. More... | |
| const Parallel::Communicator & | getComm () const |
| Get the libMesh communicator. More... | |
| const Array< Array< dof_id_type > > & | getLocalCommList () const |
| Get the list of local DOF indices to communicate. More... | |
| const Array< Array< dof_id_type > > & | getGhostCommList () const |
| Get the list of ghost DOF indices to communicate. More... | |
| const Sparsity & | getSparsity () const |
| Get the sparisty pattern data. More... | |
| KOKKOS_FUNCTION bool | isVariableActive (unsigned int var, ContiguousSubdomainID subdomain) const |
| Check whether a variable is active on a subdomain. More... | |
| KOKKOS_FUNCTION bool | isResidualTagActive (TagID tag) const |
| Check whether a residual tag is active. More... | |
| KOKKOS_FUNCTION bool | isMatrixTagActive (TagID tag) const |
| Check whether a matrix tag is active. More... | |
| KOKKOS_FUNCTION dof_id_type | getNumLocalDofs () const |
| Get the number of local DOFs. More... | |
| KOKKOS_FUNCTION dof_id_type | getNumGhostDofs () const |
| Get the number of ghost DOFs. More... | |
| KOKKOS_FUNCTION dof_id_type | getElemLocalDofIndex (ContiguousElementID elem, unsigned int i, unsigned int var) const |
| Get the local DOF index of a variable for an element. More... | |
| KOKKOS_FUNCTION dof_id_type | getElemGlobalDofIndex (ContiguousElementID elem, unsigned int i, unsigned int var) const |
| Get the global DOF index of a variable for an element. More... | |
| KOKKOS_FUNCTION dof_id_type | localToGlobalDofIndex (dof_id_type dof) const |
| Get the global DOF index of a local DOF index. More... | |
| KOKKOS_FUNCTION Vector & | getVector (TagID tag) const |
| Get a tagged Kokkos vector. More... | |
| KOKKOS_FUNCTION Matrix & | getMatrix (TagID tag) const |
| Get a tagged Kokkos matrix. More... | |
| KOKKOS_FUNCTION Real & | getVectorDofValue (const dof_id_type dof, const TagID tag) const |
| Get the DOF value of a tagged vector. More... | |
| KOKKOS_FUNCTION Real & | getMatrixValue (dof_id_type row, dof_id_type col, TagID tag) const |
| Get an entry from a tagged matrix. More... | |
| PerfGraph & | perfGraph () |
| Get the PerfGraph. More... | |
| KOKKOS_FUNCTION const Mesh & | kokkosMesh () const |
| Get the const reference of the Kokkos mesh. More... | |
| void | sync (const std::set< TagID > &tags, const MemcpyType dir) |
| Synchronize the specified tagged vectors between host and device. More... | |
| void | sync (const std::vector< TagID > &tags, const MemcpyType dir) |
| void | sync (const TagID tag, const MemcpyType dir) |
| SystemBase & | getSystem () |
| Get the MOOSE system. More... | |
| const SystemBase & | getSystem () const |
Static Public Member Functions | |
| static InputParameters | validParams () |
Protected Member Functions | |
| PerfID | registerTimedSection (const std::string §ion_name, const unsigned int level) const |
| Call to register a named section for timing. More... | |
| PerfID | registerTimedSection (const std::string §ion_name, const unsigned int level, const std::string &live_message, const bool print_dots=true) const |
| Call to register a named section for timing. More... | |
| std::string | timedSectionName (const std::string §ion_name) const |
Protected Attributes | |
| SystemBase & | _system |
| Reference of the MOOSE system. More... | |
| const MooseMesh & | _mesh |
| Reference of the MOOSE mesh. More... | |
| const libMesh::DofMap & | _dof_map |
| Reference of the libMesh DOF map. More... | |
| const Parallel::Communicator & | _comm |
| Reference of the libMesh communicator. More... | |
| const unsigned int | _num_vars |
| Number of variables. More... | |
| const dof_id_type | _num_local_dofs |
| Number of local DOFs. More... | |
| const dof_id_type | _num_ghost_dofs |
| Number of ghost DOFs. More... | |
| Array< Array2D< dof_id_type > > | _local_elem_dof_index |
| Local element DOF indices of each variable. More... | |
| Array< dof_id_type > | _local_to_global_dof_index |
| Map from local DOF index to global DOF index. More... | |
| Array< unsigned int > | _max_dofs_per_elem |
| Maximum number of DOFs per element for each variable. More... | |
| Array2D< bool > | _var_subdomain_active |
| Whether each variable is active on subdomains. More... | |
| Array< unsigned int > | _active_variables |
| List of active variable numbers. More... | |
| MooseApp & | _pg_moose_app |
| The MooseApp that owns the PerfGraph. More... | |
| const std::string | _prefix |
| A prefix to use for all sections. More... | |
| Array< Vector > | _vectors |
| Kokkos vectors and matrices on device. More... | |
| Array< Matrix > | _matrices |
| Array< TagID > | _active_solution_tags |
| List of active tags. More... | |
| Array< TagID > | _active_residual_tags |
| Array< TagID > | _active_matrix_tags |
| Array< bool > | _residual_tag_active |
| Flag whether each tag is active. More... | |
| Array< bool > | _matrix_tag_active |
| Array< Array< dof_id_type > > | _local_comm_list |
| List of DOFs to send and receive. More... | |
| Array< Array< dof_id_type > > | _ghost_comm_list |
Private Member Functions | |
| void | setupVariables () |
| Setup variable data. More... | |
| void | setupDofs () |
| Setup DOF data. More... | |
| void | setupSparsity () |
| Setup sparsity data. More... | |
Private Attributes | |
| Sparsity | _sparsity |
| Matrix sparsity pattern data. More... | |
The Kokkos base system class.
Each system in MOOSE has a corresponding Kokkos base system.
Definition at line 30 of file KokkosSystem.h.
| Moose::Kokkos::System::System | ( | SystemBase & | system | ) |
Constructor.
| system | The associated MOOSE system |
|
default |
Defaulted copy constructor Used by FESystem in mixed FE+FV simulations.
|
inline |
Clear the cached active matrix tags.
Definition at line 118 of file KokkosSystem.h.
|
inline |
Clear the cached active residual tags.
Definition at line 109 of file KokkosSystem.h.
|
inline |
Clear the cached active solution tags.
Definition at line 104 of file KokkosSystem.h.
|
inline |
Clear the cached active variables.
Definition at line 99 of file KokkosSystem.h.
|
inline |
Get the libMesh communicator.
Definition at line 143 of file KokkosSystem.h.
|
inline |
Get the libMesh DOF map.
Definition at line 137 of file KokkosSystem.h.
|
inline |
Get the global DOF index of a variable for an element.
| elem | The contiguous element ID |
| i | The element-local DOF index |
| var | The variable number |
Definition at line 221 of file KokkosSystem.h.
|
inline |
Get the local DOF index of a variable for an element.
| elem | The contiguous element ID |
| i | The element-local DOF index |
| var | The variable number |
Definition at line 207 of file KokkosSystem.h.
Referenced by Moose::Kokkos::FESystem::getVectorQpADGrad(), Moose::Kokkos::FESystem::getVectorQpADGradFace(), Moose::Kokkos::FESystem::getVectorQpADValue(), Moose::Kokkos::FESystem::getVectorQpADValueFace(), Moose::Kokkos::FESystem::getVectorQpGradFace(), Moose::Kokkos::FESystem::getVectorQpValueFace(), Moose::Kokkos::FESystem::getVectorQpVectorGradFace(), and Moose::Kokkos::FESystem::getVectorQpVectorValueFace().
|
inline |
Get the list of ghost DOF indices to communicate.
Definition at line 155 of file KokkosSystem.h.
|
inline |
Get the list of local DOF indices to communicate.
Definition at line 149 of file KokkosSystem.h.
Get a tagged Kokkos matrix.
| tag | The matrix tag |
Definition at line 250 of file KokkosSystem.h.
|
inline |
Get an entry from a tagged matrix.
| row | The local row index |
| col | The global column index |
| tag | The matrix tag |
Definition at line 270 of file KokkosSystem.h.
|
inline |
Get the number of ghost DOFs.
Definition at line 198 of file KokkosSystem.h.
|
inline |
Get the number of local DOFs.
Definition at line 192 of file KokkosSystem.h.
|
inline |
Get the sparisty pattern data.
Definition at line 161 of file KokkosSystem.h.
|
inline |
Get the MOOSE system.
Definition at line 129 of file KokkosSystem.h.
|
inline |
Definition at line 130 of file KokkosSystem.h.
Get a tagged Kokkos vector.
| tag | The vector tag |
Definition at line 243 of file KokkosSystem.h.
|
inline |
Get the DOF value of a tagged vector.
| dof | The local DOF index |
| tag | The vector tag |
Definition at line 258 of file KokkosSystem.h.
Referenced by Moose::Kokkos::FESystem::getVectorQpGradFace(), Moose::Kokkos::FESystem::getVectorQpValueFace(), Moose::Kokkos::FESystem::getVectorQpVectorGradFace(), and Moose::Kokkos::FESystem::getVectorQpVectorValueFace().
|
inline |
Check whether a matrix tag is active.
| tag | The matrix tag |
Definition at line 186 of file KokkosSystem.h.
|
inline |
Check whether a residual tag is active.
| tag | The residual tag |
Definition at line 179 of file KokkosSystem.h.
|
inline |
Check whether a variable is active on a subdomain.
| var | The variable number |
| subdomain | The contiguous subdomain ID |
Definition at line 169 of file KokkosSystem.h.
|
inlineinherited |
Get the const reference of the Kokkos mesh.
Definition at line 651 of file KokkosMesh.h.
Referenced by Moose::Kokkos::Assembly::computePhysicalMap(), Moose::Kokkos::LinearFVElementalKernel::operator()(), Moose::Kokkos::LinearFVFluxKernel::operator()(), Moose::Kokkos::VectorIntegratedBC::operator()(), Moose::Kokkos::VectorKernel::operator()(), Moose::Kokkos::IntegratedBC::operator()(), Moose::Kokkos::Kernel::operator()(), Moose::Kokkos::LinearFVBoundaryCondition::operator()(), Moose::Kokkos::Datum::q_point(), and KokkosBoundNodalKernel::skipOnBoundary().
|
inline |
Get the global DOF index of a local DOF index.
| dof | The local DOF index |
Definition at line 233 of file KokkosSystem.h.
|
inherited |
Get the PerfGraph.
Definition at line 86 of file PerfGraphInterface.C.
Referenced by CommonOutputAction::act(), PerfGraphData::finalize(), PerfGraphReporter::finalize(), and PerfGraphOutput::output().
|
protectedinherited |
Call to register a named section for timing.
| section_name | The name of the code section to be timed |
| level | The importance of the timer - lower is more important (0 will always come out) |
Definition at line 61 of file PerfGraphInterface.C.
|
protectedinherited |
Call to register a named section for timing.
| section_name | The name of the code section to be timed |
| level | The importance of the timer - lower is more important (0 will always come out) |
| live_message | The message to be printed to the screen during execution |
| print_dots | Whether or not progress dots should be printed for this section |
Definition at line 72 of file PerfGraphInterface.C.
Set the active matrix tags.
| vars | The active matrix tags |
Set the active residual tags.
| tags | The active residual tags |
Set the active solution tags.
| tags | The active solution tags |
| void Moose::Kokkos::System::setActiveVariables | ( | const std::set< MooseVariableFieldBase *> & | vars | ) |
Set the active variables.
| vars | The active MOOSE variables |
|
private |
Setup DOF data.
|
private |
Setup sparsity data.
|
private |
Setup variable data.
| void Moose::Kokkos::System::sync | ( | const MemcpyType | dir | ) |
Synchronize the active tagged vectors and matrices between host and device.
| dir | Copy direction |
| void Moose::Kokkos::System::sync | ( | const std::set< TagID > & | tags, |
| const MemcpyType | dir | ||
| ) |
Synchronize the specified tagged vectors between host and device.
| tags | The vector tags |
| dir | Copy direction |
| void Moose::Kokkos::System::sync | ( | const std::vector< TagID > & | tags, |
| const MemcpyType | dir | ||
| ) |
| void Moose::Kokkos::System::sync | ( | const TagID | tag, |
| const MemcpyType | dir | ||
| ) |
|
protectedinherited |
section_name.Optionally adds a prefix if one is defined.
Definition at line 55 of file PerfGraphInterface.C.
Referenced by PerfGraphInterface::registerTimedSection().
|
staticinherited |
Definition at line 16 of file PerfGraphInterface.C.
Referenced by Convergence::validParams().
Definition at line 352 of file KokkosSystem.h.
Referenced by clearActiveMatrixTags().
Definition at line 351 of file KokkosSystem.h.
Referenced by clearActiveResidualTags().
List of active tags.
Definition at line 350 of file KokkosSystem.h.
Referenced by clearActiveSolutionTags().
List of active variable numbers.
Definition at line 344 of file KokkosSystem.h.
Referenced by clearActiveVariables().
|
protected |
Reference of the libMesh communicator.
Definition at line 296 of file KokkosSystem.h.
Referenced by getComm().
|
protected |
Reference of the libMesh DOF map.
Definition at line 291 of file KokkosSystem.h.
Referenced by getDofMap().
|
protected |
Definition at line 368 of file KokkosSystem.h.
Referenced by getGhostCommList().
|
protected |
List of DOFs to send and receive.
Definition at line 367 of file KokkosSystem.h.
Referenced by getLocalCommList().
|
protected |
Local element DOF indices of each variable.
Definition at line 324 of file KokkosSystem.h.
Referenced by getElemGlobalDofIndex(), and getElemLocalDofIndex().
|
protected |
Map from local DOF index to global DOF index.
Definition at line 329 of file KokkosSystem.h.
Referenced by getElemGlobalDofIndex(), Moose::Kokkos::FESystem::getNodeGlobalDofIndex(), Moose::Kokkos::FESystem::getVectorDofADValue(), and localToGlobalDofIndex().
Definition at line 318 of file KokkosSystem.h.
Referenced by getMatrix(), and getMatrixValue().
|
protected |
Definition at line 360 of file KokkosSystem.h.
Referenced by clearActiveMatrixTags(), and isMatrixTagActive().
Maximum number of DOFs per element for each variable.
Definition at line 334 of file KokkosSystem.h.
|
protected |
Reference of the MOOSE mesh.
Definition at line 286 of file KokkosSystem.h.
|
protected |
Number of ghost DOFs.
Definition at line 311 of file KokkosSystem.h.
Referenced by getNumGhostDofs().
|
protected |
Number of local DOFs.
Definition at line 306 of file KokkosSystem.h.
Referenced by getNumLocalDofs().
|
protected |
Number of variables.
Definition at line 301 of file KokkosSystem.h.
|
protectedinherited |
The MooseApp that owns the PerfGraph.
Definition at line 135 of file PerfGraphInterface.h.
Referenced by PerfGraphInterface::perfGraph().
|
protectedinherited |
A prefix to use for all sections.
Definition at line 138 of file PerfGraphInterface.h.
Referenced by PerfGraphInterface::timedSectionName().
|
protected |
Flag whether each tag is active.
Definition at line 359 of file KokkosSystem.h.
Referenced by clearActiveResidualTags(), and isResidualTagActive().
|
private |
Matrix sparsity pattern data.
Definition at line 390 of file KokkosSystem.h.
Referenced by getSparsity().
|
protected |
Reference of the MOOSE system.
Definition at line 281 of file KokkosSystem.h.
Referenced by getSystem().
|
protected |
Whether each variable is active on subdomains.
Definition at line 339 of file KokkosSystem.h.
Referenced by isVariableActive().
Kokkos vectors and matrices on device.
Definition at line 317 of file KokkosSystem.h.
Referenced by getVector(), Moose::Kokkos::FESystem::getVectorDofADValue(), and getVectorDofValue().
1.8.14