-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5921 from MFraters/add_partcleInterfaceBase_to_se…
…t_particle_world_index Add ParticleInterfaceBase to set the particle world index for the particle plugins.
- Loading branch information
Showing
8 changed files
with
135 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* | ||
Copyright (C) 2015 - 2022 by the authors of the ASPECT code. | ||
This file is part of ASPECT. | ||
ASPECT is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 2, or (at your option) | ||
any later version. | ||
ASPECT is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with ASPECT; see the file LICENSE. If not see | ||
<http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#ifndef _aspect_particle_interface_h | ||
#define _aspect_particle_interface_h | ||
|
||
#include <aspect/plugins.h> | ||
|
||
namespace aspect | ||
{ | ||
namespace Particle | ||
{ | ||
/** | ||
* A base class defining methods and member variables | ||
* shared along all the particle plugins. This includes the generator, | ||
* integrator, interpolator and the property classes. | ||
* | ||
* @ingroup Particle | ||
*/ | ||
class ParticleInterfaceBase : public Plugins::InterfaceBase | ||
{ | ||
public: | ||
/** | ||
* @brief Set which particle world the plugin belongs to. | ||
* | ||
* @param particle_world_index The index of the particle world this plugin belongs to. | ||
*/ | ||
void set_particle_world_index(unsigned int particle_world_index); | ||
|
||
/** | ||
* @brief Gets which particle world the plugin belong to. | ||
*/ | ||
unsigned int get_particle_world_index() const; | ||
|
||
private: | ||
/** | ||
* Stores the index to the particle world, to which the plugin belongs. | ||
*/ | ||
unsigned int particle_world_index; | ||
}; | ||
|
||
} | ||
} | ||
|
||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
Copyright (C) 2024 by the authors of the ASPECT code. | ||
This file is part of ASPECT. | ||
ASPECT is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 2, or (at your option) | ||
any later version. | ||
ASPECT is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with ASPECT; see the file LICENSE. If not see | ||
<http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#include <aspect/particle/interface.h> | ||
|
||
|
||
namespace aspect | ||
{ | ||
namespace Particle | ||
{ | ||
void | ||
ParticleInterfaceBase::set_particle_world_index(const unsigned int particle_world_index) | ||
{ | ||
this->particle_world_index = particle_world_index; | ||
} | ||
|
||
|
||
|
||
unsigned int | ||
ParticleInterfaceBase::get_particle_world_index() const | ||
{ | ||
return particle_world_index; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters