Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisrichardson committed May 14, 2024
1 parent 6c3b846 commit 92952e8
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
10 changes: 5 additions & 5 deletions src/cgpoisson_problem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,13 @@ cgpoisson::problem(std::shared_ptr<mesh::Mesh<double>> mesh, int order,
{
common::Timer t0("ZZZ FunctionSpace");

std::vector fs_poisson_a
= {functionspace_form_Poisson_a1, functionspace_form_Poisson_a2,
functionspace_form_Poisson_a3};
auto element = basix::create_element<double>(
basix::element::family::P, basix::cell::type::tetrahedron, order,
basix::element::lagrange_variant::gll_warped,
basix::element::dpc_variant::unset, false);

auto V = std::make_shared<fem::FunctionSpace<double>>(
fem::create_functionspace(*fs_poisson_a.at(order - 1), "v_0", mesh));
fem::create_functionspace(mesh, element, {}));

t0.stop();

Expand Down Expand Up @@ -181,7 +182,6 @@ cgpoisson::problem(std::shared_ptr<mesh::Mesh<double>> mesh, int order,
std::vector<T> local_buffer(sct.local_buffer_size(), 0);
std::vector<T> remote_buffer(sct.remote_buffer_size(), 0);


common::Scatterer<>::type type;
if (scatterer == "neighbor")
type = common::Scatterer<>::type::neighbor;
Expand Down
10 changes: 6 additions & 4 deletions src/elasticity_problem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,13 @@ elastic::problem(std::shared_ptr<mesh::Mesh<double>> mesh, int order)
{
common::Timer t0("ZZZ FunctionSpace");

std::vector fs_elasticity
= {functionspace_form_Elasticity_a1, functionspace_form_Elasticity_a2,
functionspace_form_Elasticity_a3};
auto element = basix::create_element<double>(
basix::element::family::P, basix::cell::type::tetrahedron, order,
basix::element::lagrange_variant::gll_warped,
basix::element::dpc_variant::unset, false);

auto V = std::make_shared<fem::FunctionSpace<double>>(
fem::create_functionspace(*fs_elasticity.at(order - 1), "v_0", mesh));
fem::create_functionspace(mesh, element, {3}));

t0.stop();

Expand Down
13 changes: 7 additions & 6 deletions src/poisson_problem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,13 @@ poisson::problem(std::shared_ptr<mesh::Mesh<double>> mesh, int order)
{
common::Timer t0("ZZZ FunctionSpace");

std::vector fs_poisson_a
= {functionspace_form_Poisson_a1, functionspace_form_Poisson_a2,
functionspace_form_Poisson_a3};
auto element = basix::create_element<double>(
basix::element::family::P, basix::cell::type::tetrahedron, order,
basix::element::lagrange_variant::gll_warped,
basix::element::dpc_variant::unset, false);

auto V = std::make_shared<fem::FunctionSpace<double>>(
fem::create_functionspace(*fs_poisson_a.at(order - 1), "v_0", mesh));
fem::create_functionspace(mesh, element, {}));

t0.stop();

Expand Down Expand Up @@ -107,8 +108,8 @@ poisson::problem(std::shared_ptr<mesh::Mesh<double>> mesh, int order)
// Define variational forms
auto L = std::make_shared<fem::Form<T>>(fem::create_form<T>(
*form_poisson_L.at(order - 1), {V}, {{"w0", f}, {"w1", g}}, {}, {}));
auto a = std::make_shared<fem::Form<T>>(fem::create_form<T>(
*form_poisson_a.at(order - 1), {V, V}, {}, {}, {}));
auto a = std::make_shared<fem::Form<T>>(
fem::create_form<T>(*form_poisson_a.at(order - 1), {V, V}, {}, {}, {}));

// Create matrices and vector, and assemble system
std::shared_ptr<la::petsc::Matrix> A = std::make_shared<la::petsc::Matrix>(
Expand Down

0 comments on commit 92952e8

Please sign in to comment.