Revision 94f5e4b08825a205ce6c3826165748460df7ea0c authored by Wenqing Wang on 27 January 2021, 16:29:48 UTC, committed by Wenqing Wang on 02 February 2021, 09:18:06 UTC
1 parent 3a3a77d
HTLocalAssemblerInterface.h
/**
* \copyright
* Copyright (c) 2012-2021, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
* \file
* Created on October 11, 2017, 1:35 PM
*/
#pragma once
#include "NumLib/Extrapolation/ExtrapolatableElement.h"
#include "NumLib/Function/Interpolation.h"
#include "ProcessLib/LocalAssemblerInterface.h"
#include "MathLib/LinAlg/Eigen/EigenMapTools.h"
namespace ProcessLib
{
struct CoupledSolutionsForStaggeredScheme;
namespace HT
{
template <typename NodalRowVectorType, typename GlobalDimNodalMatrixType>
struct IntegrationPointData final
{
IntegrationPointData(NodalRowVectorType N_,
GlobalDimNodalMatrixType dNdx_,
double const& integration_weight_)
: N(std::move(N_)),
dNdx(std::move(dNdx_)),
integration_weight(integration_weight_)
{
}
NodalRowVectorType const N;
GlobalDimNodalMatrixType const dNdx;
double const integration_weight;
EIGEN_MAKE_ALIGNED_OPERATOR_NEW;
};
class HTLocalAssemblerInterface : public ProcessLib::LocalAssemblerInterface,
public NumLib::ExtrapolatableElement
{
public:
HTLocalAssemblerInterface() = default;
void setStaggeredCoupledSolutions(
std::size_t const /*mesh_item_id*/,
CoupledSolutionsForStaggeredScheme* const coupling_term)
{
_coupled_solutions = coupling_term;
}
virtual std::vector<double> const& getIntPtDarcyVelocity(
const double /*t*/,
std::vector<GlobalVector*> const& x,
std::vector<NumLib::LocalToGlobalIndexMap const*> const& /*dof_table*/,
std::vector<double>& /*cache*/) const = 0;
Eigen::Vector3d getFlux(MathLib::Point3d const& pnt_local_coords,
double const t,
std::vector<double> const& local_x) const override =
0;
protected:
// TODO: remove _coupled_solutions or move integration point data from
// local assembler class to a new class to make local assembler unique
// for each process.
/** Pointer to CoupledSolutionsForStaggeredScheme that is set in a
* member of Process class,
* setCoupledTermForTheStaggeredSchemeToLocalAssemblers. It is used for
* calculate the secondary variables like velocity for coupled
* processes.
*/
CoupledSolutionsForStaggeredScheme* _coupled_solutions{nullptr};
};
} // namespace HT
} // namespace ProcessLib
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...