Select Git revision
Forked from
gmsh / gmsh
Source project has a limited visibility.
-
Christophe Geuzaine authored
No commit message
Christophe Geuzaine authoredNo commit message
InterfaceField.h 2.32 KiB
#ifndef H_GMSHDDM_INTERFACEFIELD
#define H_GMSHDDM_INTERFACEFIELD
#include "Interface.h"
#include <gmshfem/FieldInterface.h>
#include <string>
#include <unordered_map>
#include <vector>
namespace gmshddm
{
namespace field
{
template< class T_Scalar >
class InterfaceFieldInterface
{
protected:
std::string _name;
public:
InterfaceFieldInterface(const std::string &name = "");
virtual ~InterfaceFieldInterface();
virtual bool isDefined(const unsigned int i, const unsigned int j) const = 0;
virtual const gmshfem::field::FieldInterface< T_Scalar > &operator()(const unsigned int i, const unsigned int j) const = 0;
virtual gmshfem::field::FieldInterface< T_Scalar > &operator()(const unsigned int i, const unsigned int j) = 0;
std::string name() const;
};
template< class T_Scalar, gmshfem::field::Form T_Form >
class InterfaceField : public InterfaceFieldInterface< T_Scalar >
{
std::vector< std::unordered_map< unsigned int, gmshfem::field::Field< T_Scalar, T_Form > > > _fields;
public:
InterfaceField();
InterfaceField(const std::string &name, const domain::Interface &domains, const gmshfem::field::FunctionSpaceOfForm< T_Form > &type, const unsigned int degree = 1);
InterfaceField(const std::string &name, const domain::Interface &domains, const gmshfem::field::FunctionSpaceOfForm< T_Form > &type, const std::vector<unsigned int> & degree);
InterfaceField(const std::string &name, const domain::Interface &domains, const gmshfem::field::FunctionSpaceOfForm< T_Form > &type, const std::vector<std::vector<unsigned int>> & degree);
InterfaceField(const InterfaceField< T_Scalar, T_Form > &other);
InterfaceField(InterfaceField< T_Scalar, T_Form > &&other);
~InterfaceField();
InterfaceField &operator=(const InterfaceField< T_Scalar, T_Form > &other);
gmshfem::field::Form form() const;
bool isDefined(const unsigned int i, const unsigned int j) const override;
const gmshfem::field::Field< T_Scalar, T_Form > &operator()(const unsigned int i, const unsigned int j) const override;
gmshfem::field::Field< T_Scalar, T_Form > &operator()(const unsigned int i, const unsigned int j) override;
};
} // namespace field
} // namespace gmshddm
#endif // H_GMSHDDM_INTERFACEFIELD