aslFDElasticity.h
Go to the documentation of this file.
/*
* Advanced Simulation Library <http://asl.org.il>
*
* Copyright 2015 Avtech Scientific <http://avtechscientific.com>
*
*
* This file is part of Advanced Simulation Library (ASL).
*
* ASL is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, version 3 of the License.
*
* ASL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with ASL. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef ASLFDELASTICITY_H
#define ASLFDELASTICITY_H
#include "aslNumMethod.h"
#include "acl/aclMath/aclVectorOfElementsDef.h"
namespace acl{
class Kernel;
class VectorOfElementsData;
}
namespace asl
{
class VectorTemplate;
class TemplateVE;
template <typename V> class DataWithGhostNodes;
typedef DataWithGhostNodes<acl::VectorOfElementsData> DataWithGhostNodesACLData;
typedef std::shared_ptr<DataWithGhostNodesACLData> SPDataWithGhostNodesACLData;
typedef DataWithGhostNodes<acl::VectorOfElements> DataWithGhostNodesACL;
typedef std::shared_ptr<DataWithGhostNodesACL> SPDataWithGhostNodesACL;
namespace elasticity
{
acl::VectorOfElements strain(vector<TemplateVE> & displacment);
acl::VectorOfElements stressLinear(acl::VectorOfElements & strain);
// VectorOfElements linearEqLaplasTerm(TemplateVE displacment);
}
class ElasticityCommonA: public NumMethod
{
public:
typedef SPDataWithGhostNodesACLData Data;
typedef acl::VectorOfElements Param;
protected:
std::unique_ptr<acl::Kernel> kernel;
Data displacementData;
Data displacementInternalData;
Param bulkModulus;
Param shearModulus;
Param force;
public:
const VectorTemplate* vectorTemplate;
ElasticityCommonA();
ElasticityCommonA(Data d, Param bM, Param sM, const VectorTemplate* vT);
~ElasticityCommonA();
void setVectorTemplate(const VectorTemplate* vT);
VectorTemplate getVectorTemplate();
virtual void init()=0;
virtual void execute()=0;
void setForce(Param f);
inline Data getDisplacementData() const;
inline Data getDisplacementInternalData() const;
inline const Param getBulkModulus() const;
inline const Param getShearModulus() const;
};
class FDElasticityIncompressibleStatic: public ElasticityCommonA
{
private:
Data pressure;
Data pressureInternalData;
public:
FDElasticityIncompressibleStatic();
FDElasticityIncompressibleStatic(Data d, Param bM, Param sM, const VectorTemplate* vT);
~FDElasticityIncompressibleStatic();
virtual void init();
virtual void execute();
inline Data getPressureData() const;
};
typedef std::shared_ptr<FDElasticityIncompressibleStatic> SPFDElasticityIncompressibleStatic;
class FDElasticityRelaxation: public ElasticityCommonA
{
private:
Data pressure;
Data pressureInternalData;
Param deltat;
Param dumpingFactor;
public:
FDElasticityRelaxation();
FDElasticityRelaxation(Data d, Param bM, Param sM, Param dt, const VectorTemplate* vT);
~FDElasticityRelaxation();
virtual void init();
virtual void execute();
inline Data getPressureData() const;
inline Param getDeltat() const;
void setDumpingFactor(Param dumpF);
};
typedef std::shared_ptr<FDElasticityRelaxation> SPFDElasticityRelaxation;
class FDElasticity2: public ElasticityCommonA
{
private:
// VData velocityData;
Param deltat;
Param dumpingFactor;
public:
FDElasticity2();
FDElasticity2(Data d, Param bM, Param sM,
Param dt, const VectorTemplate* vT);
~FDElasticity2();
virtual void init();
virtual void execute();
// inline VData getVelocityData() const;
inline Param getDeltat() const;
void setDumpingFactor(Param dumpF);
};
typedef std::shared_ptr<FDElasticity2> SPFDElasticity2;
unsigned int nD(const ElasticityCommonA & e);
SPFDElasticity2 generateFDElasticity(SPDataWithGhostNodesACLData d,
double bM,
double sM,
double dt,
const VectorTemplate* vT);
SPFDElasticityIncompressibleStatic generateFDElasticityStatic(SPDataWithGhostNodesACLData d,
double bM,
double sM,
const VectorTemplate* vT);
SPFDElasticityRelaxation generateFDElasticityRelax(SPDataWithGhostNodesACLData d,
double bM,
double sM,
double dt,
const VectorTemplate* vT);
//-------------------------IMPLEMENTATION------------------------
inline ElasticityCommonA::Data
ElasticityCommonA::getDisplacementData() const
{
return displacementData;
}
inline ElasticityCommonA::Data ElasticityCommonA::getDisplacementInternalData() const
{
return displacementInternalData;
}
inline const ElasticityCommonA::Param
ElasticityCommonA::getBulkModulus() const
{
return bulkModulus;
}
inline const ElasticityCommonA::Param
ElasticityCommonA::getShearModulus() const
{
return shearModulus;
}
inline ElasticityCommonA::Data
FDElasticityIncompressibleStatic::getPressureData() const
{
return pressure;
}
inline FDElasticityRelaxation::Data
FDElasticityRelaxation::getPressureData() const
{
return pressure;
}
inline FDElasticity2::Param FDElasticity2::getDeltat() const
{
return deltat;
}
} // asl
#endif // ASLFDELASTICITY_H
acl::VectorOfElements
The class represents several Element.
Definition: aclVectorOfElementsDef.h:92
asl::ElasticityCommonA
abstract class for elasticity solver
Definition: aslFDElasticity.h:55
asl::ElasticityCommonA::vectorTemplate
const VectorTemplate * vectorTemplate
Definition: aslFDElasticity.h:69
asl::ElasticityCommonA::force
Param force
Definition: aslFDElasticity.h:67
asl::ElasticityCommonA::ElasticityCommonA
ElasticityCommonA()
asl::ElasticityCommonA::setForce
void setForce(Param f)
asl::ElasticityCommonA::init
virtual void init()=0
Builds the necesery internal data and kernels.
asl::ElasticityCommonA::ElasticityCommonA
ElasticityCommonA(Data d, Param bM, Param sM, const VectorTemplate *vT)
asl::ElasticityCommonA::execute
virtual void execute()=0
Executes the numerical procedure.
asl::ElasticityCommonA::setVectorTemplate
void setVectorTemplate(const VectorTemplate *vT)
asl::ElasticityCommonA::bulkModulus
Param bulkModulus
Definition: aslFDElasticity.h:65
asl::ElasticityCommonA::shearModulus
Param shearModulus
Definition: aslFDElasticity.h:66
asl::ElasticityCommonA::getDisplacementInternalData
Data getDisplacementInternalData() const
Definition: aslFDElasticity.h:226
asl::ElasticityCommonA::Param
acl::VectorOfElements Param
Definition: aslFDElasticity.h:58
asl::ElasticityCommonA::displacementData
Data displacementData
Definition: aslFDElasticity.h:62
asl::ElasticityCommonA::getShearModulus
const Param getShearModulus() const
Definition: aslFDElasticity.h:238
asl::ElasticityCommonA::Data
SPDataWithGhostNodesACLData Data
Definition: aslFDElasticity.h:57
asl::ElasticityCommonA::getDisplacementData
Data getDisplacementData() const
Definition: aslFDElasticity.h:221
asl::ElasticityCommonA::displacementInternalData
Data displacementInternalData
Definition: aslFDElasticity.h:63
asl::ElasticityCommonA::getBulkModulus
const Param getBulkModulus() const
Definition: aslFDElasticity.h:232
asl::ElasticityCommonA::kernel
std::unique_ptr< acl::Kernel > kernel
Definition: aslFDElasticity.h:60
asl::ElasticityCommonA::~ElasticityCommonA
~ElasticityCommonA()
asl::ElasticityCommonA::getVectorTemplate
VectorTemplate getVectorTemplate()
asl::FDElasticity2
Numerical method which computes homogenious isotropic elasticity equation.
Definition: aslFDElasticity.h:167
asl::FDElasticity2::getDeltat
Param getDeltat() const
Definition: aslFDElasticity.h:255
asl::FDElasticity2::FDElasticity2
FDElasticity2(Data d, Param bM, Param sM, Param dt, const VectorTemplate *vT)
asl::FDElasticity2::init
virtual void init()
Builds the necesery internal data and kernels.
asl::FDElasticity2::FDElasticity2
FDElasticity2()
asl::FDElasticity2::execute
virtual void execute()
Executes the numerical procedure.
asl::FDElasticity2::setDumpingFactor
void setDumpingFactor(Param dumpF)
asl::FDElasticity2::~FDElasticity2
~FDElasticity2()
asl::FDElasticityIncompressibleStatic
Numerical method which computes homogenious isotropic elasticity equation.
Definition: aslFDElasticity.h:99
asl::FDElasticityIncompressibleStatic::~FDElasticityIncompressibleStatic
~FDElasticityIncompressibleStatic()
asl::FDElasticityIncompressibleStatic::FDElasticityIncompressibleStatic
FDElasticityIncompressibleStatic(Data d, Param bM, Param sM, const VectorTemplate *vT)
asl::FDElasticityIncompressibleStatic::init
virtual void init()
Builds the necesery internal data and kernels.
asl::FDElasticityIncompressibleStatic::execute
virtual void execute()
Executes the numerical procedure.
asl::FDElasticityIncompressibleStatic::getPressureData
Data getPressureData() const
Definition: aslFDElasticity.h:244
asl::FDElasticityIncompressibleStatic::FDElasticityIncompressibleStatic
FDElasticityIncompressibleStatic()
asl::FDElasticityRelaxation
Numerical method which computes homogenious isotropic elasticity equation.
Definition: aslFDElasticity.h:128
asl::FDElasticityRelaxation::FDElasticityRelaxation
FDElasticityRelaxation()
asl::FDElasticityRelaxation::getDeltat
Param getDeltat() const
asl::FDElasticityRelaxation::execute
virtual void execute()
Executes the numerical procedure.
asl::FDElasticityRelaxation::init
virtual void init()
Builds the necesery internal data and kernels.
asl::FDElasticityRelaxation::setDumpingFactor
void setDumpingFactor(Param dumpF)
asl::FDElasticityRelaxation::FDElasticityRelaxation
FDElasticityRelaxation(Data d, Param bM, Param sM, Param dt, const VectorTemplate *vT)
asl::FDElasticityRelaxation::getPressureData
Data getPressureData() const
Definition: aslFDElasticity.h:250
asl::FDElasticityRelaxation::~FDElasticityRelaxation
~FDElasticityRelaxation()
asl::NumMethod
Definition: aslNumMethod.h:35
asl::VectorTemplate
Defines set of vectros with several properties.
Definition: aslTemplates.h:88
asl::nD
const unsigned int nD(const Block &b)
Definition: aslBlocks.h:220
acl
Advanced Computational Language.
Definition: acl.h:41
asl::elasticity::strain
acl::VectorOfElements strain(vector< TemplateVE > &displacment)
asl::elasticity::stressLinear
acl::VectorOfElements stressLinear(acl::VectorOfElements &strain)
asl
Advanced Simulation Library.
Definition: aslDataInc.h:31
asl::DataWithGhostNodesACLData
DataWithGhostNodes< acl::VectorOfElementsData > DataWithGhostNodesACLData
Definition: aslGenerators.h:45
asl::SPFDElasticity2
std::shared_ptr< FDElasticity2 > SPFDElasticity2
Definition: aslFDElasticity.h:193
asl::SPFDElasticityIncompressibleStatic
std::shared_ptr< FDElasticityIncompressibleStatic > SPFDElasticityIncompressibleStatic
Definition: aslFDElasticity.h:120
asl::generateFDElasticityStatic
SPFDElasticityIncompressibleStatic generateFDElasticityStatic(SPDataWithGhostNodesACLData d, double bM, double sM, const VectorTemplate *vT)
asl::generateFDElasticity
SPFDElasticity2 generateFDElasticity(SPDataWithGhostNodesACLData d, double bM, double sM, double dt, const VectorTemplate *vT)
asl::DataWithGhostNodesACL
DataWithGhostNodes< acl::VectorOfElements > DataWithGhostNodesACL
Definition: aslGenerators.h:48
asl::SPDataWithGhostNodesACL
std::shared_ptr< DataWithGhostNodesACL > SPDataWithGhostNodesACL
Definition: aslGenerators.h:49
asl::SPDataWithGhostNodesACLData
std::shared_ptr< DataWithGhostNodesACLData > SPDataWithGhostNodesACLData
Definition: aslGenerators.h:47
asl::SPFDElasticityRelaxation
std::shared_ptr< FDElasticityRelaxation > SPFDElasticityRelaxation
Definition: aslFDElasticity.h:154
asl::generateFDElasticityRelax
SPFDElasticityRelaxation generateFDElasticityRelax(SPDataWithGhostNodesACLData d, double bM, double sM, double dt, const VectorTemplate *vT)
aslNumMethod.h