12#ifndef BELFEM_CL_MESH_SOURCEEXPANDER_HPP
13#define BELFEM_CL_MESH_SOURCEEXPANDER_HPP
62 flag_all_sources(
const Basis * aBasis );
65 expand_weights(
const Basis * aBasis,
const real aWeight=1.0 );
72 SourceExpander::bitset(
const EntityType aEntityType )
90 return mElementBitset ;
105 void SourceExpander::flag_all_sources(
const Basis * aBasis )
107 for (
uint k=0; k<aBasis->number_of_sources() ; ++k )
109 const Basis * tSource = aBasis->source( k ) ;
110 BELFEM_ASSERT( aBasis != tSource,
"Basis and source are the same" );
111 this->bitset( tSource->entity_type() )->set( tSource->index() );
112 this->flag_all_sources( tSource );
115 if ( aBasis->is_hanging() )
117 this->bitset( aBasis->entity_type() )->reset( aBasis->index() );
122 SourceExpander::expand_weights(
const Basis * aBasis,
const real aWeight )
124 for (
uint k=0; k<aBasis->number_of_sources(); ++k )
126 const Basis * tSource = aBasis->source( k ) ;
127 if ( tSource->is_hanging() )
129 this->expand_weights( tSource, aWeight * aBasis->weight( k ) );
133 mWeights( tSource ) += aWeight * aBasis->weight( k ) ;
#define BELFEM_ERROR(aCheck,...)
Definition assert.hpp:264
#define BELFEM_ASSERT(aCheck,...)
Definition assert.hpp:244
Runtime-sized bitset; one bit per flag, packed into 64-bit words.
Definition cl_DynamicBitset.hpp:33
Hash map (unordered key-value).
Definition cl_Map.hpp:75
Top-level container for all mesh entities.
Definition cl_Mesh.hpp:60
Definition cl_Mesh_Basis.hpp:33
SourceExpander(Mesh *aMesh)
Definition cl_Mesh_SourceExpander.cpp:18
void expand_sources(Basis *aBasis)
Definition cl_Mesh_SourceExpander.cpp:63
Definition cl_EF_EdgeFunction.hpp:17
USER GUIDES:
Definition cl_Capacitor.cpp:16
unsigned int uint
Definition typedefs.hpp:30
EntityType
Definition Mesh_Enums.hpp:116
@ NODE
Definition Mesh_Enums.hpp:117
@ FACE
Definition Mesh_Enums.hpp:119
@ EDGE
Definition Mesh_Enums.hpp:118
@ FACET
Definition Mesh_Enums.hpp:121
@ ELEMENT
Definition Mesh_Enums.hpp:122
double real
Definition typedefs.hpp:36