GEOSX
ParticleMeshGenerator.hpp
Go to the documentation of this file.
1 /*
2  * ------------------------------------------------------------------------------------------------------------
3  * SPDX-License-Identifier: LGPL-2.1-only
4  *
5  * Copyright (c) 2018-2020 Lawrence Livermore National Security LLC
6  * Copyright (c) 2018-2020 The Board of Trustees of the Leland Stanford Junior University
7  * Copyright (c) 2018-2020 TotalEnergies
8  * Copyright (c) 2019- GEOSX Contributors
9  * All rights reserved
10  *
11  * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details.
12  * ------------------------------------------------------------------------------------------------------------
13  */
14 
19 #ifndef GEOSX_MESH_GENERATORS_PARTICLEMESHGENERATOR_HPP
20 #define GEOSX_MESH_GENERATORS_PARTICLEMESHGENERATOR_HPP
21 
23 
24 #include "codingUtilities/EnumStrings.hpp"
25 
26 namespace geos
27 {
28 
29 class ParticleManager;
30 class SpatialPartition;
31 
37 {
38 public:
39 
45  ParticleMeshGenerator( const string & name, Group * const parent );
46 
47  virtual ~ParticleMeshGenerator() override = default;
48 
53  static string catalogName() { return "ParticleMesh"; }
54 
61  virtual Group * createChild( string const & childKey, string const & childName ) override;
62 
63  virtual void fillParticleBlockManager( ParticleBlockManager & particleBlockManager, ParticleManager & particleManager, SpatialPartition const & partition ) override;
64 
66  string const & blockName,
67  string const & meshFieldName,
68  bool isMaterialField,
69  dataRepository::WrapperBase & wrapper ) const override;
70 
71 protected:
72 
74  struct viewKeyStruct
75  {
76  constexpr static char const * particleFilePathString() { return "particleFile"; }
77  constexpr static char const * headerFilePathString() { return "headerFile"; }
78  constexpr static char const * particleBlockNamesString() { return "particleBlockNames"; }
79  constexpr static char const * particleTypesString() { return "particleTypes"; }
80  };
82 
83  void postProcessInput() override;
84 
86  int m_dim;
87 
90 
93 
94 private:
95 
97  Path m_particleFilePath;
98 
100  Path m_headerFilePath;
101 
103  array1d< string > m_blockNames;
104 
106  array1d< string > m_particleType;
107 
108 public:
109 
110 };
111 
112 } /* namespace geos */
113 
114 #endif /* GEOSX_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 postProcessInput() override
int m_dim
Mesh number of dimension.
Class describing a file Path.
Definition: Path.hpp:32
Base class for all wrappers containing common operations.
Definition: WrapperBase.hpp:55
double real64
64-bit floating point type.
Definition: DataTypes.hpp:139
Array< T, 1 > array1d
Alias for 1D array.
Definition: DataTypes.hpp:216