|
Vlasiator ebf0dd394 on dev (v5.4.0 + 1054 commits)
|
Copysphere is a class applying an ionosphere-ish boundary conditions. More...
#include <copysphere.h>


Public Member Functions | |
| Copysphere () | |
| virtual | ~Copysphere () |
| virtual void | getParameters () override |
| virtual void | initSysBoundary (creal &t, Project &project) override |
| virtual void | assignSysBoundary (dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, fsgrids::technicalspan technical, FieldSolverGrid &fsgrid) override |
| virtual void | applyInitialState (dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, fsgrids::technicalspan technical, FieldSolverGrid &fsgrid, fsgrids::perbspan perb, fsgrids::bgbspan bgb, Project &project) override |
| virtual void | updateState (dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, fsgrids::technicalspan technical, FieldSolverGrid &fsgrid, fsgrids::perbspan perb, fsgrids::bgbspan bgb, creal t) override |
| virtual Real | fieldSolverBoundaryCondMagneticField (fsgrids::perbspan b, fsgrids::constbgbspan bgb, fsgrids::consttechnicalspan technical, const std::array< Real, 3 > &gridSpacing, const std::array< fsgrid::FsSize_t, 3 > &globalCoordinates, const fsgrid::FsStencil &stencil, cuint component) override |
| virtual void | fieldSolverBoundaryCondElectricField (fsgrids::efieldspan e, const fsgrid::FsStencil &stencil, cuint component) override |
| virtual void | fieldSolverBoundaryCondHallElectricField (fsgrids::ehallspan ehall, const fsgrid::FsStencil &stencil, cuint component) override |
| virtual void | fieldSolverBoundaryCondGradPeElectricField (fsgrids::egradpespan EGradPe, const fsgrid::FsStencil &stencil, cuint component) override |
| virtual void | fieldSolverBoundaryCondDerivatives (fsgrids::dperbspan dperb, fsgrids::dmomentsspan dmoments, const fsgrid::FsStencil &stencil, cuint RKCase, cuint component) override |
| virtual void | fieldSolverBoundaryCondBVOLDerivatives (fsgrids::volspan vols, const fsgrid::FsStencil &stencil, cuint component) override |
| virtual void | vlasovBoundaryCondition (dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, const CellID &cellID, const uint popID, const bool calculate_V_moments) override |
| void | getFaces (bool *faces) override |
| virtual std::string | getName () const override |
| virtual uint | getIndex () const override |
| void | generateTemplateCell (Project &project) |
| void | setCellFromTemplate (SpatialCell *cell, const uint popID) |
| std::array< Real, 3 > | fieldSolverGetNormalDirection (fsgrids::technicalspan technical, FieldSolverGrid &fsgrid, cint i, cint j, cint k) |
| Public Member Functions inherited from SBC::SysBoundaryCondition | |
| SysBoundaryCondition () | |
| virtual | ~SysBoundaryCondition () |
| virtual void | generateTemplateCell () |
| virtual void | mapCellPotentialAndGetEXBDrift (std::array< Real, CellParams::N_SPATIAL_CELL_PARAMS > &cellParams) |
| virtual void | setupL2OutflowAtRestart (dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid) |
| uint | getPrecedence () const |
| bool | isDynamic () const |
| bool | updateSysBoundaryConditionsAfterLoadBalance (const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, const std::vector< CellID > &local_cells_on_boundary) |
| bool | doApplyUponRestart () const |
| void | setPeriodicity (std::array< bool, 3 > isFacePeriodic) |
Static Public Member Functions | |
| static void | addParameters () |
| Static Public Member Functions inherited from SBC::SysBoundaryCondition | |
| static void | addParameters () |
| static void | setCellDerivativesToZero (fsgrids::dperbspan dperb, fsgrids::dmomentsspan dmoments, const fsgrid::FsStencil &stencil, cuint component) |
| static void | setCellBVOLDerivativesToZero (fsgrids::volspan vols, const fsgrid::FsStencil &stencil, cuint component) |
Public Attributes | |
| Real | center [3] |
| Real | radius |
| uint | geometry |
| std::vector< CopysphereSpeciesParameters > | speciesParams |
| bool | zeroPerB |
| spatial_cell::SpatialCell | templateCell |
Additional Inherited Members | |
| Protected Member Functions inherited from SBC::SysBoundaryCondition | |
| void | determineFace (bool *isThisCellOnAFace, const creal x, const creal y, const creal z, const creal dx, const creal dy, const creal dz, const bool excludeSlicesAndPeriodicDimensions=false) const |
| Function used to determine on which face(s) if any the cell at given coordinates is. | |
| void | determineFace (std::array< bool, 6 > &isThisCellOnAFace, const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, CellID id, const bool excludeSlicesAndPeriodicDimensions=false) |
| Function used to determine on which face(s) if any the cell with the given MPI id is on. | |
| void | copyCellData (const SpatialCell *from, SpatialCell *to, const bool copyMomentsOnly, const uint popID, const bool copy_V_moments) |
| std::array< SpatialCell *, 27 > & | getFlowtoCells (const CellID &cellID) |
| std::array< Realf *, 27 > | getFlowtoCellsBlock (const std::array< SpatialCell *, 27 > flowtoCells, const vmesh::GlobalID blockGID, const uint popID) |
| int | nbrID (const int i, const int j, const int k) |
| void | vlasovBoundaryCopyFromTheClosestNbr (dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, const CellID &cellID, const bool ©MomentsOnly, const uint popID, const bool calculate_V_moments) |
| void | vlasovBoundaryCopyFromTheClosestL1OutflowNbr (dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, const CellID &cellID, const bool ©MomentsOnly, const uint popID, const bool calculate_V_moments) |
| void | vlasovBoundaryCopyFromAllClosestNbrs (dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, const CellID &cellID, const uint popID, const bool calculate_V_moments) |
| void | vlasovBoundaryFluffyCopyFromAllCloseNbrs (dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, const CellID &cellID, const uint popID, const bool calculate_V_moments, creal fluffiness) |
| std::array< int, 3 > | getTheClosestNonsysboundaryCell (fsgrids::technicalspan technical, FieldSolverGrid &fsgrid, cint i, cint j, cint k) |
| std::vector< std::array< int, 3 > > | getAllClosestNonsysboundaryCells (fsgrids::technicalspan technical, FieldSolverGrid &fsgrid, cint i, cint j, cint k) |
| CellID & | getTheClosestNonsysboundaryCell (const CellID &cellID) |
| std::vector< CellID > & | getAllClosestNonsysboundaryCells (const CellID &cellID) |
| std::vector< CellID > & | getAllCloseNonsysboundaryCells (const CellID &cellID) |
| Real | fieldBoundaryCopyFromSolvingNbrMagneticField (fsgrids::perbspan b, fsgrids::consttechnicalspan technical, const fsgrid::FsStencil &stencil, cuint component, cuint mask) |
| CellID & | getTheClosestL1OutflowCell (const CellID &cellID) |
| std::vector< CellID > & | getAllClosestL1OutflowCells (const CellID &cellID) |
| Protected Attributes inherited from SBC::SysBoundaryCondition | |
| uint | precedence |
| bool | dynamic |
| std::array< bool, 3 > | periodic |
| std::unordered_map< CellID, std::vector< CellID > > | allClosestNonsysboundaryCells |
| std::unordered_map< CellID, std::vector< CellID > > | allCloseNonsysboundaryCells |
| std::unordered_map< CellID, std::vector< CellID > > | allClosestL1OutflowCells |
| std::unordered_map< CellID, std::vector< CellID > > | allCloseL1OutflowCells |
| bool | applyUponRestart |
Copysphere is a class applying an ionosphere-ish boundary conditions.
Copysphere is a class handling cells tagged as sysboundarytype::COPYSPHERE by this system boundary condition. It applies copy boundary conditions to perturbed magnetic field.
These consist in:
For 3D magnetospheric simulations, you might be interesting in trying the ionosphere boundary instead!
Definition at line 55 of file copysphere.h.
| SBC::Copysphere::Copysphere | ( | ) |
|
virtual |
Definition at line 51 of file copysphere.cpp.
|
static |
Definition at line 53 of file copysphere.cpp.


|
overridevirtual |
Implements SBC::SysBoundaryCondition.
Definition at line 182 of file copysphere.cpp.

|
overridevirtual |
Implements SBC::SysBoundaryCondition.
Definition at line 160 of file copysphere.cpp.

|
overridevirtual |
Implements SBC::SysBoundaryCondition.
Definition at line 612 of file copysphere.cpp.

|
overridevirtual |
Implements SBC::SysBoundaryCondition.
Definition at line 606 of file copysphere.cpp.

|
overridevirtual |
Implements SBC::SysBoundaryCondition.
Definition at line 568 of file copysphere.cpp.
|
overridevirtual |
Implements SBC::SysBoundaryCondition.
Definition at line 600 of file copysphere.cpp.
|
overridevirtual |
Implements SBC::SysBoundaryCondition.
Definition at line 573 of file copysphere.cpp.
|
overridevirtual |
We want here to
– Average perturbed face B from the nearest neighbours
– Retain only the normal components of perturbed face B
Implements SBC::SysBoundaryCondition.
Definition at line 480 of file copysphere.cpp.
| std::array< Real, 3 > SBC::Copysphere::fieldSolverGetNormalDirection | ( | fsgrids::technicalspan | technical, |
| FieldSolverGrid & | fsgrid, | ||
| cint | i, | ||
| cint | j, | ||
| cint | k ) |
| void SBC::Copysphere::generateTemplateCell | ( | Project & | project | ) |
NOTE: This function must initialize all particle species!
| project |
Definition at line 629 of file copysphere.cpp.

|
overridevirtual |
Function used to know which faces the boundary condition is applied to.
| faces | Pointer to array of 6 bool in which the values are returned whether the corresponding face is of that type. Order: 0 x+; 1 x-; 2 y+; 3 y-; 4 z+; 5 z- |
Function used in some cases to know which faces the system boundary condition is being applied to.
| faces | Pointer to array of 6 bool in which the values are returned whether the corresponding face is of that type. Order: 0 x+; 1 x-; 2 y+; 3 y-; 4 z+; 5 z- |
Implements SBC::SysBoundaryCondition.
Definition at line 740 of file copysphere.cpp.
|
overridevirtual |
Implements SBC::SysBoundaryCondition.
Definition at line 747 of file copysphere.cpp.

|
overridevirtual |
Reimplemented from SBC::SysBoundaryCondition.
Definition at line 739 of file copysphere.cpp.
|
overridevirtual |
Reimplemented from SBC::SysBoundaryCondition.
Definition at line 76 of file copysphere.cpp.


Implements SBC::SysBoundaryCondition.
Definition at line 122 of file copysphere.cpp.

| void SBC::Copysphere::setCellFromTemplate | ( | SpatialCell * | cell, |
| const uint | popID ) |
Definition at line 731 of file copysphere.cpp.


|
overridevirtual |
Implements SBC::SysBoundaryCondition.
Definition at line 742 of file copysphere.cpp.
|
overridevirtual |
This function computes the Vlasov (distribution function) boundary condition for the given particle species only. It is not! allowed to change block structure in cell.
| mpiGrid | Parallel grid. |
| cellID | Spatial cell ID. |
| popID | Particle species ID. |
Implements SBC::SysBoundaryCondition.
Definition at line 619 of file copysphere.cpp.

| Real SBC::Copysphere::center[3] |
Coordinates of the centre of the copy sphere.
Definition at line 112 of file copysphere.h.
| uint SBC::Copysphere::geometry |
Geometry of the copy sphere, 0: inf-norm (diamond), 1: 1-norm (square), 2: 2-norm (circle, DEFAULT), 3: polar-plane cylinder with line dipole.
Definition at line 114 of file copysphere.h.
| Real SBC::Copysphere::radius |
Radius of the copy sphere.
Definition at line 113 of file copysphere.h.
| std::vector<CopysphereSpeciesParameters> SBC::Copysphere::speciesParams |
Definition at line 116 of file copysphere.h.
| spatial_cell::SpatialCell SBC::Copysphere::templateCell |
Definition at line 119 of file copysphere.h.
| bool SBC::Copysphere::zeroPerB |
Definition at line 117 of file copysphere.h.