Loading...
Searching...
No Matches
HDF5Utility.h
// Copyright (C) 2013 Chris N. Richardson
//
// This file is part of DOLFIN.
//
// DOLFIN is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// DOLFIN is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with DOLFIN. If not, see <http://www.gnu.org/licenses/>.
//
//
// First added: 2013-05-07
// Last changed: 2013-06-18
#ifndef __DOLFIN_HDF5UTILITY_H
#define __DOLFIN_HDF5UTILITY_H
#include <string>
#include <vector>
#include "dolfin/common/types.h"
namespace dolfin
{
class LocalMeshData;
class GenericDofMap;
class Mesh;
class HDF5Utility
{
public:
static void
map_gdof_to_cell(const MPI_Comm mpi_comm,
const std::vector<std::size_t>& input_cells,
const std::vector<dolfin::la_index>& input_cell_dofs,
const std::vector<std::size_t>& x_cell_dofs,
const std::pair<dolfin::la_index, dolfin::la_index>
vector_range,
std::vector<std::size_t>& global_cells,
std::vector<std::size_t>& remote_local_dofi);
static void get_global_dof(
MPI_Comm mpi_comm,
const std::vector<std::pair<std::size_t, std::size_t>>& cell_ownership,
const std::vector<std::size_t>& remote_local_dofi,
std::pair<std::size_t, std::size_t> vector_range,
const GenericDofMap& dofmap,
std::vector<dolfin::la_index>& global_dof);
static std::vector<std::pair<std::size_t, std::size_t>>
cell_owners(const Mesh& mesh, const std::vector<std::size_t>& cells);
static void cell_owners_in_range(
std::vector<std::pair<std::size_t, std::size_t>>& global_owner,
const Mesh& mesh);
static void build_local_mesh(Mesh& mesh, const LocalMeshData& mesh_data);
static void set_local_vector_values(
MPI_Comm mpi_comm,
GenericVector& x,
const Mesh& mesh,
const std::vector<size_t>& cells,
const std::vector<dolfin::la_index>& cell_dofs,
const std::vector<std::size_t>& x_cell_dofs,
const std::vector<double>& vector,
std::pair<dolfin::la_index, dolfin::la_index> input_vector_range,
const GenericDofMap& dofmap);
};
}
#endif
dolfin::GenericDofMap
This class provides a generic interface for dof maps.
Definition GenericDofMap.h:50
dolfin::GenericVector
This class defines a common interface for vectors.
Definition GenericVector.h:48
dolfin::HDF5Utility
Definition HDF5Utility.h:41
dolfin::HDF5Utility::get_global_dof
static void get_global_dof(MPI_Comm mpi_comm, const std::vector< std::pair< std::size_t, std::size_t > > &cell_ownership, const std::vector< std::size_t > &remote_local_dofi, std::pair< std::size_t, std::size_t > vector_range, const GenericDofMap &dofmap, std::vector< dolfin::la_index > &global_dof)
Definition HDF5Utility.cpp:119
dolfin::HDF5Utility::cell_owners_in_range
static void cell_owners_in_range(std::vector< std::pair< std::size_t, std::size_t > > &global_owner, const Mesh &mesh)
Definition HDF5Utility.cpp:254
dolfin::HDF5Utility::set_local_vector_values
static void set_local_vector_values(MPI_Comm mpi_comm, GenericVector &x, const Mesh &mesh, const std::vector< size_t > &cells, const std::vector< dolfin::la_index > &cell_dofs, const std::vector< std::size_t > &x_cell_dofs, const std::vector< double > &vector, std::pair< dolfin::la_index, dolfin::la_index > input_vector_range, const GenericDofMap &dofmap)
Missing docstring.
Definition HDF5Utility.cpp:341
dolfin::HDF5Utility::build_local_mesh
static void build_local_mesh(Mesh &mesh, const LocalMeshData &mesh_data)
Definition HDF5Utility.cpp:304
dolfin::HDF5Utility::map_gdof_to_cell
static void map_gdof_to_cell(const MPI_Comm mpi_comm, const std::vector< std::size_t > &input_cells, const std::vector< dolfin::la_index > &input_cell_dofs, const std::vector< std::size_t > &x_cell_dofs, const std::pair< dolfin::la_index, dolfin::la_index > vector_range, std::vector< std::size_t > &global_cells, std::vector< std::size_t > &remote_local_dofi)
Definition HDF5Utility.cpp:44
dolfin::HDF5Utility::cell_owners
static std::vector< std::pair< std::size_t, std::size_t > > cell_owners(const Mesh &mesh, const std::vector< std::size_t > &cells)
Definition HDF5Utility.cpp:185
dolfin::LocalMeshData
This class stores mesh data on a local processor corresponding to a portion of a (larger) global mesh...
Definition LocalMeshData.h:59
dolfin::Mesh
Definition Mesh.h:84
dolfin
Definition adapt.h:30