Skip to content

Commit

Permalink
Added full constructor for Parabolic PDEs.
Browse files Browse the repository at this point in the history
  • Loading branch information
aldoclemente committed Nov 20, 2023
1 parent d48c5bf commit 106f711
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions fdaPDE/pde/pde.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,14 @@ class PDE : public PDEBase {
PDE(const D& domain) : domain_(domain) { }
PDE(const D& domain, const DVector<double>& time) : domain_(domain), time_(time) { };
PDE(const D& domain, E diff_op) : domain_(domain), diff_op_(diff_op) { };
PDE(const D& domain, E diff_op, const DVector<double>& time) : domain_(domain), diff_op_(diff_op), time_(time) { };
PDE(const D& domain, const DVector<double>& time, E diff_op) : domain_(domain), time_(time), diff_op_(diff_op) { };
void set_forcing(const F& forcing_data) { forcing_data_ = forcing_data; }
void set_differential_operator(E diff_op) { diff_op_ = diff_op; }
// full constructors
PDE(const D& domain, E diff_op, const F& forcing_data) :
domain_(domain), diff_op_(diff_op), forcing_data_(forcing_data) { }

PDE(const D& domain, const DVector<double>& time, E diff_op, const F& forcing_data) :
domain_(domain), time_(time), diff_op_(diff_op), forcing_data_(forcing_data) { }
// setters
virtual void set_dirichlet_bc(const DMatrix<double>& data) { boundary_data_ = data; }
virtual void set_initial_condition(const DVector<double>& data) { initial_condition_ = data; };
Expand Down
2 changes: 1 addition & 1 deletion fdaPDE/utils/type_erasure.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#ifndef __TYPE_ERASURE_H__
#define __TYPE_ERASURE_H__

#include<utility>
#include "assert.h"
#include "traits.h"

Expand Down

0 comments on commit 106f711

Please sign in to comment.