https://mooseframework.inl.gov
Loading...
Searching...
No Matches
SCMCoreMeshGeneratorBase.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#pragma once
11
12#include "MeshGenerator.h"
13
21{
22public:
24
26
27 std::unique_ptr<MeshBase> generate() override;
28
29protected:
34 virtual void readAssemblySizes() = 0;
35
40 virtual bool overlap(unsigned int input_a, unsigned int input_b, const Point & offset) const = 0;
41
43 const std::vector<MeshGeneratorName> & _input_names;
45 const std::vector<std::unique_ptr<MeshBase> *> _meshes;
47 const std::vector<std::vector<int>> & _pattern;
49 const Real _assembly_pitch;
51 std::vector<std::pair<unsigned int, Point>> _assemblies;
52
57 void addAssembly(int entry, const Point & center);
58};
const InputParameters & parameters() const
Base class for mesh generators that place SCM assembly meshes on a core lattice and merge them into o...
const Real _assembly_pitch
Center-to-center distance between neighboring assembly positions [m].
virtual bool overlap(unsigned int input_a, unsigned int input_b, const Point &offset) const =0
Whether the ducts of two inputs overlap when their centers are offset apart.
static InputParameters validParams()
const std::vector< std::vector< int > > & _pattern
Core pattern of indices into the inputs; -1 marks an empty position.
virtual void readAssemblySizes()=0
Read the duct size metadata of every input.
std::vector< std::pair< unsigned int, Point > > _assemblies
Placed assemblies in pattern order: (index into the inputs, x-y center of the assembly)
std::unique_ptr< MeshBase > generate() override
void addAssembly(int entry, const Point &center)
Check that a pattern entry is -1 or a valid input index and, if it is an index, place that input at c...
const std::vector< MeshGeneratorName > & _input_names
Names of the input SCM 1D assembly, duct, or 3D visualization assembly mesh generators.
const std::vector< std::unique_ptr< MeshBase > * > _meshes
Input meshes.