/* * Advanced Simulation Library * * Copyright 2015 Avtech Scientific * * * 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 . * */ #ifndef TEMPLATEVE_H_INCLUDED #define TEMPLATEVE_H_INCLUDED #include #include "data/aslDataWithGhostNodes.h" #include "aslTemplatesExtras.h" #include "aslDistanceFunction.h" /** \defgroup DifferentialOpperators Differential Operrators */ namespace asl { /// This class contains VectorOfElements which corresponds to values of a field in littice nodes /** This class contains VectorOfElements (VE) with PrivateVariables. This list should be added to the kernel before use as follows: \code Kernel kernel; TemplateVE a; kernel< & a); /// differential operator \f$ \nabla \cdot (\vec a c) \f$ \ingroup DifferentialOpperators /** This is a discret approximation discribef by the following expression: \f[ \nabla_\alpha (v_\alpha c) = \frac{1}{2}\sum_i w_i a_{i\alpha} (v_{0\alpha}+v_{i\alpha})(c_0+c_i) ) \f] where \f$ w_i \f$ are coefficients corresponding to a gradient ones */ acl::VectorOfElements divProduct(const vector & a, const TemplateVE & c); /// differential operator \f$ \nabla \cdot \vec a \f$ \ingroup DifferentialOpperators acl::VectorOfElements div(const TemplateVE & ax, const TemplateVE & ay); /// differential operator \f$ \nabla \cdot \vec a \f$ \ingroup DifferentialOpperators acl::VectorOfElements div(const TemplateVE & ax, const TemplateVE & ay, const TemplateVE & az); /// differential operator \f$ \nabla_i \nabla_j a \f$ \ingroup DifferentialOpperators acl::VectorOfElements dIdJ(unsigned int i, unsigned int j, const TemplateVE & a); /// generates expresion for bilinear interpolation the template should be an elementary cell acl::VectorOfElements interpolate(const TemplateVE & a, acl::VectorOfElements e); }// asl #endif // TEMPLATEVE_H_INCLUDED