Commit 1a0afd09 authored by Phillip Lino Rall's avatar Phillip Lino Rall
Browse files

added missing files of christopg version

parent e3552c96
/**********************************************************************************
* Copyright 2010 Christoph Pflaum
* Department Informatik Lehrstuhl 10 - Systemsimulation
* Friedrich-Alexander Universität Erlangen-Nürnberg
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**********************************************************************************/
#include "StiffMatrixFunctors.h"
/**********************************************************************************
* Copyright 2010 Christoph Pflaum
* Department Informatik Lehrstuhl 10 - Systemsimulation
* Friedrich-Alexander Universität Erlangen-Nürnberg
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**********************************************************************************/
#ifndef STIFFMATRIXFUNCTORS_H
# define STIFFMATRIXFUNCTORS_H
class StiffMatFunctor_Counter
{
public:
StiffMatFunctor_Counter();
}
#endif //STIFFMATRIXFUNCTORS_H
/**********************************************************************************
* Copyright 2010 Christoph Pflaum
* Department Informatik Lehrstuhl 10 - Systemsimulation
* Friedrich-Alexander Universität Erlangen-Nürnberg
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**********************************************************************************/
#ifndef STIFF_MATRIX_H
# define STIFF_MATRIX_H
template<Class DTyp>
class StiffMatrix {
public:
StiffMatrix ( Local_stiffness_matrix<Dtyp> );
private:
Blockgrid *blockgrid;
Variable<int> *GridCount;
protected:
};
#include "Stiff_Matrix_cc.h"
#endif //STIFF_MATRIX_H
/**********************************************************************************
* Copyright 2010 Christoph Pflaum
* Department Informatik Lehrstuhl 10 - Systemsimulation
* Friedrich-Alexander Universität Erlangen-Nürnberg
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**********************************************************************************/
#ifndef STIFF_MATRIX_H
#error File should only be included from within Stiff_Matrix.h
#else
template<Class DTyp>
StiffMatrix::StiffMatrix ( Local_stiffness_matrix<Dtyp> LS_M){
blockgrid = LS_M->Give_blockgrid();
}
#endif
/**********************************************************************************
* Copyright 2010 Christoph Pflaum
* Department Informatik Lehrstuhl 10 - Systemsimulation
* Friedrich-Alexander Universität Erlangen-Nürnberg
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**********************************************************************************/
// ------------------------------------------------------------
//
// diffbo.h
//
// ------------------------------------------------------------
#ifndef DIFFBO_H
#define DIFFBO_H
template <typename TYPE2>
template <class B>
void Local_stiffness_matrix<TYPE2>::Calculate_boundary ( const B& bilinear_form ) {
int ux, uy, uz, vx, vy, vz, u, v;
int Nx, Ny, Nz, N_total;
Unstructured_grid *ug;
Hexahedron_el *hex;
std::vector<std::vector<TYPE2> > loc_stiff;
std::vector<double> points ( 12, 0. ); //Länge 12
_COLSAMM_::ELEMENTS::_Quadrangle3D_2<_COLSAMM_::Gauss2, TYPE2> G;
//_COLSAMM_::ELEMENTS::_Quadrangle3D_<_COLSAMM_::Gauss2,TYPE2> G;
ug = blockgrid->Give_unstructured_grid();
for ( int id = 0;id < ug->Give_number_hexahedra();++id ) {
if ( ug->Give_hexahedron ( id )->my_object ( my_rank ) ) {
hex = ug->Give_hexahedron ( id );
Nx = blockgrid->Give_Nx_hexahedron ( id );
Ny = blockgrid->Give_Ny_hexahedron ( id );
Nz = blockgrid->Give_Nz_hexahedron ( id );
N_total = Nx * Ny * Nz * 64;
for ( int i = 0;i < Nx;++i ) for ( int j = 0;j < Ny;++j ) for ( int k = 0;k < Nz;++k ) {
for ( v = 0;v < 8;++v ) for ( u = 0;u < 8;++u )
loc_m_hexahedra[id][Ind_loc_matrix_hexahedra ( i,j,k ) *64+8*v+u] = 0.0;
}
if ( ug->Give_quadrangle ( hex->Give_id_quadrangle ( Wdir3D ) )->Give_exists_exterior() == false ) {
for ( int k = 0;k < Nz;++k )
for ( int j = 0;j < Ny;++j ) {
int i = 0;
points[0] = blockgrid->Give_coord_hexahedron ( id, i, j, k ).x;
points[1] = blockgrid->Give_coord_hexahedron ( id, i, j, k ).y;
points[2] = blockgrid->Give_coord_hexahedron ( id, i, j, k ).z;
points[3] = blockgrid->Give_coord_hexahedron ( id, i, j + 1, k ).x;
points[4] = blockgrid->Give_coord_hexahedron ( id, i, j + 1, k ).y;
points[5] = blockgrid->Give_coord_hexahedron ( id, i, j + 1, k ).z;
points[6] = blockgrid->Give_coord_hexahedron ( id, i, j, k + 1 ).x;
points[7] = blockgrid->Give_coord_hexahedron ( id, i, j, k + 1 ).y;
points[8] = blockgrid->Give_coord_hexahedron ( id, i, j, k + 1 ).z;
points[9] = blockgrid->Give_coord_hexahedron ( id, i, j + 1, k + 1 ).x;
points[10] = blockgrid->Give_coord_hexahedron ( id, i, j + 1, k + 1 ).y;
points[11] = blockgrid->Give_coord_hexahedron ( id, i, j + 1, k + 1 ).z;
G ( points );
loc_stiff = G.integrate ( bilinear_form );
ux = vx = 0;
for ( vy = 0;vy < 2;++vy ) for ( vz = 0;vz < 2;++vz )
for ( uy = 0;uy < 2;++uy ) for ( uz = 0;uz < 2;++uz )
loc_m_hexahedra[id][Ind_loc_matrix_hexahedra ( i,j,k ) *64+8* ( 4*vz+2*vy+vx ) + ( 4*uz+2*uy+ux ) ]
+= loc_stiff[2*uz+uy][2*vz+vy];
}
}
if ( ug->Give_quadrangle ( hex->Give_id_quadrangle ( Edir3D ) )->Give_exists_exterior() == false ) {
for ( int k = 0;k < Nz;++k )
for ( int j = 0;j < Ny;++j ) {
int i = Nx - 1;
points[0] = blockgrid->Give_coord_hexahedron ( id, i + 1, j, k ).x;
points[1] = blockgrid->Give_coord_hexahedron ( id, i + 1, j, k ).y;
points[2] = blockgrid->Give_coord_hexahedron ( id, i + 1, j, k ).z;
points[3] = blockgrid->Give_coord_hexahedron ( id, i + 1, j + 1, k ).x;
points[4] = blockgrid->Give_coord_hexahedron ( id, i + 1, j + 1, k ).y;
points[5] = blockgrid->Give_coord_hexahedron ( id, i + 1, j + 1, k ).z;
points[6] = blockgrid->Give_coord_hexahedron ( id, i + 1, j, k + 1 ).x;
points[7] = blockgrid->Give_coord_hexahedron ( id, i + 1, j, k + 1 ).y;
points[8] = blockgrid->Give_coord_hexahedron ( id, i + 1, j, k + 1 ).z;
points[9] = blockgrid->Give_coord_hexahedron ( id, i + 1, j + 1, k + 1 ).x;
points[10] = blockgrid->Give_coord_hexahedron ( id, i + 1, j + 1, k + 1 ).y;
points[11] = blockgrid->Give_coord_hexahedron ( id, i + 1, j + 1, k + 1 ).z;
G ( points );
loc_stiff = G.integrate ( bilinear_form );
ux = vx = 1;
for ( vy = 0;vy < 2;++vy ) for ( vz = 0;vz < 2;++vz )
for ( uy = 0;uy < 2;++uy ) for ( uz = 0;uz < 2;++uz )
loc_m_hexahedra[id][Ind_loc_matrix_hexahedra ( i,j,k ) *64+8* ( 4*vz+2*vy+vx ) + ( 4*uz+2*uy+ux ) ]
+= loc_stiff[2*uz+uy][2*vz+vy];
}
}
if ( ug->Give_quadrangle ( hex->Give_id_quadrangle ( Sdir3D ) )->Give_exists_exterior() == false ) {
for ( int k = 0;k < Nz;++k )
for ( int i = 0;i < Nx;++i ) {
int j = 0;
points[0] = blockgrid->Give_coord_hexahedron ( id, i, j, k ).x;
points[1] = blockgrid->Give_coord_hexahedron ( id, i, j, k ).y;
points[2] = blockgrid->Give_coord_hexahedron ( id, i, j, k ).z;
points[3] = blockgrid->Give_coord_hexahedron ( id, i + 1, j, k ).x;
points[4] = blockgrid->Give_coord_hexahedron ( id, i + 1, j, k ).y;
points[5] = blockgrid->Give_coord_hexahedron ( id, i + 1, j, k ).z;
points[6] = blockgrid->Give_coord_hexahedron ( id, i, j, k + 1 ).x;
points[7] = blockgrid->Give_coord_hexahedron ( id, i, j, k + 1 ).y;
points[8] = blockgrid->Give_coord_hexahedron ( id, i, j, k + 1 ).z;
points[9] = blockgrid->Give_coord_hexahedron ( id, i + 1, j, k + 1 ).x;
points[10] = blockgrid->Give_coord_hexahedron ( id, i + 1, j, k + 1 ).y;
points[11] = blockgrid->Give_coord_hexahedron ( id, i + 1, j, k + 1 ).z;
G ( points );
loc_stiff = G.integrate ( bilinear_form );
uy = vy = 0;
for ( vx = 0;vx < 2;++vx ) for ( vz = 0;vz < 2;++vz )
for ( ux = 0;ux < 2;++ux ) for ( uz = 0;uz < 2;++uz )
loc_m_hexahedra[id][Ind_loc_matrix_hexahedra ( i,j,k ) *64+8* ( 4*vz+2*vy+vx ) + ( 4*uz+2*uy+ux ) ]
+= loc_stiff[2*uz+ux][2*vz+vx];
}
}
if ( ug->Give_quadrangle ( hex->Give_id_quadrangle ( Ndir3D ) )->Give_exists_exterior() == false ) {
for ( int k = 0;k < Nz;++k )
for ( int i = 0;i < Nx;++i ) {
int j = Ny - 1;
points[0] = blockgrid->Give_coord_hexahedron ( id, i, j + 1, k ).x;
points[1] = blockgrid->Give_coord_hexahedron ( id, i, j + 1, k ).y;
points[2] = blockgrid->Give_coord_hexahedron ( id, i, j + 1, k ).z;
points[3] = blockgrid->Give_coord_hexahedron ( id, i + 1, j + 1, k ).x;
points[4] = blockgrid->Give_coord_hexahedron ( id, i + 1, j + 1, k ).y;
points[5] = blockgrid->Give_coord_hexahedron ( id, i + 1, j + 1, k ).z;
points[6] = blockgrid->Give_coord_hexahedron ( id, i, j + 1, k + 1 ).x;
points[7] = blockgrid->Give_coord_hexahedron ( id, i, j + 1, k + 1 ).y;
points[8] = blockgrid->Give_coord_hexahedron ( id, i, j + 1, k + 1 ).z;
points[9] = blockgrid->Give_coord_hexahedron ( id, i + 1, j + 1, k + 1 ).x;
points[10] = blockgrid->Give_coord_hexahedron ( id, i + 1, j + 1, k + 1 ).y;
points[11] = blockgrid->Give_coord_hexahedron ( id, i + 1, j + 1, k + 1 ).z;
G ( points );
loc_stiff = G.integrate ( bilinear_form );
uy = vy = 1;
for ( vx = 0;vx < 2;++vx ) for ( vz = 0;vz < 2;++vz )
for ( ux = 0;ux < 2;++ux ) for ( uz = 0;uz < 2;++uz )
loc_m_hexahedra[id][Ind_loc_matrix_hexahedra ( i,j,k ) *64+8* ( 4*vz+2*vy+vx ) + ( 4*uz+2*uy+ux ) ]
+= loc_stiff[2*uz+ux][2*vz+vx];
}
}
if ( ug->Give_quadrangle ( hex->Give_id_quadrangle ( Ddir3D ) )->Give_exists_exterior() == false ) {
for ( int j = 0;j < Ny;++j )
for ( int i = 0;i < Nx;++i ) {
int k = 0;
points[0] = blockgrid->Give_coord_hexahedron ( id, i, j, k ).x;
points[1] = blockgrid->Give_coord_hexahedron ( id, i, j, k ).y;
points[2] = blockgrid->Give_coord_hexahedron ( id, i, j, k ).z;
points[3] = blockgrid->Give_coord_hexahedron ( id, i + 1, j, k ).x;
points[4] = blockgrid->Give_coord_hexahedron ( id, i + 1, j, k ).y;
points[5] = blockgrid->Give_coord_hexahedron ( id, i + 1, j, k ).z;
points[6] = blockgrid->Give_coord_hexahedron ( id, i, j + 1, k ).x;
points[7] = blockgrid->Give_coord_hexahedron ( id, i, j + 1, k ).y;
points[8] = blockgrid->Give_coord_hexahedron ( id, i, j + 1, k ).z;
points[9] = blockgrid->Give_coord_hexahedron ( id, i + 1, j + 1, k ).x;
points[10] = blockgrid->Give_coord_hexahedron ( id, i + 1, j + 1, k ).y;
points[11] = blockgrid->Give_coord_hexahedron ( id, i + 1, j + 1, k ).z;
G ( points );
loc_stiff = G.integrate ( bilinear_form );
uz = vz = 0;
for ( vx = 0;vx < 2;++vx ) for ( vy = 0;vy < 2;++vy )
for ( ux = 0;ux < 2;++ux ) for ( uy = 0;uy < 2;++uy )
loc_m_hexahedra[id][Ind_loc_matrix_hexahedra ( i,j,k ) *64+8* ( 4*vz+2*vy+vx ) + ( 4*uz+2*uy+ux ) ]
+= loc_stiff[2*uy+ux][2*vy+vx];
}
}
if ( ug->Give_quadrangle ( hex->Give_id_quadrangle ( Tdir3D ) )->Give_exists_exterior() == false ) {
for ( int j = 0;j < Ny;++j )
for ( int i = 0;i < Nx;++i ) {
int k = Nz - 1;
points[0] = blockgrid->Give_coord_hexahedron ( id, i, j, k + 1 ).x;
points[1] = blockgrid->Give_coord_hexahedron ( id, i, j, k + 1 ).y;
points[2] = blockgrid->Give_coord_hexahedron ( id, i, j, k + 1 ).z;
points[3] = blockgrid->Give_coord_hexahedron ( id, i + 1, j, k + 1 ).x;
points[4] = blockgrid->Give_coord_hexahedron ( id, i + 1, j, k + 1 ).y;
points[5] = blockgrid->Give_coord_hexahedron ( id, i + 1, j, k + 1 ).z;
points[6] = blockgrid->Give_coord_hexahedron ( id, i, j + 1, k + 1 ).x;
points[7] = blockgrid->Give_coord_hexahedron ( id, i, j + 1, k + 1 ).y;
points[8] = blockgrid->Give_coord_hexahedron ( id, i, j + 1, k + 1 ).z;
points[9] = blockgrid->Give_coord_hexahedron ( id, i + 1, j + 1, k + 1 ).x;
points[10] = blockgrid->Give_coord_hexahedron ( id, i + 1, j + 1, k + 1 ).y;
points[11] = blockgrid->Give_coord_hexahedron ( id, i + 1, j + 1, k + 1 ).z;
G ( points );
loc_stiff = G.integrate ( bilinear_form );
uz = vz = 1;
for ( vx = 0;vx < 2;++vx ) for ( vy = 0;vy < 2;++vy )
for ( ux = 0;ux < 2;++ux ) for ( uy = 0;uy < 2;++uy )
loc_m_hexahedra[id][Ind_loc_matrix_hexahedra ( i,j,k ) *64+8* ( 4*vz+2*vy+vx ) + ( 4*uz+2*uy+ux ) ]
+= loc_stiff[2*uy+ux][2*vy+vx];
}
}
}
}
Update();
}
// Zum Testen und Spielen von Matthias eingefuegt, integriert alle rechten (in positiver z-richtung (Top)) Endflächen
template <typename TYPE2>
template <class B>
void Local_stiffness_matrix<TYPE2>::Calculate_all_right_boundaries(const B& bilinear_form) {
int ux,uy,uz,vx,vy,vz, u, v;
int Nx, Ny, Nz, N_total;
Unstructured_grid *ug;
Hexahedron_el *hex;
std::vector<std::vector<TYPE2> > loc_stiff;
std::vector<double> points(12,0.); //Länge 12
_COLSAMM_::ELEMENTS::_Quadrangle3D_2<_COLSAMM_::Gauss2,TYPE2> G;
//_COLSAMM_::ELEMENTS::_Quadrangle3D_<_COLSAMM_::Gauss2,TYPE2> G;
ug = blockgrid->Give_unstructured_grid();
for(int id=0;id<ug->Give_number_hexahedra();++id) {
if(ug->Give_hexahedron(id)->my_object(my_rank)) {
hex = ug->Give_hexahedron(id);
Nx = blockgrid->Give_Nx_hexahedron(id);
Ny = blockgrid->Give_Ny_hexahedron(id);
Nz = blockgrid->Give_Nz_hexahedron(id);
N_total = Nx * Ny * Nz * 64;
for(int i=0;i<Nx;++i) for(int j=0;j<Ny;++j) for(int k=0;k<Nz;++k) {
for(v=0;v<8;++v) for(u=0;u<8;++u)
loc_m_hexahedra[id][Ind_loc_matrix_hexahedra(i,j,k)*64+8*v+u] = 0.0;
}
for(int j=0;j<Ny;++j)
for(int i=0;i<Nx;++i) {
int k=Nz-1;
points[0] = blockgrid->Give_coord_hexahedron(id, i, j, k+1).x;
points[1] = blockgrid->Give_coord_hexahedron(id, i, j, k+1).y;
points[2] = blockgrid->Give_coord_hexahedron(id, i, j, k+1).z;
points[3] = blockgrid->Give_coord_hexahedron(id, i+1, j, k+1).x;
points[4] = blockgrid->Give_coord_hexahedron(id, i+1, j, k+1).y;
points[5] = blockgrid->Give_coord_hexahedron(id, i+1, j, k+1).z;
points[6] = blockgrid->Give_coord_hexahedron(id, i, j+1, k+1).x;
points[7] = blockgrid->Give_coord_hexahedron(id, i, j+1, k+1).y;
points[8] = blockgrid->Give_coord_hexahedron(id, i, j+1, k+1).z;
points[9] = blockgrid->Give_coord_hexahedron(id, i+1, j+1, k+1).x;
points[10] = blockgrid->Give_coord_hexahedron(id, i+1, j+1, k+1).y;
points[11] = blockgrid->Give_coord_hexahedron(id, i+1, j+1, k+1).z;
G(points);
loc_stiff = G.integrate(bilinear_form);
uz=vz=1;
for(vx=0;vx<2;++vx) for(vy=0;vy<2;++vy)
for(ux=0;ux<2;++ux) for(uy=0;uy<2;++uy)
loc_m_hexahedra[id][Ind_loc_matrix_hexahedra(i,j,k)*64+8*(4*vz+2*vy+vx)+(4*uz+2*uy+ux)]
+= loc_stiff[2*uy+ux][2*vy+vx];
}
}
}
Update();
}
// Zum Testen und Spielen von Matthias eingefuegt, integriert alle linken (in negativer z-richtung (Down)) Endflächen
template <typename TYPE2>
template <class B>
void Local_stiffness_matrix<TYPE2>::Calculate_all_left_boundaries(const B& bilinear_form) {
int ux,uy,uz,vx,vy,vz, u, v;
int Nx, Ny, Nz, N_total;
Unstructured_grid *ug;
Hexahedron_el *hex;
std::vector<std::vector<TYPE2> > loc_stiff;
std::vector<double> points(12,0.); //Länge 12
_COLSAMM_::ELEMENTS::_Quadrangle3D_2<_COLSAMM_::Gauss2,TYPE2> G;
//_COLSAMM_::ELEMENTS::_Quadrangle3D_<_COLSAMM_::Gauss2,TYPE2> G;
ug = blockgrid->Give_unstructured_grid();
for(int id=0;id<ug->Give_number_hexahedra();++id) {
if(ug->Give_hexahedron(id)->my_object(my_rank)) {
hex = ug->Give_hexahedron(id);
Nx = blockgrid->Give_Nx_hexahedron(id);
Ny = blockgrid->Give_Ny_hexahedron(id);
Nz = blockgrid->Give_Nz_hexahedron(id);
N_total = Nx * Ny * Nz * 64;
for(int i=0;i<Nx;++i) for(int j=0;j<Ny;++j) for(int k=0;k<Nz;++k) {
for(v=0;v<8;++v) for(u=0;u<8;++u)
loc_m_hexahedra[id][Ind_loc_matrix_hexahedra(i,j,k)*64+8*v+u] = 0.0;
}
for(int j=0;j<Ny;++j)
for(int i=0;i<Nx;++i) {
int k=0;
points[0] = blockgrid->Give_coord_hexahedron(id, i, j, k).x;
points[1] = blockgrid->Give_coord_hexahedron(id, i, j, k).y;
points[2] = blockgrid->Give_coord_hexahedron(id, i, j, k).z;
points[3] = blockgrid->Give_coord_hexahedron(id, i+1, j, k).x;
points[4] = blockgrid->Give_coord_hexahedron(id, i+1, j, k).y;
points[5] = blockgrid->Give_coord_hexahedron(id, i+1, j, k).z;
points[6] = blockgrid->Give_coord_hexahedron(id, i, j+1, k).x;
points[7] = blockgrid->Give_coord_hexahedron(id, i, j+1, k).y;
points[8] = blockgrid->Give_coord_hexahedron(id, i, j+1, k).z;
points[9] = blockgrid->Give_coord_hexahedron(id, i+1, j+1, k).x;
points[10] = blockgrid->Give_coord_hexahedron(id, i+1, j+1, k).y;
points[11] = blockgrid->Give_coord_hexahedron(id, i+1, j+1, k).z;
G(points);
loc_stiff = G.integrate(bilinear_form);
uz=vz=0;
for(vx=0;vx<2;++vx) for(vy=0;vy<2;++vy)
for(ux=0;ux<2;++ux) for(uy=0;uy<2;++uy)
loc_m_hexahedra[id][Ind_loc_matrix_hexahedra(i,j,k)*64+8*(4*vz+2*vy+vx)+(4*uz+2*uy+ux)]
+= loc_stiff[2*uy+ux][2*vy+vx];
}
}
}
Update();
}
#endif // DIFFBO_H
This diff is collapsed.
/**********************************************************************************
* Copyright 2010 Christoph Pflaum
* Department Informatik Lehrstuhl 10 - Systemsimulation
* Friedrich-Alexander Universität Erlangen-Nürnberg
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**********************************************************************************/
#ifndef DIFFOP_CC_H
#define DIFFOP_CC_H
template <typename TYPE2>
Expr_Diag_Local_stiffness_matrix<TYPE2> Local_stiffness_matrix<TYPE2>::diag ()
const {
return Expr_Diag_Local_stiffness_matrix<TYPE2>(loc_m_hexahedra,loc_m_interior_quadrangles,
loc_m_exterior_quadrangles,
loc_m_neighbor_edges,
loc_m_neighbor_points,
blockgrid);
}
template <typename TYPE2>
Local_stiffness_matrix<TYPE2>::Local_stiffness_matrix(Blockgrid& bg_) {
blockgrid = &bg_;
Unstructured_grid* ug = blockgrid->Give_unstructured_grid();