added: convenience wrapper class for multi-patch generator usage in applications
note: does not instance for 1D
This commit is contained in:
parent
1791d22e91
commit
1adfcf1804
34
Apps/Common/SIMMultiPatchModelGen.C
Normal file
34
Apps/Common/SIMMultiPatchModelGen.C
Normal file
@ -0,0 +1,34 @@
|
||||
// $Id$
|
||||
//==============================================================================
|
||||
//!
|
||||
//! \file SIMMultiPatchModelGen.C
|
||||
//!
|
||||
//! \date Sep 5 2016
|
||||
//!
|
||||
//! \author Arne Morten Kvarving / SINTEF
|
||||
//!
|
||||
//! \brief Base class for simulators equipped with multi-patch model generators.
|
||||
//!
|
||||
//==============================================================================
|
||||
|
||||
#include "SIMMultiPatchModelGen.h"
|
||||
#include "MultiPatchModelGenerator.h"
|
||||
#include "IFEM.h"
|
||||
#include "SIM2D.h"
|
||||
#include "SIM3D.h"
|
||||
|
||||
|
||||
template<>
|
||||
ModelGenerator* SIMMultiPatchModelGen<SIM2D>::createModelGenerator(const TiXmlElement* geo) const
|
||||
{
|
||||
IFEM::cout <<" Using multi-patch model generator" << std::endl;
|
||||
return new MultiPatchModelGenerator2D(geo);
|
||||
}
|
||||
|
||||
|
||||
template<>
|
||||
ModelGenerator* SIMMultiPatchModelGen<SIM3D>::createModelGenerator(const TiXmlElement* geo) const
|
||||
{
|
||||
IFEM::cout <<" Using multi-patch model generator" << std::endl;
|
||||
return new MultiPatchModelGenerator3D(geo);
|
||||
}
|
45
Apps/Common/SIMMultiPatchModelGen.h
Normal file
45
Apps/Common/SIMMultiPatchModelGen.h
Normal file
@ -0,0 +1,45 @@
|
||||
// $Id$
|
||||
//==============================================================================
|
||||
//!
|
||||
//! \file SIMMultiPatchModelGen.h
|
||||
//!
|
||||
//! \date Sep 5 2016
|
||||
//!
|
||||
//! \author Arne Morten Kvarving / SINTEF
|
||||
//!
|
||||
//! \brief Base class for simulators equipped with multi-patch model generators.
|
||||
//!
|
||||
//==============================================================================
|
||||
|
||||
#ifndef _SIM_MULTI_PATCH_MODEL_GEN_H_
|
||||
#define _SIM_MULTI_PATCH_MODEL_GEN_H_
|
||||
|
||||
#include "SIMbase.h"
|
||||
|
||||
|
||||
/*!
|
||||
\brief Inherit this class to equip your SIM with multi-patch model generators.
|
||||
*/
|
||||
|
||||
template<class Dim>
|
||||
class SIMMultiPatchModelGen : public Dim
|
||||
{
|
||||
public:
|
||||
//! \brief Constructor for standard problems.
|
||||
//! \param[in] n1 Number of fields
|
||||
SIMMultiPatchModelGen(int n1) : Dim(n1) {}
|
||||
|
||||
//! \brief Constructor for mixed problems.
|
||||
//! \param[in] unf Number of fields on bases
|
||||
SIMMultiPatchModelGen(const SIMbase::CharVec& unf) : Dim(unf) {}
|
||||
|
||||
//! \brief Empty destructor.
|
||||
virtual ~SIMMultiPatchModelGen() {}
|
||||
|
||||
protected:
|
||||
//! \brief Instantiate a generator for the finite element model.
|
||||
//! \param[in] geo XML element containing geometry defintion
|
||||
ModelGenerator* createModelGenerator(const TiXmlElement* geo) const override;
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user