xref: /libCEED/examples/solids/include/setup-dm.h (revision 24a65d3da2f623912f26b42c0b9ba6f37de25307)
13d8e8822SJeremy L Thompson // Copyright (c) 2017-2022, Lawrence Livermore National Security, LLC and other CEED contributors.
23d8e8822SJeremy L Thompson // All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
33d8e8822SJeremy L Thompson //
43d8e8822SJeremy L Thompson // SPDX-License-Identifier: BSD-2-Clause
53d8e8822SJeremy L Thompson //
63d8e8822SJeremy L Thompson // This file is part of CEED:  http://github.com/ceed
7*24a65d3dSJeremy L Thompson #pragma once
85754ecacSJeremy L Thompson 
95754ecacSJeremy L Thompson #include <ceed.h>
1049aac155SJeremy L Thompson #include <petscdm.h>
112b730f8bSJeremy L Thompson 
125754ecacSJeremy L Thompson #include "../include/structs.h"
135754ecacSJeremy L Thompson 
145754ecacSJeremy L Thompson // -----------------------------------------------------------------------------
155754ecacSJeremy L Thompson // Setup DM
165754ecacSJeremy L Thompson // -----------------------------------------------------------------------------
175754ecacSJeremy L Thompson PetscErrorCode CreateBCLabel(DM dm, const char name[]);
185754ecacSJeremy L Thompson 
195754ecacSJeremy L Thompson // Read mesh and distribute DM in parallel
205754ecacSJeremy L Thompson PetscErrorCode CreateDistributedDM(MPI_Comm comm, AppCtx app_ctx, DM *dm);
215754ecacSJeremy L Thompson 
225754ecacSJeremy L Thompson // Setup DM with FE space of appropriate degree
232b730f8bSJeremy L Thompson PetscErrorCode SetupDMByDegree(DM dm, AppCtx app_ctx, PetscInt order, PetscBool boundary, PetscInt num_comp_u);
24