GEOS
ParticleMeshGenerator.hpp
Go to the documentation of this file.
1 /*
2  * ------------------------------------------------------------------------------------------------------------
3  * SPDX-License-Identifier: LGPL-2.1-only
4  *
5  * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC
6  * Copyright (c) 2018-2024 TotalEnergies
7  * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University
8  * Copyright (c) 2023-2024 Chevron
9  * Copyright (c) 2019- GEOS/GEOSX Contributors
10  * All rights reserved
11  *
12  * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details.
13  * ------------------------------------------------------------------------------------------------------------
14  */
15 
20 #ifndef GEOS_MESH_GENERATORS_PARTICLEMESHGENERATOR_HPP
21 #define GEOS_MESH_GENERATORS_PARTICLEMESHGENERATOR_HPP
22 
24 
26 
27 namespace geos
28 {
29 
30 class ParticleManager;
31 class SpatialPartition;
32 
38 {
39 public:
40 
46  ParticleMeshGenerator( const string & name, Group * const parent );
47 
48  virtual ~ParticleMeshGenerator() override = default;
49 
54  static string catalogName() { return "ParticleMesh"; }
55 
62  virtual Group * createChild( string const & childKey, string const & childName ) override;
63 
64  virtual void fillParticleBlockManager( ParticleBlockManager & particleBlockManager, ParticleManager & particleManager, SpatialPartition const & partition ) override;
65 
67  string const & blockName,
68  string const & meshFieldName,
69  bool isMaterialField,
70  dataRepository::WrapperBase & wrapper ) const override;
71 
72 protected:
73 
75  struct viewKeyStruct
76  {
77  constexpr static char const * particleFilePathString() { return "particleFile"; }
78  constexpr static char const * headerFilePathString() { return "headerFile"; }
79  constexpr static char const * particleBlockNamesString() { return "particleBlockNames"; }
80  constexpr static char const * particleTypesString() { return "particleTypes"; }
81  };
83 
84  void postInputInitialization() override;
85 
87  int m_dim;
88 
91 
94 
95 private:
96 
98  Path m_particleFilePath;
99 
101  Path m_headerFilePath;
102 
104  array1d< string > m_blockNames;
105 
107  array1d< string > m_particleType;
108 
109 public:
110 
111 };
112 
113 } /* namespace geos */
114 
115 #endif /* GEOS_MESH_GENERATORS_PARTICLEMESHGENERATOR_HPP */
The MeshGeneratorBase class provides an abstract base class implementation for different mesh types....
Block
Describe which kind of block must be considered.
The ParticleBlockManager class provides an interface to ObjectManagerBase in order to manage Particle...
The ParticleManager class provides an interface to ObjectManagerBase in order to manage ParticleRegio...
The ParticleMeshGenerator class is a class handling import of particle data from an externel particle...
virtual void fillParticleBlockManager(ParticleBlockManager &particleBlockManager, ParticleManager &particleManager, SpatialPartition const &partition) override
Fill the particleBlockManager object .
real64 m_min[3]
Minimum extent of particle coordinates.
static string catalogName()
Return the name of the ParticleMeshGenerator in object Catalog.
void importFieldOnArray(Block block, string const &blockName, string const &meshFieldName, bool isMaterialField, dataRepository::WrapperBase &wrapper) const override
import field from the mesh on the array accessible via the given wrapper.
real64 m_max[3]
Maximum extent of particle coordinates.
ParticleMeshGenerator(const string &name, Group *const parent)
Main constructor for ParticleMeshGenerator.
virtual Group * createChild(string const &childKey, string const &childName) override
Create a new geometric object (box, plane, etc) as a child of this group.
void postInputInitialization() override
int m_dim
Mesh number of dimension.
Class describing a file Path.
Definition: Path.hpp:33
Base class for all wrappers containing common operations.
Definition: WrapperBase.hpp:56
double real64
64-bit floating point type.
Definition: DataTypes.hpp:99
Array< T, 1 > array1d
Alias for 1D array.
Definition: DataTypes.hpp:176
Structure to hold scoped key names.
Definition: Group.hpp:1442