xref: /libCEED/examples/solids/include/setup-dm.h (revision 3d8e882215d238700cdceb37404f76ca7fa24eaa)
1*3d8e8822SJeremy L Thompson // Copyright (c) 2017-2022, Lawrence Livermore National Security, LLC and other CEED contributors.
2*3d8e8822SJeremy L Thompson // All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
3*3d8e8822SJeremy L Thompson //
4*3d8e8822SJeremy L Thompson // SPDX-License-Identifier: BSD-2-Clause
5*3d8e8822SJeremy L Thompson //
6*3d8e8822SJeremy L Thompson // This file is part of CEED:  http://github.com/ceed
7*3d8e8822SJeremy L Thompson 
8b7c563b6SJeremy L Thompson #ifndef libceed_solids_examples_setup_dm_h
9b7c563b6SJeremy L Thompson #define libceed_solids_examples_setup_dm_h
105754ecacSJeremy L Thompson 
115754ecacSJeremy L Thompson #include <ceed.h>
125754ecacSJeremy L Thompson #include <petsc.h>
135754ecacSJeremy L Thompson #include <petscdmplex.h>
145754ecacSJeremy L Thompson #include <petscfe.h>
155754ecacSJeremy L Thompson #include "../include/structs.h"
165754ecacSJeremy L Thompson 
175754ecacSJeremy L Thompson // -----------------------------------------------------------------------------
185754ecacSJeremy L Thompson // Setup DM
195754ecacSJeremy L Thompson // -----------------------------------------------------------------------------
205754ecacSJeremy L Thompson PetscErrorCode CreateBCLabel(DM dm, const char name[]);
215754ecacSJeremy L Thompson 
225754ecacSJeremy L Thompson // Read mesh and distribute DM in parallel
235754ecacSJeremy L Thompson PetscErrorCode CreateDistributedDM(MPI_Comm comm, AppCtx app_ctx, DM *dm);
245754ecacSJeremy L Thompson 
255754ecacSJeremy L Thompson // Setup DM with FE space of appropriate degree
265754ecacSJeremy L Thompson PetscErrorCode SetupDMByDegree(DM dm, AppCtx app_ctx, PetscInt order,
275754ecacSJeremy L Thompson                                PetscBool boundary, PetscInt num_comp_u);
285754ecacSJeremy L Thompson 
29b7c563b6SJeremy L Thompson #endif // libceed_solids_examples_setup_dm_h
30