| 1 |
/* |
| 2 |
* (C) Copyright 2013 ECMWF. |
| 3 |
* |
| 4 |
* This software is licensed under the terms of the Apache Licence Version 2.0 |
| 5 |
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. |
| 6 |
* In applying this licence, ECMWF does not waive the privileges and immunities |
| 7 |
* granted to it by virtue of its status as an intergovernmental organisation |
| 8 |
* nor does it submit to any jurisdiction. |
| 9 |
*/ |
| 10 |
|
| 11 |
#include <string> |
| 12 |
|
| 13 |
#include "atlas/meshgenerator/detail/CubedSphereDualMeshGenerator.h" |
| 14 |
#include "atlas/meshgenerator/detail/CubedSphereMeshGenerator.h" |
| 15 |
#include "atlas/meshgenerator/detail/DelaunayMeshGenerator.h" |
| 16 |
#include "atlas/meshgenerator/detail/HealpixMeshGenerator.h" |
| 17 |
#include "atlas/meshgenerator/detail/MeshGeneratorFactory.h" |
| 18 |
#include "atlas/meshgenerator/detail/NodalCubedSphereMeshGenerator.h" |
| 19 |
#include "atlas/meshgenerator/detail/StructuredMeshGenerator.h" |
| 20 |
|
| 21 |
using atlas::Mesh; |
| 22 |
|
| 23 |
namespace atlas { |
| 24 |
namespace meshgenerator { |
| 25 |
|
| 26 |
//---------------------------------------------------------------------------------------------------------------------- |
| 27 |
|
| 28 |
void force_link() { |
| 29 |
static struct Link { |
| 30 |
Link() { |
| 31 |
MeshGeneratorBuilder<meshgenerator::CubedSphereMeshGenerator>(); |
| 32 |
MeshGeneratorBuilder<meshgenerator::CubedSphereDualMeshGenerator>(); |
| 33 |
MeshGeneratorBuilder<meshgenerator::StructuredMeshGenerator>(); |
| 34 |
MeshGeneratorBuilder<meshgenerator::DelaunayMeshGenerator>(); |
| 35 |
MeshGeneratorBuilder<meshgenerator::HealpixMeshGenerator>(); |
| 36 |
MeshGeneratorBuilder<meshgenerator::NodalCubedSphereMeshGenerator>(); |
| 37 |
} |
| 38 |
} link; |
| 39 |
} |
| 40 |
|
| 41 |
//---------------------------------------------------------------------------------------------------------------------- |
| 42 |
|
| 43 |
const MeshGenerator::Implementation* MeshGeneratorFactory::build(const std::string& builder) { |
| 44 |
return build(builder, util::NoConfig()); |
| 45 |
} |
| 46 |
|
| 47 |
const MeshGenerator::Implementation* MeshGeneratorFactory::build(const std::string& builder, |
| 48 |
const eckit::Parametrisation& param) { |
| 49 |
force_link(); |
| 50 |
auto factory = get(builder); |
| 51 |
return factory->make(param); |
| 52 |
} |
| 53 |
|
| 54 |
//---------------------------------------------------------------------------------------------------------------------- |
| 55 |
|
| 56 |
} // namespace meshgenerator |
| 57 |
} // namespace atlas |