Skip to content

Commit

Permalink
Merge pull request #267 from ckoehn84/master
Browse files Browse the repository at this point in the history
Added 3D output function
  • Loading branch information
wdeconinck committed May 27, 2015
2 parents fdbdaf6 + 402775f commit 523e10b
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 5 deletions.
44 changes: 39 additions & 5 deletions cf3/mesh/LagrangeP1/Tetra.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,51 @@ const RealMatrix& Tetra::local_coordinates()
static const RealMatrix loc_coord =
(RealMatrix(nb_nodes, dimensionality) <<

0., 0., 0.,
1., 0., 0.,
0., 1., 0.,
0., 0., 1.

0., 0., 0.,
1., 0., 0.,
0., 1., 0.,
0., 0., 1.
).finished();
return loc_coord;
}

////////////////////////////////////////////////////////////////////////////////

const RealMatrix& Tetra::mononomial_coefficients()
{
static const RealMatrix coeffs=
(RealMatrix(nb_nodes, nb_nodes) <<


1., -1., -1., -1.,
0., 1., 0., 0.,
0., 0., 1., 0.,
0., 0., 0., 1.

).finished();
return coeffs;
}

////////////////////////////////////////////////////////////////////////////////

const RealMatrix& Tetra::mononomial_exponents()
{
static const RealMatrix exponents=
(RealMatrix(nb_nodes, dimensionality) <<

0, 0, 0,
1, 0, 0,
0, 1, 0,
0, 0, 1

).finished();
return exponents;
}

////////////////////////////////////////////////////////////////////////////////


} // LagrangeP1
} // mesh
} // cf3
2 changes: 2 additions & 0 deletions cf3/mesh/LagrangeP1/Tetra.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ struct Mesh_LagrangeP1_API Tetra : public ShapeFunctionBase<Tetra,Tetra_traits>
static const RealMatrix& local_coordinates();
static void compute_value(const MappedCoordsT& mapped_coord, ValueT& result);
static void compute_gradient(const MappedCoordsT& mapped_coord, GradientT& result);
static const RealMatrix& mononomial_coefficients();
static const RealMatrix& mononomial_exponents();
};

////////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 523e10b

Please sign in to comment.