Skip to content

Commit

Permalink
fix syntax for monomials
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulSt committed Apr 28, 2023
1 parent e6c8057 commit becf3a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/monomialfespace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,6 @@ void ExportMonomialFESpace (py::module m)

ExportFESpace<MonomialFESpace> (m, "monomialfespace")
.def ("GetDocu", &MonomialFESpace::GetDocu)
.def ("SetWavespeed", &MonomialFESpace::SetWavespeed);
.def ("SetCoeff", &MonomialFESpace::SetCoeff);
}
#endif // NGS_PYTHON
10 changes: 5 additions & 5 deletions src/monomialfespace.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ namespace ngcomp
int nel;
int local_ndof;
int useshift = 1;
shared_ptr<CoefficientFunction> wavespeedcf;
shared_ptr<CoefficientFunction> coeff_cf = nullptr;
CSR basismat;

public:
MonomialFESpace (shared_ptr<MeshAccess> ama, const Flags &flags,
bool checkflags = false);

void SetWavespeed (shared_ptr<CoefficientFunction> awavespeedcf)
void SetCoeff (shared_ptr<CoefficientFunction> acoeff_cf)
{
wavespeedcf = awavespeedcf;
coeff_cf = acoeff_cf;
}

string GetClassName () const override { return "monomialfespace"; }
Expand Down Expand Up @@ -69,9 +69,9 @@ namespace ngcomp
ElementTransformation &trafo = ma->GetTrafo (ei, lh);
MappedIntegrationPoint<D, D> mip (ir[0], trafo);
mip.Point () = v1;
double c1 = wavespeedcf ? wavespeedcf->Evaluate (mip) : 1.0;
double c1 = coeff_cf ? coeff_cf->Evaluate (mip) : 1.0;
mip.Point () = v2;
double c2 = wavespeedcf ? wavespeedcf->Evaluate (mip) : 1.0;
double c2 = coeff_cf ? coeff_cf->Evaluate (mip) : 1.0;

anisotropicdiam = max (
anisotropicdiam,
Expand Down

0 comments on commit becf3a3

Please sign in to comment.