Line data Source code
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 "MooseMesh.h" 13 : 14 : /** 15 : * Generate a parallel (distributed) mesh from PETSc DMDA. 16 : * DMDA could be passed in from a PETSc application 17 : * or created on the fly. Note that this mesh object does not have one layer of 18 : * ghost elements. It is designed for holding the solution from an external PETSc 19 : * application. And then the solution can be coupled to other MOOSE-based applications 20 : * using the existing MultiApp transfers. 21 : */ 22 : class PETScDMDAMesh : public MooseMesh 23 : { 24 : public: 25 : static InputParameters validParams(); 26 : 27 : PETScDMDAMesh(const InputParameters & parameters); 28 0 : PETScDMDAMesh(const PETScDMDAMesh & /* other_mesh */) = default; 29 : 30 : // No copy 31 : PETScDMDAMesh & operator=(const PETScDMDAMesh & other_mesh) = delete; 32 : 33 : virtual std::unique_ptr<MooseMesh> safeClone() const override; 34 : 35 : virtual void buildMesh() override; 36 : 37 : protected: 38 : DM _dmda; 39 : };