Skip to content

Commit

Permalink
outline changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil Tooley committed Dec 12, 2018
1 parent 324001a commit 7206a77
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,24 @@ Map::Map(const Image& mask, const floatvector& node_spacing)
calculate_node_locs();
calculate_basis();
// TODO: mask basis
apply_mask_to_basis();
// initialize displacement storage
alloc_displacements();
calculate_laplacian();
}

void Map::apply_mask_to_basis()
{
// Need to apply mask to both image and map "side" of basis
// Mask applies directly to image side of basis
apply_image_mask();

// Work out from basis what nodes are relevant, mask out others

calculate_map_mask();
apply_map_mask();
}

void Map::update(const Vec& delta_vec)
{
PetscErrorCode perr = VecAXPY(*m_displacements, 1, delta_vec);
Expand Down
1 change: 1 addition & 0 deletions src/map.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ class Map {
Vec_unique m_displacements;
mutable DM_unique map_dmda;

void apply_mask_to_basis();
void alloc_displacements();
void initialize_dmda() const;
void calculate_node_locs();
Expand Down

0 comments on commit 7206a77

Please sign in to comment.